{"_id":"graphql-toolkit","_rev":"959-db1e6eb8b49f02f5e97e23c3f48d0213","name":"graphql-toolkit","dist-tags":{"latest":"0.7.5","alpha":"0.5.19-40d3176.0","guild":"0.6.0-alpha.3","canary":"0.7.6-alpha-e4b4704.5"},"versions":{"0.0.1":{"name":"graphql-toolkit","version":"0.0.1","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && yarn publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"gitHead":"c7a95e7ce73b35563a5406328d0cebcc7b9a0aa2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.1","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-UhPBYqOMqsXGK/bOkgndiBQZmOeJ67MjfgCbhqG6tKf17FB/Lfypinsf8nc+LUDi+XBsNOdXAvjo9lox5UrNrA==","shasum":"89aeb828ee1d9dfd304f2438f6db9b989ed662bc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.1.tgz","fileCount":234,"unpackedSize":490652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUWVqCRA9TVsSAnZWagAAEOMP+wb9iajRBpcvpEXke2RZ\noTryZ2TaV3URQ06mMjUGdMdH5coYYZbwLkTpjYNEsX/zlJrQIPrhf/RnHatG\n/TN5lY1Bn/5XiXWtgGBfnRho2yjEaqtJA40cqSmElCKATgVImv/REPJnLyi8\nDnl2YlvIIYYL712REyU+CxAzgiD5wJnDej/Ibmv/dU+cU+w8roVTOKotT2RD\nwXSmEwtPRJiyN6cWAd2K63zx3dGymbf/wE1wdkFlLD8wkq7PfbSUadTMEG05\n8FG01IyPqlg2Ie3lKJM6tWUZx9ag1mhcPYeaY79Lwj+gQC5HSN1GYcM43S4p\ntQs2UgDU95OeHtsy0f3sXpTL/lETG+35FrcEeIkVM0WPaT4PzXRuENGj+6++\nAnPEuqtAkjXYdta5OMyDLoNsytGSpI4wC+YUqwhnVCLzWCM+A5J//Y8DcXcR\nJYpIRb7UtabIvzXH3816VLqeECGMvtZdqyI5GyPZtoEWqFNBUVjBzu8Oj7Xr\n6qeBgcEcm6lIqMmaYAdXwDS7lvKqt4b650PgD/Wc1PhrRhWncErxJtGcCLgR\nZYN5oUU/1n2PlQxG3xad/8Dn0pHEnqSxmxKCBdF+MljczEtpItCCpAySN4sc\nBmX787k/SzOXGWUGHCk/hl1xzbUyzhp9vaEVTHqWBX6hegHBgElZAMKBnqPK\nW7Ym\r\n=KUzO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXrC4NdPSO1P+XZOZrLiDWMMtwCa+cpWYObiYG8vBEcQIhAJzYO8KZXxFEBsOtBlKTB8dv9njvn0FRPPUoBE5FfRix"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.1_1548838249446_0.5767842380204153"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.0.2-31f5e64.0":{"name":"graphql-toolkit","version":"0.0.2-31f5e64.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git@github.com:dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && yarn publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readmeFilename":"README.md","readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","licenseText":"MIT License\n\nCopyright (c) 2019 Dotan Simha\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"graphql-toolkit@0.0.2-31f5e64.0","dist":{"shasum":"4ee7ae4a44f2d63b1ec6ffed500758940c97b2b1","integrity":"sha512-CW83sNcJ6tck9iJh2dlUnEMxd8RfTNsH8QMDfftep7AoMqQLxH6c6ueW8EGdVkHg+NnrdrSzRXKv+4b1sNePSg==","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.2-31f5e64.0.tgz","fileCount":108,"unpackedSize":154912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUWaKCRA9TVsSAnZWagAAy+8P/3UBwBSKoDSaYnmCbOnP\nugL4B+GXjmZ69SSMJwwSIPQMRCOWAMAFkvhB/zNQzh4UjeQg+J93j6OvqeBm\na6idZDQst2ukbNWO+Y62Nj8wxpLQZGsyWUlD2TfFjUmp4PHFVyfByhgaArnW\n/5t72VoazrpRq90pD7FA/TodegIgxG6Thr9bPp8ZXNlbF2w1GdeA2YHrbfbj\nYSD5iYbAGbYjvoRYtgypREQ1IEBd/5RcxkTbgVQ8PS9rW60433tc/oKXIQy5\ni+WaaaCPgdXu12Qh9ljpaNUH092wUmj0eczdAfHTQwNsePYa1Rzp4PhhEtDC\nGX51mTnLfu/f4SNFuk38XXeJaRCp8bF381wKsSKM5V9sIz/Ukf9TrBNoNMBE\nDRcXMU3F7gEN5q+6HB+1exgK2e4oWpcEqAbpSa6x0QkX0TuVrAoFDNibqESx\nQ9ycgpJrRF+oBIIHXTFrzNRckholVmr/AXokpdFbMoV4M7snlmpBGfSczqfz\njKhy/O0+mZt+ZizaYe3eKAbvMCgF+ZL2Ny9kaz+zKA5FXu1tETc0b3a0h3yE\nbuoycL0Cl5Lt6u9T2GKMLHyIIXJFq82fI2RqMyHcZNpzHBXHag+9XYjX7T59\nixzZe7vlGHL79vAquXIqBeyR+MpdWbwBOFF98AXEmDNNi74SGOCVltHbRmRa\noS+p\r\n=FfJe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIALhuzmnowsmwlw/Rc7KUH7XgNA+GKHk/3PvCxMObPsVAiEAhjxRhlnPZTD8d4MY0QMSlotpy86ntP2Fp8HDIxnzY3Y="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.2-31f5e64.0_1548838537422_0.29050627991585154"},"_hasShrinkwrap":false},"0.0.2-4c8006f.0":{"name":"graphql-toolkit","version":"0.0.2-4c8006f.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"4c8006fca065426c39164ef696f52b2ea2f64168","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.2-4c8006f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-T1bzES4mnTuBmsSBIxEA11ivp666E+090ox4N3r+wPsPgnk7zfjsQ/hBKNPNQQVeTQxlSOigQRUYCxeF80Ni6g==","shasum":"5df7b581dbee848340530521ed2707a82d8acf6a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.2-4c8006f.0.tgz","fileCount":180,"unpackedSize":424534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUWa4CRA9TVsSAnZWagAAjFAP/jnF+JAd/49qCcBJ5vRY\nxdV/Q5KEd1VBWFTvK7WwyBCdqR5+lwmY1z1645EYGTWRCu7mpkBBtyJus0MC\nUpUpJEoo70arJay+g/fgBFphUe5/bu3NsW0lcgyTfZkiNAkwKuS1SlJ8nj04\ncPwIWDuXYFutWfDWcC0xcFTckoSaAGcphnXBz5FvAth6RtjHwQxCfPeCLIj9\nJ3V1ObiqVADqb1W6jHVYScAWYOcaZ9ygM4ST1hL7EA1wnTUNkDcSFqfoZGnD\n12GT6KASMM9+gLSZYgCoy4SyEzTTC88cgNw6xZdtdeO7+/ODs8toxhCl7iOP\nIHlyWKWcZW6+Q5GSpQ9zLR5Y12MCBSSUh3zqjPNYP4zG8HBFbjiik3vB59PX\n9L+2NfdL1ZAIuzOxfhEcpli2xVMZz0E1S/9VydL9YdKHG0nHfD/uh5qODmY6\nNjjs8ykP+ntIG9KBWgJGg6mMKCeXAb/3gIt2vCmRgpcsHaFCN9Qc/SSsshfW\nFxL1TybOEFbppoh1YraeLVw0m8fb60Vcf26CQgb+gVFRl6Jgsi2n3wq27DJm\n50HLw/Oapo14dd2ltH27pVtEC7ZmRbE10TGtL0xoNPfQf4j35ZqktnifxwcI\nI/VNRff3m1XpBdsuk2aFIsJnkyqogHr1pBTIRTWB8Ugsi5TWsf2wQ9ALWX7d\nPHZ9\r\n=FIac\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0/ranf3WehhMUQFh8Ywcxw7IpNejpzs1cqVGPv3LQrAiBEmRV8E/iJ8ovsS+ez4mgWmPIohfJkzN/dmCtadAs+ww=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.2-4c8006f.0_1548838583533_0.9828017530751629"},"_hasShrinkwrap":false},"0.0.2-3327985.0":{"name":"graphql-toolkit","version":"0.0.2-3327985.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"3327985dc04bda2179db64949e9ea5092933c45f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.2-3327985.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-mQqFNcbYrzSeBdMM5IfleQFQuMdVCIZkVKOa/AHj7txx97ANriyLYcX01d2xFyKC4SRntDRO+fGhqPgv9tGRfw==","shasum":"e9db3f333d7c969cd64d3407624d951ce6109977","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.2-3327985.0.tgz","fileCount":105,"unpackedSize":125460,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUWdVCRA9TVsSAnZWagAAoOYP/1tuGLVNvnfUdtft5VIi\nS4bSRuqH3TAWyYFzbYRW9Hz5UGmGmd7pNFPlY1DUGJ3UZy1350BXENy+Chdi\nwfmDcH158UlOpbCIGXWolah0gm4VzSnVMEKa7TnrrIuqWP4F2k/N8Cbcf/De\nNldOl9F7IttFdBfjH37AmwWDImvzsiIlLCi48R9+NqQmCbRXAkQzlAizKjk1\n4RFfuJ5UJhP1lBiM0VAuCTOQpu1qSYZClxkLZ6YOSJpY81LmyypRiGmcr3SU\nXbX8rswRMvtOmroQQbw5pwv0yG4rwqeog1EhQusSXjtFzyP044R3dBTIFS4+\nu+j5wbHGY9uvF4i87vtnDp1MnbK7LZjY4MXKr22dhlTVifDLTndlgFFBNvmb\npf6u8W+SueqBm6f4gUAfPcJYAzwE0DOyfianAVlSTTCHVji5ehMGFQfM+Ueq\nH3qvu6aZg31dM+/mCFLx1VuSV/HmkXsDgTfgeYzmy5x6ohs+zzi094r/Nu4b\neyAlCrv+KdISIXMSMM/Oo++5TwWjVCmllOomBaQA+yCNr6Zu5hJm6O3jIeqF\n0WluRWYxwk3tlSB1qTNVJZoQwVsioFAUrbgUWaH+SxiAPZpO/OOMN2mdKbnq\nkTOenemCEjS4z0Lii0bodOH25TJODpvMrZKhXzwNyO8DHGvmpLn1VtKjuHCF\nECcO\r\n=OmFC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCphmweZPTOGdhUfKClICLp6El9g4oQs1nPY4nGUPkowIgOGOBNdqtZGmVsqhIji2nj/WBezJlffZ3AkZreZTLUEw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.2-3327985.0_1548838740598_0.401345543188105"},"_hasShrinkwrap":false},"0.0.2":{"name":"graphql-toolkit","version":"0.0.2","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"gitHead":"3327985dc04bda2179db64949e9ea5092933c45f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.2","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-V3FdDA4Mh7P4uxGGUWRCtgBzs2fzn7cuBsCLJzSEaOtxqdlzff+OxZutsCr0ou3kV/uLhK1kY+0/DVbKSvZBuw==","shasum":"ea9c843bd05d637515b3f0c1b6df5d584fead895","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.2.tgz","fileCount":108,"unpackedSize":128719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUWfzCRA9TVsSAnZWagAA2AwP/jtQrAXsHYSvVRvn8QhV\nkUxHn79V5OH4skLxnJ6aY8+tXwh7vjVXDBT9Ac+ZnRu1ruYiiqkwTJdKpkij\n8CD6ADsvbFWXHICe0YVuEzLuzxlzTdSDNjA0c+HCJKL8CLC1ARgjgH7Ogo6D\nDd42cwOBhIcOwlTtZkUeUTj8RDV7y0ZD2gCKhFO1BNah+n28tcFDcFFKDRdf\nTIxnKBsEMvEwrOFFGZtcvhzXIXKjgzp6QZR++tCheZBa6ZQrEpFMar+l163W\naudASsjKJrW0rxtmJnL1Vwh3JacbkqtpGiazKlZcqMPIiBBgFffr0PwK7zjA\ncCo5GaLAIV6yNKWPmgYr++FAhw2tRMH5PbZtdGeeqXew/4WOg7Sb05aNaXqq\nNHu1gMf/XF38A+no4um9d27bj6OFn1cGqgIZevR17YKmUOL2cMYeNZLspf/M\nyNmimxaHwIthxPpeyMM3uGas3WpIYw5i3UbUNHxQOmCWc5unjYuE3IAVjX/F\nYskFpPll45/K1+5mTnRKTxlJ2LUSlWI9xvi8W0lGsRYWffR8ceYYRm5HTLGo\n9bCAS78t5EsKBuQTGfJzotiinQVovSdA2C5PWM4IHHyFbL9TQ2WgGmsOjGaH\nNRc2HMifq8P5DYN4q6xedsu9owRDDJL3nyMdgRvFDHJ/QYCWKAYpvSVepLAW\njQRL\r\n=12AV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqcXrMliPr4RcBh57FvLRfYdIN5V97LRevlrWBKdPQvwIhAJfwEjaXFfFxQxO1zagWzQVG/bebHHO2KHE74N/EKKBH"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.2_1548838899294_0.38486665791110175"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.0.3-57e0167.0":{"name":"graphql-toolkit","version":"0.0.3-57e0167.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"57e01670f94d7e762ed996ca86bc1db93a0cbe18","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.3-57e0167.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-+ad74lPjifi+kAlDbIDZPEZA7meIudpDIw76d7oA10UOyWm0R36ylZP3KaoQ6ZJpVEAy9zwXvUg7ZiR/BgJCaA==","shasum":"651fe8b304de6f86ded873c1b419b42cb866bb51","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.3-57e0167.0.tgz","fileCount":105,"unpackedSize":126118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUWpbCRA9TVsSAnZWagAATGoQAJgVutq20V/lOoLHXbfm\nIYZSPspGXjlsOY2u8YJimKczc1F/mZSwrYKQaSASMBI78MxYboB5UE7SEVeh\nxcolQCRtWmzokAt+eACNVmAKe9eyyOGqCyXpmUPU+J0Wq/tVILjc9/CfU5gs\nt2zDWfs+nnLg3WgSyx33RG+eMQwGLvp4AbAXsv20hsafAGSa1OkvlGJ8wVc6\noZETT/K2H9OHoPWqjYZ19vxHL0j/a9+gZdDNZF1YnRW9Avh7BsS3M7Z/y51f\nS5nt5/Rk2ZHEkAFFxmgK9XgPMcSASCF40gGOYbvzRuIvpFzECm3QPSdK9u4u\nJYsqhqn4ym5QTAyYZ4EhLXsDu4Ve/z1AaPPr/P+DgrufLJlG+/wBoZ4aC1W2\n9nu0qnvrK+OAUGTbX5gA07Ei+s59Tp5rOjk9IAptGxGErVUbpnnINsWQiTJT\n2lK2SQp41yre5UbG+sBA1DS8JlJnjRVdIZUeJQ8vB2PqeN+Ymz5DjhDsdA9A\ny5Dq7cE/Pt95WI4y26befTrvfmQgqKUSzia0gMMJm115pPcTmMS4xLPlwTsb\n5In6/nBBoj0UFcSF/WI3LBfjHFYSgJvsXlasfrxYPOtXHoDSTEoJwenUIWG4\nhqseCA0shHy+c2qXLVRRDj1WfvlKLoatFp0MNhIRy46J33rlxNqWCTliKp3E\nJgxZ\r\n=PVYj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHlJR9FlxRLVK1B8xkqukl0Ca2FfXq8iQgifecelb8qFAiBaWhtl4mlST5nNibTxp1WIYDT9JlrRlzyJr47DsG54GQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.3-57e0167.0_1548839514534_0.3471376561050532"},"_hasShrinkwrap":false},"0.0.3":{"name":"graphql-toolkit","version":"0.0.3","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"gitHead":"102d90aaea53ea4b273e67010704a7e944c25da5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.3","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-RKWWkHI+buxGO2FOhzGFVUjhz4JAtiWBEjryMNJ8BhS+LzbxrlzduDrGr+RdAWOjyj5gANcVHhtij6dUpN4MwA==","shasum":"b3039d4184f01f9a50fbe84010310894b9581a56","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.3.tgz","fileCount":108,"unpackedSize":128697,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUXkiCRA9TVsSAnZWagAAikUP/2qsrk8rFxmg89KQI2o/\nGwGEwpd8cvEub/xVv1+j9LSnBKuJtFsysaN7MwFiR85UBoTTRER8t8LACm0d\n/bo7ugsx9fZkdXkLsL0d1mbEouwDFcxJfRf84ayq4NEYqqcRaWaQ/ke1m+MX\nrucR099hJeoq2Cb3IdwjboW5gg3ma3w90UxceXqHLLRU0r6MdlT604SQ+LyV\n/gE67bGlMZace3z9UoENbavSeXMoGoRELAVZ26ZYCYZXFWHweE1+a+XJUN7F\n+k27DQiLod3juRwNQ2LylOV40DHtdtpSLkc73GCFs+h+CVf4uH+FBkWkn4rq\nG0qmYGttKPVOtEbFITF07bRKnll8OpmA+/RKeGVSkyHZC+qtYrxp8XlrPp6W\ni/NjVnUW0GIFG//eGwcYlK28ZT/noBqs0iPRwR3bAMcRnYAl7nvDvvikh5/g\n6W7hHB969+WJ3OHLLEHuSpOzgD2kC62rm1QHFHCRhx9ECAxdO0V5XxhajZuA\n2B+18fHInHHNUKwA7Tg40plwnK3kDWpgzzEXPdyDy6E693Si50QiGYb4qSl/\n0BuDr3DBQhbYsurzN3BmiTdPZbSfmX7Eya+6T30wCkVHMFrQu2sikhvaH66s\nDUmV08pX0sc0pLEhwPuOJHCPtDsrJJgNCMR/Byk6/y6ieZw8SN9AbeTsPan9\nj12J\r\n=Nm/5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0cNsNfykCsmxZJrhO6WCBrSzII8KrUmQNoA8rcUgZlAIgEIre9DRXG8XOYz+00Z0fx+Gdg44+OZ1TVN7GFzXxSdA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.3_1548843297765_0.7956083452354403"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.0.4-a0b19ea.0":{"name":"graphql-toolkit","version":"0.0.4-a0b19ea.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"a0b19eae444ddceb1a5edb3ef46cd593c93f1001","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-a0b19ea.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-+CjM0SowFnEMY7CQaM5UW4jx4QOCOXat+vw3PCZ/92dNCwJss1xLA8T2obYs8UgpKBo3z5cDsHHR3SunE9MEwg==","shasum":"c81c5efe67d002f9533d7f3f9130e6de5ce505a0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-a0b19ea.0.tgz","fileCount":105,"unpackedSize":125438,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUXlTCRA9TVsSAnZWagAARkoP/0bcMZccK2vrTr2nonFJ\nL70DD82cq3eqhU08JBCTJZ65N21eOHdc5tSB8oJrpgZDTBTosm6KTDBA/kr3\nS5iJ44WvluOiK9TXA5KoQZm+EjWhz+oDG6qOqEbdYRK7d3GTh/cofM3vJHgK\nAbuvurMT45+bPoNu8RPS5k/IjhO/ID+j6OWgCIuZJ4fYAENaSpwKebE5aRq0\nrVaNQxzxInhDE3CGBCjCvCDV6is2fMqXVEN54B1Xvo4kNE9UWtyVKMeUQxPq\nnt3LJhKhcHKdTFMFAMdWyHdc6491HksmLMDxpgsBCa0wAiOa5Rr8WKmW1sQ9\nCYSZ8JeEtqUbSRyx6TGXShtKZDw323EONzSgsGa0i2rwzZ9PRg8YAogLxNVz\nKOqL7nttO1a6j+sUAV6h7SQdlMMNVXmbtin6qa09U2/b5OWlPpW9G6sU4TrA\ncBX6vCMspbnE3U0P0kO2hw9lW9WeLyIw5u+9A1ZZ8xlKvu3iL83WpQgCO6/B\nQpffChWoB7h3vlfqqgj0DyhZfn82LD1NB4kcVtBqgQHxHo5XDOmid7jh8bD2\n6xmX/v90PvXRH68Xl9M1mrnlx/HyVzk8UFl83XmrZVAxlfxCskY89a9QatFT\nyfe2K9bNuz7hB7309CsYdDEQib2gBZLjpDuKE4gc3gnJFs4RR3PGD+qgh17m\nYT/u\r\n=VotP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnAs+iJNsxvugHB92H24p54NIVlYCQmih2YT7edB6USAIgX8M68CLZtOVBuH/+vsdcJGJLprx7WvPLO9sZbtM6RmU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-a0b19ea.0_1548843346736_0.13412955490005873"},"_hasShrinkwrap":false},"0.0.4-3e9a946.0":{"name":"graphql-toolkit","version":"0.0.4-3e9a946.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"3e9a9469f0457a07a230fdb70935848b52b550b6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-3e9a946.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-nU4wviypsl+JKvHgDjIDY8YWChVDTQWSLLC5ZSEo687KcouzUUuqzAFz4aOhRUeChBAUGpYzLLhuLJZCUvNeYQ==","shasum":"7da6692a2763062b11cea46dbb2b45432cead1a1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-3e9a946.0.tgz","fileCount":105,"unpackedSize":125569,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUYJ6CRA9TVsSAnZWagAAPN8QAIBwZvHDAKCGey1MHo2D\nWnC/0+oo+jjAbKKkWGjbuY7k2VCzv8NVu0NimsXuvWNdvfiLZ86KBh8Bw88B\nVtOYyJDRk9Sb6uDlcDbCYWB5O8u64+UjDoo6XqEGVmGIlfvL9Ugwo01IHOc+\nXJ17EjNprNkw7nHASAQsVlhE0nxIZgJo/Y6KK+fEbRT4TsEGdrkNPVed9do1\ngSVv/TvG6IB6LXrmKXCiGV3iansKeZHlrJ59cZHImH0lhA8Wr1Zo5tW5RDJY\nBFuA2YLgxt0fMGemH2BVMX3X0xpTkOCMsScMJ8AerVyWtoNz/Op48B4d/bez\nBNfIf8grzOzDRrLC2/O5P2262u0nQKND81ZuZqVMytlw8pb0hkrkfB6uomZW\nmqOsQKD08B+fMlJbrredzeX4tqhJ8ulgh52EHjFOA6vOl2PaslGDOc0yGT7u\nzAFsBceA9oTHl4Ixjwr7WcWE+9gRu30EA4DeJkhrHy6zWaudRBipqlNuDYGa\nJOFIKBRif4afXoJU5llYDxVzbUj5N8za6hvDobipTBEp+IUl3Py2StyoSsyC\nJQ7Fz9ivAUeKGj6NFKDbXBtDEYMu8B3EQGGaTejz5HbRKOBykcsNK8khyRSB\niuBuGYB8rfrQm4pTzZgI2ULcCBd/H57R2g9z+NUqsyCB6L/EWjOvxEmqh08q\n0Roo\r\n=QiyW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWIKxw62NO6qCONrhtzYcr9iojIV+CDX6+KVifG83GuwIgbcxCCgIh1D59NNGz8OACeYTI5gv0pp+gnR0lhTpoCnE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-3e9a946.0_1548845690208_0.19031657328601814"},"_hasShrinkwrap":false},"0.0.4-e3e315d.0":{"name":"graphql-toolkit","version":"0.0.4-e3e315d.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"e3e315d11fac206c05d51d6ead098caee8c3005b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-e3e315d.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-vcZ1r/l7R0dfMWpBc8w1YIIRvxo9HtvwP+v2ZBR7EPObUGNRpiz6ztLT9qqwJTeU+DxcntkopdfSmpr7ssy0Nw==","shasum":"6265ceafebb234d58c7085e1a3a566df7b8d36d1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-e3e315d.0.tgz","fileCount":106,"unpackedSize":125610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUZx2CRA9TVsSAnZWagAAJv4QAJRhv4qHKK7Cz+cAwQ5A\noSPnQ6VPXp7Sl5UpV5jEUndFRtyt1ln5NMjZJeXa4swG56dDjr4mq0Mmohri\nGaXcr1DevLEYME4Fzc1zbtEZajowBd78xsjEwtOmLoEvvoDmdU1Ovl4BVfgq\nzffnTCUnfVFfuYgfLkOKe5g7O//2vtcx9vlXVfXDrHwgfGVb4VEYOOrs0ROu\nmAtlxBJblkeAvJgy3ooFnzElhHACEte1L1WYEm9QguDIQrj3N9Sr3M1d/XM/\nGvQhHaXNuKefQ9ViBo6HbokPjjhSBYvQl/C5eQc7sOJcut3vMf2ByWr4GNfe\njNT5g17lAGH0udbM6/aart/eSza0EMdnZ/80ROYdWG4SqW7BAQjcXeP9HZOi\nnNFzdf9WPmBp7HwAu6o8wIHzwcxNkr8/uHrIIs96TpJ/QiJmOBLtcHCB2z1L\ncS3dF71nUARrsMR5Gwa2eDfTQ7GQdemyB2mLoLsyyYUlpYgGRAj/wNqh1/Dp\n1+uLkDu7DMrvdo9/nyd/yDq6ccBEwB1D+JxcpsUT1H3ks+togeNg+ntj8iyS\nOSp0/8JjTp7sC4dnPPXUlTfW0+tNB5GvuDDiEueTIVN96sbJ0BFAXVEoTc5T\nBzisXDr2J6VtYpzq7yF1HwhneZ27CJDN4ciADba4mvIxxR5XyID/jMGMAKGc\nnmJO\r\n=nF6b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICSoYdrPvM6shKe7MuKqk6X4S/zD5cmq145Q/mj1DoHLAiBVVC/WLkmllOpObJ5v1jscTBJXuvpF7FrmFria49Hksw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-e3e315d.0_1548852342378_0.31672419579259037"},"_hasShrinkwrap":false},"0.0.4-e483b20.0":{"name":"graphql-toolkit","version":"0.0.4-e483b20.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/lodash":"4.14.120","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.","readmeFilename":"README.md","gitHead":"e483b2072359ffc6788b8ef9d105f1b2632d6ed4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-e483b20.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Af9EmfpvJRJHpQB+nng7EW3NeitzdKiToiphGAxDO/FhgHomF9XRO4wOhJAiixwpfRKdyE4aNhD8cL63fqqV2g==","shasum":"c5153434ebce8fec15098bdd580ae85d066b61a1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-e483b20.0.tgz","fileCount":114,"unpackedSize":136658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUg7rCRA9TVsSAnZWagAAFBAQAJR1VbJKiyVNbI+4arns\nxmhkyO4sF2ktr9DyTBDyR5Wo/cVEarYd6Zmfef/wgWbEP2FBtm934cdSfYag\nmGmVGP9RHCRIwOXNARa2liP4J82jsiVguAhYrq/0GjKXCPdbiTMArLTGHvux\nBNLDd4Z14Br7ZzY5xO2IJX8I3HiEWeQ8xBNhlKb/x4B8tcQW7zwcLExyHVSD\nPYgqZH60nfFKwxlL6Rq89qc9cbGxWaXfXSGW9Y+Uyxn7Sf3UH9zuSoIStJC8\niABWnW8eApH+fGIlb9DUpeckVDuFIjndjxosbUC/cO2bo3cSirlHw+1zAL6L\neMOzYkCx/fK5D6+GagJiEdL/NEV/Ta1ysyOSyz0cjubKndndfaU+F7bfczCu\nRH3hDX9qe61tMdCLaJhDTPzWOmH2kywD4wnUo3KuOAkh1xhkXgrJdVWVRVHW\nqs1fMMEcgSbR95XNoQ9Caa2Es1vGFNgErCAb+UoT+3p3fEAT+4WFTuvdQ1Kc\ntG1vNUTr09JbQZ7HeldLrymK3YoL9y6YaWvpscvNMS5F9Za6/PoVbKcSiXW1\ncrobboG5qMdX9g1LSiTNQ7ADuDu0t8ViWjXUtYa1RPBpib4wIKvgdMwtmAPo\nHUl0PwGCBrRF6t1vLrU4OKnQADtSnIyuBPrW0KCnbIsEFkPvgupuyx3ReyWD\nV3/3\r\n=A2Oa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG6Y2nGX/xzIP4VaI+UvbxXA5uZaIW52kO7JwytoxbNWAiBx9NmlmIY1qJDCU66BErJLpCxNLf1tfLBcbs1o9BRy0g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-e483b20.0_1548881642572_0.07780604569409033"},"_hasShrinkwrap":false},"0.0.4-11e25a1.0":{"name":"graphql-toolkit","version":"0.0.4-11e25a1.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"11e25a11565a45b7e4443902c58706f3ee605305","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-11e25a1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-5W1cv3BWjYOW8XQmlujmfU1SoifIFsDlpXgsro/K/jtvq4dKzSbpvg7Xp7NoGuuxIbXBjnJJ0EGuOhde83JS4w==","shasum":"bd4aa751edccead21117710ddf8fc5334dabb5af","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-11e25a1.0.tgz","fileCount":106,"unpackedSize":125610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUqhKCRA9TVsSAnZWagAAuMUP/i4TaZcCkebwHd4iwsFZ\n2VftaVI2/Il5demke4eqAkr/VfkaZh/6FEnd2mgxHCkiO3o+/2XbWHV9Q4+f\nu0Y+VkMJJICwFWOF1mCGJZMShEPbTUaG2sVyAgUGpbRUZcSTidDOWIVSSz/V\nL/60P2n8n6wQCGFGL3FroitUPCSoc8NsNA7i63t/5HYxd+Ybjz5UsbpuGFqp\nHe+Xn9hcDLIJt1Nzyg0L0QQFO8PN0Y3Ow7BkeZMP3lJTm6NMioblkrbm5Zf8\n5rVEpQv/LCrIsUs1FnotrLQGPrM1ilerC8IGTsTw7lay+ppXBhUNJ2sMLooy\njyZmvXQYpKr9UNJpbVMFj1jAnFC39c3gO/Y+8JS+2JftXq6wZRi1i3mljCA2\nDXVLbtcVvN1TOTwRgfDy4uv6TNTeh7c2gPxP+ikKbhHat1Pq68wX4TS/MosR\nV7Wcviw5KxdABFlpIK5cC4U4IWEbynhTyR0WgIYL5KNN75Ore04Pt5Cg8XxR\nKtpB0V3E+O71MBIXq6gJLHI4MImhNobwEWJthW+XUwWWGopb1neTxlrZQ0uR\nran9AOkZEdARVqM4ebrCzmYRJyR3PqHvrCG8iXEmFjSFRB9HWyUjSYCyP1v3\nHQCfcVEpH6cz/qwrjEsBN2WidTgYCxlOODOsY/B+qeRomqek5jyFJo9wX/aU\nwwJw\r\n=+UDx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8qviOfzCerx+fr082IwLvYsjW6F/BNHuxs2YFbZButQIgSQuxygbXw/ULHKqFYt/o4hXG03/8kNiDPmYaMeAsXww="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-11e25a1.0_1548920905760_0.45923618044226866"},"_hasShrinkwrap":false},"0.0.4-4a4de6a.0":{"name":"graphql-toolkit","version":"0.0.4-4a4de6a.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.20","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"4a4de6adf750486f527246ff8dd5a060a8b8f9f0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-4a4de6a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-LioLTX9JpK1x34CW1TIWNKl/LL6yooapLkIh8xPmy0rwza3EYuZ6dIWaPcswodJMlMMi/oMzLNW3aqGNROdjdQ==","shasum":"97416803f46eb9a5015d313ce41b8b7802bdbf7c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-4a4de6a.0.tgz","fileCount":106,"unpackedSize":125610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUqhzCRA9TVsSAnZWagAAJ3EP/j/VjkXKy/Byj5XUuKMV\n+cmVCxqSpQ4W6SUxo/ELsl/6hQxpUHRaxpQ1UmU+hw61Wk5+fzv+ZqvnqyRn\nBmuMGHdck+JYN+ThG/rvG5Wzh+dYcfZFvSjcjDLuzWKhdvg+k4purRsIFZqS\nPMhukNQvk3oU2m9KeTvtiDUW8yEL9JfuWC/0riT9bck24AozPjh1cUwHVbLQ\n1mcNEr+kgV9TtIupUJFHxWqLxmMmN/S/BRDGMyvThjM+8yNxXDFCiCO9DRio\nXX7BVjR2zYDBK1l25J97HKPXDJydFf8NkIQURgkXkLVkYzD8826gHUiwbmRy\nWJ1r4ahDXGTPpY6dPb5wj6Pz6a84y4pe0nn50EO2n16b+SiLMQqksgOTqV2Y\nfpUBsntR8wu2N3AgHq8QjvVLNb0TXv937kwi02UbcKaCr0xdxj+1JV+9mmu3\nev9ClkFwzUqUApZZVW0Qct4piIhqMCnzI7VuZRCsaHPs+MjoiipgT1JONopl\nVcPGjveF0359rjCdClJmHKGUsW9xJyarNTKgokkKB9X1w5M+AZ8wWrSOiF+G\nFE3Uyp3is5XICh+2TO0SDRldqLV1ACUDLyomz8qODw4Tb2gGJyQOhdzFmrqP\nHr0/neqJ7xKJw7CWZk1cBfEtkdPy3/zk+QMKCtueyfS59SmzBwiy+aY42CA0\n9xyV\r\n=Y4hS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYGL2sMt6XazmOocCpwSj7XyG1wo8CsM9e5VBHRywXOQIhAMjeMbBWSrcYEbNE5whfNRnisjJ2q+pBFYLake8Q32Kl"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-4a4de6a.0_1548920946601_0.6205010743143997"},"_hasShrinkwrap":false},"0.0.4-75305e8.0":{"name":"graphql-toolkit","version":"0.0.4-75305e8.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.20","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"75305e8e021f51dd4c63c685406fbf6c4e41e2c7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-75305e8.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-kgRnzj/wheDVLQ++LXLRpzTvEO0ugryrnTLcXk65TWliYT2OGWGNYgk1l5RPdI2QQkwsImy0q17Kyqmds6P2Vw==","shasum":"43c2d0deb46d078cc849d133c36a2e8dc02d947d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-75305e8.0.tgz","fileCount":106,"unpackedSize":125610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUq+hCRA9TVsSAnZWagAA2AQP/0u3dgje8KnSCFw+USaZ\nM0BvQ5DX54ufek9RgRd69fEKwaeLNWBUcExhMtUS1v9srNCCDn0l4asbljoL\n0NPnu6VoDGdGgFW+mQxn2q1Wd4xN7RVAaen4cSc5d1ish2w5yuwpQzA8dZkq\nBNOGJYoBw3CqmBcXqQ5RC3vFjCtWpHSgG6xs7IVBrb65i9EQOkYn38O9JW1k\nhwO1PsHSmSoszB5j+pBlBa/J3FDTIAytSz9wdTrvnjeJWNxlGwIEckBOR9mN\n1mwTjmiOiNNm2Q6mWL6P/Z7WaZu8v0UxiF6eFH1P0Dzz3NX9l5uBJmMJmoq2\ninTo/kp1EUXmZCPhQ/X3PXYo505AW5MId+DOYdzEz76LFPCEmmoUBdt3V8W9\nTQzJH6q287ovLeEqDR3PkC1pcjYEwgCCwR17gMX3kdzuUhnHo1L/TreFIXed\nlRjIkOT9J31qaWP0Opj0NVAtGotdvwkcxSb8WVdxs5dxtgqomiPNvKg+otQ1\nQiRasTRG2hKVZgiYF7FLG8JNXrKMV7PvdxJzS6FZizpiPdQ+iQm2tBpKVuXx\na2wlnpluw53tgms0/vdc3rsd5Gqz/i5rTjqKwc+JK9joePQxWA0Oxc1SNJsM\naGvTrD90hlfcP9X31W9jy91RN/RWAV8BLGcJr/Y7iyfknh0EhN1lGs/1Ewln\nwdy5\r\n=J+FN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuIz0Xq74UT1Wz9g5z4gKF/5Y7KIwy61XUxNOo747ptwIgRgwGRzKmyq+W4QF3j5tZZyNaV8hBD4vV1RTBz0gM/E4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-75305e8.0_1548922785396_0.07883412843544835"},"_hasShrinkwrap":false},"0.0.4-eab232f.0":{"name":"graphql-toolkit","version":"0.0.4-eab232f.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/lodash":"4.14.120","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"eab232ff1362f3851d24d107fc73db92ee26dcb4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-eab232f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-UeYaBEKQTBUSi6nqPDkMvFdj6WSs3R725qQtjLus6O1QNg1Ob24qpoCSkfEsmMnrP0h4Mk49MzBuBebz7POZnQ==","shasum":"c8ada9f4d2154054a60a421a115892db1ae2ffab","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-eab232f.0.tgz","fileCount":114,"unpackedSize":138160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUrGBCRA9TVsSAnZWagAATIcP/1HVPyIdArExWbE67fQd\ndmzk+YMvbq+WuqikGv3BvPOwG3e6kCA0tOQycNAH3QynRJZQyhaI9h7/7+jy\nXcfAi36Haoj1SQAsgT+OzkR4OOc61Defy4NeK7dn/OwiDYetsKlG792BfMon\nkoHdVtRzf2qWRH6NbL1nopSgUyg2VZUoIrZh9f+0jWCsEk0MAYbJEWnpDjqY\nrWhX1yYGbwuCtC9vvH5IAil2vZguAltPnrUHGqxQMd+rqxjLidepPT4K+sbk\n9UFjarJC5GgvbLgN5waSYUMXuU6ojfMoe8ptjmdm5oHmJuKAadPrqxsszWL8\n6/b2pMpPpca8cPL1fSkpwwUUzEMsfHdXJqsnS+e4DIMj3Qdx0baMwKJbRISD\nufBeanvgnirkfqNMXucrB9abL9hqhlTQcXyUv7P3hhdS1jV6zlWWQ1utiDyr\nTOmyBlLDSTjiMfkMAmB90AewF3g2N0cR1rSLAgFy16YFz+J0KvNyQ30QXiYG\nrw3Ve/wdZpJ0LDSQMNw6atxKtr5d7ZY829MNOMN1/Tv6oB636ckX9lQGEsGM\nlYgt1nTyRKvt2h4EvIIqkH9G9PQP0eajaPpErOIyf/n6hkPzSZndtpCQIP5D\nTukU5NJ7VJ9H3gCw3khTIezXdr8dJRyeOYQnljOhPY8iAfOmAhG3bX2SINaL\ntkci\r\n=0sEW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxvLhrgAyvxplA+rrdHMoEZzJLSfRZif0cOUhdR670FgIgestwfQ4wrsUGweuPohnsgJhgNVRPVMDR1wEU0UzxbG0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-eab232f.0_1548923265408_0.9431289110497734"},"_hasShrinkwrap":false},"0.0.4-74af3d1.0":{"name":"graphql-toolkit","version":"0.0.4-74af3d1.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.20","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"74af3d1b4cba6ea179c7a406d10ef84c913b7134","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-74af3d1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-UjDgpRNA9mbKS6guOS8P0lyYqfKJucvuTuOPmfH+LhEqav+GfXmUBgxAHCm1/1wxAnhnXqD1mm4a4xM/Xy6CvQ==","shasum":"4ac0dfc24dfd3a7527e4493d946f0a232484f560","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-74af3d1.0.tgz","fileCount":106,"unpackedSize":125610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcU1EQCRA9TVsSAnZWagAAbmAP/RAhD4Hjcfj+xM7Fjm54\nLz49sHYGPwp9BtBATw2TeYb3nlGaGHdlkyBTHDxDBx4mFIIIn2IThooYfDhs\nMhx/E/30c+IxyMk0ShzontwHCWQG2z+BhqVMsMQQvqcNYkmIlNRCTTsP2Dku\ndMrHHm4Zt7OcfBrwtUxbAclp2eeY6Lv/4GocSnOg4WYHChfBlSlRw7uMiHKl\n9wDZpvdYLVHY0xkidzaWGndimq3IrdcODepjFf6IPmY7C7U6N4NrUrhny8D9\nNNXAmJh9myyDbm5rNqDaJRsCuSlZ+xbSwIiQcQOS/ke14HFumDpHWAqQmm6H\nFrn9A8LV7jS3n/xHAwZZhJRKA0W19DeO8NnLBWQ4F8IovSZO+oHx1lTlulBw\naRxC/cxES2EARdByy623qufn7HhTagedvtoCBi67WdyYNLy9v6Nq0nmEGmjr\nz0OuSDBrBU8V5BCdAbiJn9PzPGsRx8H4pkcMxcXXneUTb/Qpwhjk3rPO0sq2\n2qCIu6nihy2PaivREcdDDitG3RYPp6+KkUcL2o9C19gRsu3mDMzNqNbj+vti\nDC9BqpOzmsJx6i0Sav2F5V3cLsCingVeSgOK84vdq4ZtY+D/gYL70Pdu/993\nxCEEJcKlp4jBV5nJIWL+8po/TI1cbeNHwB/7tG4UpreezJkBen3KAceJK3Oc\n7oih\r\n=F1yY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW5wMItwNTuSwMfq39AXcvXDMz4gJ9hzsr/hy+HAt6ygIgLFypMUJFZ9srIjkjTHl7mNeI53LeXJobezcTiiEaejg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-74af3d1.0_1548964111340_0.6947499353622064"},"_hasShrinkwrap":false},"0.0.4-9c4ed47.0":{"name":"graphql-toolkit","version":"0.0.4-9c4ed47.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.20","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"9c4ed4726c9f2a48008dd449811622133d3fc314","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-9c4ed47.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-cRPoH/zhiGo7NFzI5hWsqdTylwcvrG3u9qCd8azPbMLT7qrhpxIpfaOl3r/mbaHrgzjT6AqLIr3avrccmQhriQ==","shasum":"f5506e69f56d9b72cecf9abbf0987922d893dbbd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-9c4ed47.0.tgz","fileCount":106,"unpackedSize":125610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcU1XxCRA9TVsSAnZWagAAn8cP/jon2jAT72zfkqoy/ws4\nUeseRdvO8rnr0uMCp9j9ZNjbUS76exgOLKECG6fOCwhO2J/JCOXCD1Cprn+z\nDX8GD9g3kbevtw0ZFe7V2qUnYeFUr2ARfj4+FR4S8PGSqYiMw3Ch19V5UJtx\nrLAQt5zv++2ktNmGYNn7HpGFC+PcozrofSekfst39VPtigwLU0MrCWiJzULl\n3e+/Q7QlFbZ4gsLdOaSvjvTZm1WHRW/yfATrDL3gCqvnNxMeHXewhcBZuWuC\n/XVmsGUWD2muiUKUz2ezA9c0K8GAGXd/p1RkUpgKx+9ZhF0WW5YXuhsM5RdF\nYTrJtz3xDXH7GLe/Rqwod8/Op3awb4WAQfQHYf+3mtnSwU3WMt9/KngM7EKj\nsCN61emR/FgsPhb5/ZY8U1vIifatH58kuNqe3czlSk2DBCt5uwuzhXDixeYL\nlFdTPBjxLLTHL6+RY4xJmnqZBo7m1YpkpTW8I69rqPvkYq7U5SJqibINBZzb\n6LiMIBrKtt2EIgb6LORCxL/lBYu0nQJSWGS/3sVyvmoyjrC1E/tmisSd7rRn\n2UTDH6DyVI+Ff0onVht6/2HQFWKQ7lP1C4grgFVY9HpoNZ6Vh+WvhJaKJfA1\nCugTWTLxwJm26/v0pkrTumJ6JMHmBNqrf/0b2xNzbawq/aCRwIPXKH+hU1Zi\nmFc+\r\n=L71F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBUm0B2sSCMdkd+suMRYtaUHfk0hdICix0LnrFvMBu5RAiEA7sgKqoHjvsbaiYj60353/MECe47Ul3ZreMJr1C3++WE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-9c4ed47.0_1548965360630_0.23283525694358098"},"_hasShrinkwrap":false},"0.0.4-a6b8085.0":{"name":"graphql-toolkit","version":"0.0.4-a6b8085.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"a6b8085c3dd05f6dd93b58c7ec049d4eb61bf990","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-a6b8085.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-uCg3bAsIomewFfuXvBXJzIfs1dbcben0S0PVmydSZxLdC4Zt6OjAK/eWYnbthyv3qOmsW15DucybQi1yqm02YQ==","shasum":"8a4fe23f6872d49e94ee5b1e989147209dc57943","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-a6b8085.0.tgz","fileCount":106,"unpackedSize":125610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcU9vMCRA9TVsSAnZWagAAPi0P/i19c5kA9qx+FJjNcO0G\nB/jeGhofBOtNT0uE+sHRrKX7eZS1xdJ2tPJvUVC0JBmcuJlCfwavpu77qojh\n0z+RnhavxcqZ4D2DbcZDlyfsDpZGLGTepMvlyVdVw3aoJnOPSFGOcFV9PArX\n78/vxVx/Eu/SoMx/HbYSg+ESF/4vc+5pD7WWA74ra5oJU1rWoWMXdWZ3EhAj\nUiej4a5wwaTryslS77zh5rsTPXYAbdwSe3jK6PiwwptdCmxz29vIIA36Kbvg\nYaMsDsVr8NJxYKOpx9Jg2zNtl/8NQ/EbCzRZ8tLh7iwL1Ua4EJXheg8qcgM5\nFH679Oj95Qs9BZ0LgOLXrDvJGgeAhmDea5/zMw42aei82YcdJiUfDqu/ePMB\n2izcDyPUrpjmHRt3bf72WaxpKVjrnvUtQA216+it4tf814dmM4z9qMo+z0RD\n898r+34kM1oMjV7gW2j9YTyiJ/cSa+fKcaeO/UlJiwZVvYY+pYFuw4GdFJjG\n2RjsE4ofv+UrswxmrMwm54BwSJkO0Y0x1jKHij/pZyLLRjNNmA7e6Tlnon7e\nMKxqYzsikciE2pB/VEb2tSL2KDGHlRXXq2i8G4iYppJRgjh1A9tpvcjs0TYh\nBs3Hem3ZFZtVSHAc7Pr8pO7fR1WUiNxxMfbnv6u1R58h0RG7+F0C/ANspEOf\nGCET\r\n=bh2T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDS5EYWI25eo9vf2pOlDnQUdwRkkAJ4tmBGiVVPLG5+UQIhAM7XEsdu3MeV036rNOXbWLJSDPmxxXKT2vmRM0YfOhnh"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-a6b8085.0_1548999627436_0.38630368463071907"},"_hasShrinkwrap":false},"0.0.4-136720.0":{"name":"graphql-toolkit","version":"0.0.4-136720.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/lodash":"4.14.120","@types/node":"10.12.20","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"013672011f5e1a23d26a41f9778213c59049409b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-136720.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-+wg3G+Txw2tcJiFcwf53jlV+tBZgpMja8WZmXZVbTEVGIGKxmBG9AZ/F0mQX1KvUCxhT8CYcCjXXyTcTesigTw==","shasum":"1fa1573a421c5e701edaa848a22097d64c92aebf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-136720.0.tgz","fileCount":115,"unpackedSize":138201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVeKUCRA9TVsSAnZWagAA2lAP+wdu18ip+OxjU/Ng4Yb/\nqNy4cXNziCD1nJ4bEWbJGsNqCTgXY+aPHTimsjNh0c08IjqkriFGxMOwTtgf\nrt7QtbaMPQFrMp12z1sFbOtaIrWLp8R+Kya461eIw+wsiKWl6qa/19Hzd7S7\n2Zm5CtptvFAo7lvIOZhBd/6D1ze72TCOQ8AZOdka0QNAQm3QNFbHsIFu4c5f\nQYJJHHLyf1G2o206OnDAPALjkKz51EtqEpt9Dnpfnc7yBbEB8irGhnwFJoTd\nIS1Az4/C1KPxq4yDFFM0WWPCsdARGGJ9zy/Quiy9u6jCPDEIivMqSbd5AoRs\nKaO07kFDA/AoEqDyj8ZRRKhPJcBoDC5/XlN9CUFCNEIUo9CeNE0pjbtMcdxV\nHx2l2myfoSWRVzW0q0tIW/nGs+IaXs+20sIjbGuXdrEjOjLUkSZ9cQdf5N9N\nQiO7rHJHPWYqSE8AtLxog0T31YvSXHGb9iHqdm1Yb8x7nnT0+8LHjtOe3r+a\nv+C7cGzXU8RFzyfuUXAsL1cdBanM7KL7gSwSaAaOaUfbtjrvKORRCyRYgcmT\nwpYk8f9wfdg/lT1h1q4idIpMdZ3eZZGw4sY1UWJ+rf4esK9Cdny1hFUSbQBW\nSjxhdE+1sXtMXVeZZO/C8cTGJSfs3oskjthnQhMfmznUxlGCRypJyp1iipfd\n4bC5\r\n=JGzP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2fOt3v6R+FhDVuYr9GTZza5KAqtEeN6uZfJLxNxqknwIhAK9qfcr4F2IdWKxptHJD0hQ5zyMZNVPWjdEB6ftkdkkj"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-136720.0_1549132436176_0.0013305144539830227"},"_hasShrinkwrap":false},"0.0.4-1bf2a79.0":{"name":"graphql-toolkit","version":"0.0.4-1bf2a79.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.20","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"1bf2a799dcafd1cd5cbfd653ed6359f51e81875d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-1bf2a79.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-GrKYMW76bCJsFYgTcjwnOrOJioEimIXcrEO4WWOjXHwa8KGKHqYGgdAVGgdqn8DrsTD+3lSKFTMt9tWvViUmFg==","shasum":"85953a39dc45af4075f072e5f813992324ee9f0a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-1bf2a79.0.tgz","fileCount":106,"unpackedSize":125610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVojaCRA9TVsSAnZWagAAF+cP/iS4yMVaf6a76veOVraj\nmqi6BZZJF9n5AtMxk52qeNno+3Ec4HsZpEk5XyG+cb4IneFWV0B0ODWzMyA2\n9mS+GcWex7F2V3xnBVySoAbaGUGcbQnHMx3Q8Qs/eg2ud3u4GQX6sn12TMkD\nRJFqvidea2V/0qWjR8Apq614eCMQYBUl3cKiclNYFLuwPLEzDwkj5+eexBK5\nfjV4HZDDgWFN+VpjCfi1R5DuxKfBeuv2MRI5s5tBi5KdH45J2C3I2pM3z3pt\nCkruxlz2XjbRwtjXAE/AqtB81bRH17+ms30qD5Hoj+Z5/s2yrCt9AeBjk9XC\nx0q/rh5rp3eqZ1dVGhBxZv4yvUYOn6XLDedauW22aUEDsqCWumnCtfHyqvhJ\n/hk2Qw0/hbEuCF34E6tLQun/5oLmleP1WCS4w2JWaGCxSe+9vOxKABrt4Ncp\nGS22cYzxMUQYBGHwDWPAv4neJdRxUhNeJ7p6AREwCcgTPpjjtvwNJ+A+J0i8\nbTk990pOfMOxOzE0wtK3h+Meq4RgGndAflIvFBDi9FZHtzNAmMBRvg7856PP\nwz+1DE6zeHz4sQpJPmFAeETSsac+Tr55KIVfFWFOJ1qwt63kieo44vBy5DDa\njkbSdhmiiy9hEqliQ7BnDPaFnw+dIw0P+EsGpRuNr8yD/Ee9JAieVjPiY9Fx\nMlgQ\r\n=nsbH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBd3cj6WeWsdfDCodPaIkZIxpbld/M0F85aI0vLr1McaAiEA/pnZsDBnQOOq2vXK4K/5IzOTpkbAu+BXeY7vBmLREi4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-1bf2a79.0_1549175002184_0.26885853268823023"},"_hasShrinkwrap":false},"0.0.4-cf5457c.0":{"name":"graphql-toolkit","version":"0.0.4-cf5457c.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"cf5457c19f0d85047e7c67dbfca362322dbfc9fe","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-cf5457c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-8Yc3K9POCXhssc/aTvHKe4QZq4mLJq4yswIkxEd0Ckm5lVLrUE1flegvR3Pce+TgLilfUguooM4pOnvHGzmeXg==","shasum":"d235513038e88b5ed37f00a134c9f53a1aeab32b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-cf5457c.0.tgz","fileCount":106,"unpackedSize":125610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVojiCRA9TVsSAnZWagAArmEP/RKvaLVQtajupNpOExyU\ngoQ0y0wAdPyqwBsjOtJRrkk7sYELC0GB4neIuF2XuqSwe0DP1ob0SjBU93Fh\nH39wNwZuUsgdZyjbU/cB41IY1js3TNoqirYvRGI4dma5DFPlg1MxByLrRVC0\nAWe88DfeepLqNAxqpSfPrHxpLpwoMucp4xtCqKL0xNVLA6OLZvCKq3WUzj+d\nM2BVpCMQN0L6b70yifDBE0fcQd+1WvhoeWR1WnwY0TnhzbTnkea7/kUKa8zI\nJyfyWATRcK7H/u8uKT36bcBHr3dYbg+odT6n0qZuTr8MIkrPwzC0tg7BlHOj\nj6ygC8CyE7P8BOqBaim66h4z2oj2TdwcI0O3l5cc1S8XwNVFFit4PuDb7gsT\nlTuiWCTEIn2F59F1FDpaNb2bdjLK+uh7qFdbIQlCvvtwIxOLqX+J6L2yRomX\nmXqUpN+pEw0l3sIRsacrpu/GzMe05HOGGYxNnoJR6N3PL9srQxRgJ9OhkG7q\nUV+Xv9jdaX5Qddy3J9ovDLf2pPfFS0oiMDn4akoZQbTSfv7kcIgbJxIM28wA\n8e8KfwBeVuv3mHcIaIoZj0qICnpW9EJt7Rd+WY8SIC38yPd3fRj+Oxl19nOn\nZGtcOTyc87pdevT+QzO+V1Q/26UShKjAH5W/2y5z1D+Ohx9CIBxeNhy/Skta\nNi6q\r\n=Dl0Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHFlgeAwH5Nw18KjNFVAuwwOIelgcIzp73inI2EaIYKwAiEA1d9gxJkWFOOxE9zaCaYtIPOhgpQTBAXHUEbNETowQL4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-cf5457c.0_1549175010361_0.1372995660927807"},"_hasShrinkwrap":false},"0.0.4-8ffcf11.0":{"name":"graphql-toolkit","version":"0.0.4-8ffcf11.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"8ffcf1121debac1fe11f746201096379b63ad238","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-8ffcf11.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-pfi/Jek66zmp/ZesG68Y7tCR+8oQpR2lLCFMVsg76/yYAC6fLM0iGHPfybNB0r9a3WSmZJxWzJDCYZROSS0wZg==","shasum":"a69c9f45a561245f39c98ededca386a286f163b2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-8ffcf11.0.tgz","fileCount":106,"unpackedSize":127463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVqRVCRA9TVsSAnZWagAA0GcP/15uLAynGHoTutKAh5gi\nJ6+TCzt18XnQ5BiJy3v2SK17rs6F7OhI6OSbX3ttfz3NsAj3IXes5VWF9b4x\n9ZNap2fu5OtHy4XB+XwG5cBZ1GrElKjWd+w+e/BFq7lVEGPM7cUN0YNkGRKZ\nOG0CwNtG8BaSIVH3Hzt7AnFbJXXiqHl1Iii4eAcNJ8BYAN07FDCJx0JmUoXz\n9OQZXHvxcAeGDtPTWmXIWBJidAs/Uwcy08LsfiYxVudh1RLi/Eq73l2cmUZj\nuzR1Hkq3HA838uBNOookH02F5fjt0SVc3kLQZN0Hp5F9X7kZUHuIZ7TRfXwd\nCoNXA6EYHgydrHFh8jOYNixXqDezUCMXhj39twLrVTQ/S32OZQdEhHtFbjx/\nb7LREJ5P9g7rSpkik1D+j6nGWV1VG9hZo+Ki+VZ6skZR1HzmQvywT61Jb4Us\noUWHfmNxmvKd8lEWbZhp6/tH3xZ4J7d1tTwPPjqkxlUtZT7BeQK3NwDSKoqq\nwvV/6ktcHJcpcyfS85SlvKab9PrhBAZXZZ8ubaCU2qRjWEXw8wDMoV49OYcZ\nga2jVXyyYqZSLKMbrOvw2EGU/aHvVAQuOeNmdW88Pipb1XXuG+3giLnCUlQE\nt8g4iqnh8msjMMU97BDcSC6OgWkTvkNDTgOfpL3i53pi5ZvRd636aOcQVWwp\nlnp+\r\n=bW5d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJa0D+yNSd1lk3KvABeGsyO1ZUYA8S153bMjfS+uGaOAiBSoe81P8YhTVTKGnoTcmaPLeAIB6cbK4VVhRCkpATgnQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-8ffcf11.0_1549182036393_0.5166196249548547"},"_hasShrinkwrap":false},"0.0.4-65a7985.0":{"name":"graphql-toolkit","version":"0.0.4-65a7985.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"65a7985383f820c5b1d0005038027a5dfd306bfd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-65a7985.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ZHgZZFMn3o8oVw+FBJbCqWmSg0TCtd8zF1Qwt7pWuJdI2aZ0m6w68DYRln+13tYLPa1HMOwXDSpURT0V5whfCA==","shasum":"6ac570a56b56524acfd623bc3257ad17dfa0b001","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-65a7985.0.tgz","fileCount":115,"unpackedSize":140054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVqTICRA9TVsSAnZWagAAn1QP/ApTsJ/hBV3qfWwLt3uK\nJ3B1easxmlOejSX85gXr+GTx1CqGraKGz8Ds7QD3fGkmEEdIomKmsWXnIC+X\ntN+14xVX1LF4Ca00JeHtQOi6x0oky4EeVWc9gEy2pyIYdLlyuJoRv2/ud7Hh\nXxEyTNj1BwgfXaFF5BJ7EglESF4KHigRatbBhzABXSPE6M9ne2uQ6IVBQIzh\n/cPwAhdkc+88Je8EW8cqJEiG+YsCzSgfXHARdIX1E4lokQjdK14pTbUf8QYb\nafgQfGZtdxQQUNZNLUBMCXfme2nKXBuaj6xVAYRHhpuHdWejBw05UfP4PJmF\nwp9XiBTzF20AdeOm9XLWt9oALJEQP7MG7ICgiOeyIVNZxPd9zKqk9olR2+ku\nYqrjNOdYw9J8mmDGIFj43JS8b3vghHrhvY3uvjxCsv0yNO7bRhBCUFDvnpNu\nsSP5CBQfeVWRcnAVO8GWqayiiRWjaHkcRX0QLvZZ8l6CiKh1AXvWDhwtbIU4\nDsITun5aGhJfiUxxrMrl1rlww8S5XlDq2DGx8ZQ4ZheBj5TRlVPqbmY1vEeH\n/xBZENSYMwmj0JLi/MTRxI6aDGU0CLI5KbVR+yREonvfdhbJpYTzquVe17vV\n7zcbJJmSnNt7d2w4j/uLAUGjtxVH5s8RpVFHPKXw1fWOzuIdKTkEQEbOj/d+\nFC4E\r\n=dMH7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzMuwyGZImQxWCEFPw2Y398w4bVqzBtBJRmiHPp12/SwIgDnqAskwnJtGCT4G2T2S1kv1XiS73FR8k04nQcFLtXhU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-65a7985.0_1549182151523_0.7358377383147938"},"_hasShrinkwrap":false},"0.0.4-a3945f0.0":{"name":"graphql-toolkit","version":"0.0.4-a3945f0.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n","readmeFilename":"README.md","gitHead":"a3945f070fb47f3608c248b2efc3bfff77d47c3a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-a3945f0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-//MgbvClY6JTNDeLnVBg7eWTnYikpcRx2rXCyCPIXkMSHoQoQrGm504sFsdRUySRO7j25VySp3Rfy8NmhtCbAQ==","shasum":"d75f931fa2091015646d3f5e9f55f29b7681fa8a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-a3945f0.0.tgz","fileCount":106,"unpackedSize":128079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVqXBCRA9TVsSAnZWagAAUogP/1pkJUYXLYN8bcdxfnY9\nedudI2GUuXk4A/ISLc3GFcDrrreH1bofIZkgome3Gnv88xGCSMLQ1+2lJPqV\nhDnLx9AYuOpKOf7cAEihbx19yByJM0P9Z9ZonS/SlX2W/xvLNrgVsN7CFJkl\nBoDd0FD5jOcC4b9ucV3Z9QZ998U48RilFabAjN/zRVsvqeY1cAfjqlau5tng\nQRsYDPMt/nLyq4FB6OkiOiMBOdHAbEzUg2rxjR6jO7sM/UO6XzOMYXhHzuN6\ntz72jGMRwJgU1wdJYri5bZbmd00Ry66ASkl+VBVeKcBp/4mJuG+RkT4Kp+mn\nkMtGgcYXu85WGHfRt6A0nde5pyZA2rxh1iifin9JCtYyuKTkPA9rM3YVyECG\n02Y9o3d0TfUg4sLCalQJk2jpFc9lH5xu37Bsz4fpDNyCcSx5zhDaVJYYkb+s\nIiBB+fw6eXpz4APz3MCRwfONvjG8bTbJvfwKTvHuxP1HkVspQzL96m3XBILF\nFImi/G/f63mz6O5F7NnWodIymM48c4xektGKTkAeaAaqNnAHPuyJD7wK+1Ez\nss01FRdWkjOWXuIF0Yo1zg8VF3cmq6uNjgOajvVzReuySLyL0a//+l+5uWla\n4BDgynAkOdlWDKHWLZW0uPMlUzuY7+SVvjrQwZnOSSKaMxTkXaePLdjXWyOR\npvIj\r\n=MvDc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWoZO8TQFG85mOolQeFaYim67Cp6tAoLnzV0xLS3TyKAiEAu9c10rKe1PYnuLNOgRMaGV/TVx+Sol15HU0oMnLKHgI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-a3945f0.0_1549182401293_0.17035432886409407"},"_hasShrinkwrap":false},"0.0.4-ac5ee62.0":{"name":"graphql-toolkit","version":"0.0.4-ac5ee62.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"ac5ee624af40518ba118876e812a93122671e50b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-ac5ee62.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-w3Mc6fDLR25NWqY96FaE2ZhMC67aRtiGaZUlA/DR3upxK5jCditTpWZU+XCU4gNpegDvEqJ7fE19BM93QVJDsQ==","shasum":"05b498b791dd8d8d3cd0856244efbd38e3095dae","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-ac5ee62.0.tgz","fileCount":115,"unpackedSize":140670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVqXkCRA9TVsSAnZWagAAlYQP/Rv5JLyJRROlV2QZU8UZ\nHPMfEl8tJuLORBt3YnRizdFNbD0R6EYjE3UeBuzHsl/KJl/Hq4humDavznml\nEJL4UmUB4XmK8kqteWx6z62tRgI8WYxeewCipnJHrSu6BBnKetQv4ucAtE0b\ny6YyWtMxd0d539+AUP05yDbNc0jTm7wdakUS1RfjWSSRPUAFU2TEtFOPYQQG\naDBH+wBmTer2rkkN2DNYSTUHT3rQhOn3sIc+osGkpJ/N4zo+lyIDxdRDDpnQ\nhZkkJeeDuqT4NYRFkkw7d5cJTWevOf/lUKGH0kF7zjk5zXDvFLjJl2if92Ra\nEX5AQahXehdd958WvfkzyxoNB+1ScYXfkoOvCD6GNjbu+Q1Dq+Bp+4GOug1U\nxUgnUR+2SvKmqxdKcLDYcGg1lJfYaXyZMxdE7ovd9Q3G3iPm+5GBUFMNMpWZ\nz1BydxK3bQGAJYQreGxRnfGaVifZz2+1WCrzyWlot0/eaiiZwnFIfdfy+SWg\naU6GDi62MzE885WCR0ILeKZ9KuhsPQuNJBHTX6zsxY5JnvCKgqbpZCN386jq\nlLZrc4ZCbTrXPT7uY75Q6jO9bJLWKAEfNV1XuYFyplXnxvX1fHZVmwzwr7ds\nb7LoH6Ur0+G7dusV42ahapV2ni+b9oFJZZMTGLfQ/afRCdxXwcHISlbM+WJ3\n3tG/\r\n=8zWK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA3xS8zNhp8Hdj9FFga47t04ctiTDaiBfW+d6HY+PuwhAiEAmwIpzw+WwtlMWQyYM6stYvISrbkUbT6QNZV344gkWE8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-ac5ee62.0_1549182436267_0.8390113370457859"},"_hasShrinkwrap":false},"0.0.4":{"name":"graphql-toolkit","version":"0.0.4","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"gitHead":"a3945f070fb47f3608c248b2efc3bfff77d47c3a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-G01njlrqzMR37FzJl/L2AHjRVUn/0Ea8mYD0ITy+0jepRhzjzaKLo5E0lJMKr1kbv024b0hfdYw26tFpTGFBbA==","shasum":"d9c65fa2444b6a23b6054073e47491cea1eb8bf0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4.tgz","fileCount":109,"unpackedSize":131338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVqZ1CRA9TVsSAnZWagAASSEP/j2ZajEXNPrir4eGA6R1\nCuOAha4zXAtBKJ647h6p6Enll8yoEs3CuZYKXFG1YGreOqS+wlTmgTCQi5UC\nQ9beEG83YKqmZNwa0MDRb6gWd1EllkrRnSelg0nhOcltsR+Zi71toxQ+RcvR\ngQSMFmuvQQAo+JW39Dw1PNvkNTeHL2+6+J70o64MnS28f89hUOupaxCLlZTB\nSiQl6wakr/miEPHx26nFFB97m3XmkACnVR8ErnfLHwlfHXw9Nswt1vH56yRB\nZCLa9M9o7uJceU2iUffDrDJaEvLlKloWyMw2GIAziIGebZH0eE0lNXLKxP+t\niP+Fm+kBsmfU2z2y0X6aQL6D5mtdIlViUDCtybZGFT1A65J/a+WVSGoU0DVL\nQwrn6yoTPViPLFJXNytGRxv4O87jLV+X60vhnrbiajNAVXIKifxg9F53j2M/\nfqeANvZ+OC+5RUQBX9u/FWq5HOtadirkY10clU7uhbLh6vfV2KGurALPXcVO\ny51/nBtPCJeiIZRIRYOR3VORJLnxZrycAdptTmitW357eEJEfvy8c0sF+gNr\nt+CklrkFwoKMY0rLL8RSpvYrBFT2BPek06n496G+q5yP63ZEhkuoHIJAAFUa\ndYLggfszYDd+TN71MFHVYtEeysKszfzcz2gE9fI8aDrccA07m1JwIx01lFtj\nq21a\r\n=KxTx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEdMwSwF8Ha9/5VKXFZbsrWVG2Xrl+OGa0S1RtzBJxJAIgY4nYr/HyFAGyMU0/3QXFD0XPnHqz4uow2PdufW4xxm0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4_1549182580752_0.38324878599668843"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.0.5":{"name":"graphql-toolkit","version":"0.0.5","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"gitHead":"d4ffcf911c5029796f240a3fa93d6783327e39e7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.5","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-655RP1y8cn65mOa9EE/jnttczHE0lFXpOV1zYLTsE1A0b5j8RVuKWllSZBnnL2WHSAPPqLZ1oJEZV2uzSdV9VQ==","shasum":"9e6ebe3d4b33fc329e5ee3b7775bfe7fba2f48a5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.5.tgz","fileCount":118,"unpackedSize":143930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVqanCRA9TVsSAnZWagAAOKAP/jnRLa/4WHgHwchrJkZ2\nB7zlLSo+4mW52yC0lYQNsta6aq+pvdUss5aorye01aNBiGaAN4Pannp6qsnm\nCW6/oGNc4z8FJwe6ZpdHhyouUmwdtehCBtrpK3ttWewneR6HUi0MKHv+h7I3\n5OmIxSDX1PNTRpe1YS2eaBbDkOcx3vdvnulRrZxjSuIWh9Mp5W27ALZWtLVD\nQN+set72+oI7aShXk18rrFOH596+iXDaDEuMXQpIC+httcsvqXGcO4QlgONx\ne7YqWlPaeARXfgh11kPWGAfKlOd0EO4JOhXW46UekU7m2F+gzx9ZIKEoN+ys\nDW5NkEduOgE3Usi73mVbcNVc3fG0Mcdqffmoy4k6aolBjgHTSH4c65kxShal\n4inVOVIFGQJcXZ1IsOPwDMmhVtjNIPLPEEwoTJCrGH9eK1LefhWZ6mPn6EGI\nSuAF6c8T1ozf+rffNqRL4ukB6qmJsRy9tFCnktqUHuNA1S5ElA5pS+ZBRXws\nMoqcrr69roF8x/Zg8rp/irkSydQnEGvRWYEgUBdhQj6Pxd43FS00kT8n+4PW\nVT5to6x7aBYBAn7f+VcEC0MecERy00eDwWCW/nDBybudDM6LLD+CUJ+aVZde\nT3nsuigGUIbEijJiZBhn+CpbefzAj+IkiMk0cJwlN3CPPKA8ksOEJz03KKDo\nPAUK\r\n=ZYMh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICaj4ZqSwLXrFxL8wJnIowDR7i0P0zgHvxq6j428jj/3AiEAs2BX2+T5bm288NrDHz7s/6jsJo4LBDApIYa/s3f58O8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.5_1549182631229_0.35194246506683835"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.0.6-47a76be.0":{"name":"graphql-toolkit","version":"0.0.6-47a76be.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"47a76be7c4eb85f092928b8a15c85f07fa9d0fe6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-47a76be.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-S/mN6FsFG66ySVPp1LHEu4oXus0wkI9mtTUxfAE63PUbgG93y5RdkD2hyqAJi63B258X4npVKPGDCSgTkYMyNQ==","shasum":"c3716e318e9d287c60204995e3771bf0508d4aa5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-47a76be.0.tgz","fileCount":115,"unpackedSize":140670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcVqbYCRA9TVsSAnZWagAAIFUP/1HOXFQbpRtYsVl1zBda\nB7k16TQ0akSOQCPgLoWhFWCsNG4xFrBnNj1VbNFa9TZcrFhbX8R4Grnl7aQj\nO/QD2xo9K6A2y9QTYPi6PqxeeLIztuFbXJMjjpsF227D6KnosjCXCDEq/pIH\nrO1uPsb5S5YZNc7J5o0nYv1g6YOCf5qGXl/pxUs/VfHSDFXIbDWmYEwptXq1\nAa8NyXsUZmld6kCbX9t5yaEpqqXC//hkoaCk5cfMBr3hc7uBXMyt6b7OOOmE\nl+6GWzVCi9Vi8PnzD74Spcszo4ZcDKGUFtGeDZiXdIolbNz5Hix3E9PP5sdL\n3tK21ljQOGiAicwdA4zYN1KKpvUF0PuuzAOcVw4PlOCoZPb/m5aIF2MokySW\nSUMb+S9evDK94lu/ptjG4wsA806f9drTSrrxaeWmRmP6yUqZhL510iCHUNZl\nKaDZJrdW4OlBbPd0Cd0eMumJ81vXgvGv5VUiIufAQtNhOIPNGBpYkNKw5Cd/\nc4MZ2MaRuPA+IiR9NDwcRJz1z1f5uFmFhPUomOr0SHLwHjhI+d3kfIIFqt9V\nv9Y+zU87z6gl5RQVzqrNsA3gO4D7PCklJm7xZuSyYTfOox/XzEoZX2ocK2YW\nffAaaMhHyuWRmi4+AezwRy5EqO94ZA3k+gg5dKPTIKPW07vBJsxGGIb/7Im/\n2h3e\r\n=ejNF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBnYX+3raeJ3rltvzXtdnpLtuTmzRSlQKH9uybASuGdHAiEAs85dL6xWBhkYYlrP3pXSToZlHyAfP7TMnf2GsVX8p+M="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-47a76be.0_1549182679863_0.6195173613541305"},"_hasShrinkwrap":false},"0.0.4-008a290.0":{"name":"graphql-toolkit","version":"0.0.4-008a290.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"semver":"5.6.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/node":"10.12.19","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","ts-jest":"23.10.5","typescript":"3.2.4"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"008a290e0adaee53bdd7f1cb58359ffd492d26dc","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.4-008a290.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-cUWpKUAYFo6VGAyW9By21nCIxZyFUVbnayqz3TPQIeMD7fctl+UONE8H9FJ1nZ/5kRSliQjvyRiTwlxQ99QXdg==","shasum":"02857a6c48d7dbd6050400f203d20b47ea273c00","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.4-008a290.0.tgz","fileCount":111,"unpackedSize":129719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV+njCRA9TVsSAnZWagAAFkYP/RVmf6T42wnteLPcS6dr\nuS6KSO+B55wG0gYa+0wcfCoTQCFV2RnNhYBMHepFqnI5Na+w1XIf8ZLttDAl\nz+mgaej2liUb8JiVvJE5ioKa/5jpPiVLY9V9mM7ZMUs0GUr7BTFThrzlVLTo\nmB/sTcjeKt/zmtw27/TxmQPtXAQfgLqA8nsu8LdfogLqF8IRvmJ/0yfG5xJg\nThRkAA6rjFfyrY0SYXdwX/tKKcC3y8zRGkzZ7flYMmpgwvj8zij6yCdBx00Q\nMJUPPNHbA7H4upzVaLNR1r9R03IkpVQyLclNxhK/O1wGpfKsX5DH4+G2jsIF\nGi4khPkjb9RMbAKSGQtmGtIllXW7pNrRC7ptM+c5/Aw4MiXqa8LsnepBxKCR\nhmbOtpaPd6TQKJpwTTIfU5fAqAyYJUdgO382bcmU2dq5nroLggKYvvOm4ErJ\nEbTEqSlVGKPd39wrSymHhQDN/WGP6sIXCSUU9vky4Xak10/OSk/NBfYH5U1o\nSYvSTYYosOGyntt71eB13IYe5TLzJN3hCOUuNHnCyYMS/e5/7N0+fHmbd4fD\njshD72usC+OVZfxn+mO1owUGe1m78DxDvU8dPAWvoQALXHpecWZ1KA+TUz7U\nLkLAzVlkYjk8AMPpvMy6vV5Yd7mml1TqJ98i0II8lpZe1nmijg7E/wlcm92/\n9DgT\r\n=YWe+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFc9ZaPsjx56hhSc4yqkGvgz3wMm//lbKsZwwyGmjVqHAiEA3LNtp1DZUM9HLqtExqALulYepNNWOLmNcR4Hlm+kyQE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.4-008a290.0_1549265378221_0.6947676687907074"},"_hasShrinkwrap":false},"0.0.6-8cfef86.0":{"name":"graphql-toolkit","version":"0.0.6-8cfef86.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8cfef860591d6281d4e80ce7dc7bc37450e14458","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-8cfef86.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-9AEy35vqWaOD9YLkrnu4rNiBLCRz9YkB/IXxgYalaWM3/UO6DM+GpwrhA8I3QfIFjfVDIW7T6Qo/YSA9PEOPfQ==","shasum":"1aa08cf81b6df2be086c81c22043377bb372fbad","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-8cfef86.0.tgz","fileCount":121,"unpackedSize":144820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcV+sPCRA9TVsSAnZWagAAG2EQAI6HP0OzPRa3TM12wRDn\ngT6j2C/+kiQ5h0toer/BZLVRz+d9/YZ/Y1m+CtwwRwjU2W1Z0xFlHNVllNpW\nQxN7tnqFwcVeoHMDDs6+3zEHJCsubGCl+NCssgqM9jVXzWgcyQ79RAjg310D\nyCwGspHmkp38WqNSDPzH2hKBaSSS0Awk7NtJjr6M0eQhSCvIe5XJIoABvgoF\nLYRZi50EbSL5SmfTz7TjUcsED0luIl4UqyBiPpQ/TkcGG1EkW6r7Qs2eJB0q\nK9VicK5a5VDxjOycMdpPuehBsPew08TOq4fFAI1JY+2qYVwBUrWFlWgYQUUG\nWLLkFXy0LGxzSN+TTERQGhWzPEv8qEV1DW8DxsbkdjS8t2aVS5zCMQ21nrfU\n4Bmd8lSEXB9T/rbMfTlcrGfN8ZO7qsOTqjovXzZCBfux2nOl7pNZyTArfGTe\nhq8BSXiCmBm6VoFBVegHbl5KtwN3q0VRZ4KJzFwALNAx9vt/l13zFUnI1SHE\nMJtZs2pdYfiu2okjeof/Gx5Hp1Hz3b6DhupZnVDXzvBv3VS2scanLYpS3pKe\naNS0mQnO6VYEJFEmPbmtHyS6HFV3ujfHM2c6ucRUYwQDfxHhRpfYPL5qY0pg\nWVpSq6oyItKauzvE6780DPugUjcQmBIAUzYSW8m232smoQg+36/k5I5j64gY\nvct4\r\n=0oYI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEGy0jWAMPJrzktmw5Uzs/ymMNB/6GIRaQuojiQyx8yfAiEAm6xHHQM1nnwYYPO8Ufjzvm9u6U11RAFcOVV8P0UwoMg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-8cfef86.0_1549265678931_0.6606769128485057"},"_hasShrinkwrap":false},"0.0.6-1c46514.0":{"name":"graphql-toolkit","version":"0.0.6-1c46514.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.14","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"1c465145523b59bc203c57e4da4a2bfa2ffec970","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-1c46514.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-KJLiBde62k9VhLeGcAfev7lAWhJATt7djZPc0jnQO98dfvsgvQQ1/j/kOy23KQeO/0zxx2p1+s4Lw22PC9siAw==","shasum":"45487c96d2646bd7d76ba84600f5ae66f8df1d2f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-1c46514.0.tgz","fileCount":115,"unpackedSize":140670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWOU4CRA9TVsSAnZWagAA5+QQAJg7Wg3I9jF62k4NBZN5\nQ96cQqVC7pYm+jNb/rUBiwC8VYVeM/VBq46QwoYk814ToYq2ZtEuEx398iEq\n2EObFsm3pqkE3YvnPTk1Smymj3uuvWHu+9SzOohOthpwL6vYDHM8UktELBTV\nhB2U07aAzMSvJij+yDYWCQQopbtgznfjgckqv6KT3e7H8P4uS3YdO0t6kUwv\namsHP7UL13JRVZetHmex6xfJkg1Io9DpHIm/1gwd/58OX1HyVwiS96X6wYf1\ngwdIwlxuBf1//ou9FU+ru7O/xBIKq0uDBEqvlPO0uGhHgOqnmeOkUpSP3CQN\nSubvfNnRc97WB32vhMxxgd2Q9I054o7p3VkocrGQ66nm0/fMLhfCkGE+Uudo\ngCzPsV8obp8KpVxOvmJVyAzEyArNbVmbbse3DuNaoY9Jwpff8NPXy/tpBgH/\nasqb4obc0XlJ/8bu8470Eh5Gi9zTkhKnRBm8Q4We+GkoTtcqCW/mZ9DtUPLc\nFyMPEKpF3KrIPAzOLjphBVBUy5aCQn5FoG5zdFH9XCVWKNiu7vPdd58iF5JZ\nyz9V2peG/L7TcNJnmav5REAlFAtUtnLx5fB0FrUDEt96e8D0uaTuY42wlVfv\nTthSG0OWCeBT4eB6mpPZ/kI5nobADkVkhkPYpr2CmKR8g/BRwkWfwrzgaNnl\naHE8\r\n=1nm+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMpir8MgrdGJK73wYNQz3U7DvlfbTdJxd5AQ+NeBh/PAiBVddKLtkvfVvd6+worhuIMUzzv+e+XGvqD74O9Md0Cdw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-1c46514.0_1549329719831_0.5068717201424009"},"_hasShrinkwrap":false},"0.0.6-7614969.0":{"name":"graphql-toolkit","version":"0.0.6-7614969.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"7614969772ad999f19a0f6cdfdff3b5574f89bd1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-7614969.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-mkC/hztAIcMyowTsVCxVogtrKo0pZgoySuSO36Rz414qGbAbZt5Uf1tWHUcrRAZ++BVKEFPhFCREgke5CG1R7g==","shasum":"6a3afdb7df47e7eeae35bff29eb270bb18e6ae92","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-7614969.0.tgz","fileCount":115,"unpackedSize":140669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWOVICRA9TVsSAnZWagAABrgP/iMTcQ+wV9zY+IolPBIY\n3kFOJRb7HkKFg19Gdqkv5n0z5gmhvvlyjA2CgzNeGLIvp9f3UL6II8jFFSpt\nSGwCm+wvP8I77pB3T1d6BSGV2JGlcuPiJuYfadFe7sMO2Vqvpd7Tz0hhVRkj\nZKbIv/UqRt3vL+zE64xIbmpjPVuBJog4XR0QK9ATG2Z4duV2LKQrgOKKufqi\nwpgexPbKvjmX2O3eUm9NQeDSqlmI8bFcpiODtMFfdUnBaBrTE7rBrGdAlDFB\nK2W2kf2FTTgFNMurNM0h9OLg0BjZpLt69eO6pITr+Z/GSct0uLMvMQmJmQ2E\ngmZKPKG+pDfKRfLZhayqzJMPlIQfWR6EtPObCbE54+Hvpn+NabCsVBD93csZ\nf9JDHCTN8YDAfAf7wMtWwoKUF2ex5v9QmHWHgp8Cm5fzGDCZYhDeUiNH2vLd\nOpcXmeoOf1yGQIlW1FpIRaJvkpy1bSuEiRwn6nqjhfXMjdEXrN7J7NRkk+BA\nroEu9xo3+OxLNryfwsHEBHv3KzjAi48IiXlKC4I9pe27m+vkBROWJF1coh94\n5FZYKtrNeT5MErb7iCBUKy8w8McxE+Vt2Gjvm1+euOvMDMrUBXX1umCCO/85\nOWS/lAa7YLpvbZE5MGQM+KaucTCuyIL5DdTQB3QnZlvZO8cXQhc/ZiMixan3\nG2tc\r\n=w4yZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbO6p1lfegaKcTCInEIVrUj+MvaEiBOdHUUBnLxONYcQIhAIgij4v3pb9d8EwkJLgritWLC6myFNhhydqOd0qxToTQ"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-7614969.0_1549329736385_0.2930494355895683"},"_hasShrinkwrap":false},"0.0.6-d5180f2.0":{"name":"graphql-toolkit","version":"0.0.6-d5180f2.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"23.3.13","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"d5180f2b34cdd58f302fdefb6508004f527aa807","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-d5180f2.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-wKmhnK04T4AYxsrgbOECVvyjInBJ3faMRCef7AZyEAuX1js/vPNSdDXu3EldtDqLo5qF+PnrLOIDFu9ZhUYjuw==","shasum":"9c11df48e1e1bf290d2115e18dd11f3da0224a2f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-d5180f2.0.tgz","fileCount":115,"unpackedSize":140670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWa0WCRA9TVsSAnZWagAApN4P/3OKIHhgT+YeGPhhY5KO\nNdM+He0mbo+8wepDsYufyuGE9GSyExRmAKzU7jo7cAUINSPjsPwuo+j6hrGq\n0oqzA9cMhor/sGYcd/ImzcEnd2pCQhVnSSAM4wdVb0a820ZkZZuOM3x8MxSz\nXgfsLQsFZzGkmrdDAKdiuFH3S26dF//wMHfjSp+J8eu0aLCcCec4E2E4nUFE\n9kYvvh54ECC0w1/yvsKl/Nvq0Tew8LxzcCHRUxyTYxA3pIxwIGire4Tp28r9\nTBs6q39q9JI/FXQR5lfvMlWlU82LdPjV8t8rC6GrwNl9P+4wY7gZXDLOyo6R\ndutiCjgqFTs0ScIa2+Pkq5rV2k8katw7DAPsEQyfIx+IUHAovJm5kLx/e1SX\nnS9sB+G05U4HumDLgvLNAJT2nFkaySSvkm/Eb2RFImJXtHm7l78lTCkThif1\n0bXYcDjaosK4RYqtHXlxTfXo+Ty0E5fM/c0MvMrSsXk/hrd3ejs42jFImQly\nJaDqOcKEsS3hc2RfpETAlguzi764OJeY79VL2aOaPo34kMWqm7/7/cVRyu4y\nlDcg+vbs89xFbsqpO/BRGW7oZRjmEqZBSleV5kWa7KpdxBm9Iwtnlo7sXYTf\nM6tkSLNDVLhcrxrYwXa9C2pGkRNoRCxcNcM7F74qNExSQsjsGrG5Mizntk9/\ntSlY\r\n=lITu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFqB9LxnNuAcmILl7UmTA2RmLjXq4RectvJ/paZvqPJmAiAOo0ZbIaPJRe5Ft/8MmCH0IxlRpIkygVds4B9iWqirJA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-d5180f2.0_1549380885368_0.6723922400837268"},"_hasShrinkwrap":false},"0.0.6-4a99532.0":{"name":"graphql-toolkit","version":"0.0.6-4a99532.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"4a99532940587f54c5faadbaa16b9c9e42152c67","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-4a99532.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-eiU7k98Ag/BJQK3AEOCQg4BNeaPeSwDT529FLzZVJDaLiyRigh3+en/HwYxDuIL6KBOoq8hAKK5Uj501QEaM1A==","shasum":"57b5636cad0400b53ca9aa20528ae727fc680aaa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-4a99532.0.tgz","fileCount":115,"unpackedSize":140669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXFQkCRA9TVsSAnZWagAA/YIP+wRg1pM6VJ53Iw/H8d+X\nGvTUxwjjVW623++UMQzxywyL7jDXEi9Tte9HkZSEtoKVdw5QTLgKCwNJQ8Eu\nN60yHIvXXdTnUZRgd4kcFCwcIGNOtHVQKnFIUN+fwfiSaFky63SK7tX+37a8\njAd8ItvC8Wo9+zrlbOFDc2xjRn5jRip6MF3dm3zL6hcI8iwgHkOuVjF9wC8E\nYGwaLYi6QnD4wNhivv8hoiiDB/2RncYtkHucP8FtOnsTClr5pjnwbqh5kpQS\nXxRacUiXVgYpZ4xnslRMYZ0A090vHydOgCw/CfhFCtHn0zEFdc66FaaN1Sow\nQa24lHv4FE9yhuzms0w3hAQPPG18xaFYjlx4eS8E3GhZ0Wdg7AwQGi929xCB\nAD/un6O3rvgBPiV2kN51rYKzxC24xguDvxPWIS4V/ANuR7pF9Bs8wW+ID+fg\n1jyiub0ODraayerJJAcfF/QZMFwrZlvD6XtHls6Su2AmjAnRbGRU21HZYhez\nt4d6UGY/sz3xvtM6LBtTGla9sG/KPCO6GwJh3WCoEPhLQsyeqxRx2irDlHTn\neILLdEjEMoveT97XA0EGtvHJTpV8FIssOke4fFjCo0g0R28t5CCJK9STVviF\newYO0nxpaePYMMgtTRNFjk/YiQH09ieombOtSvp4dxvSF2cs4P8tS9J+X7gi\njV0L\r\n=3pn3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDGyKlFSr1FwyT84hR9NUib/f/MsjN3m66H0YNFII/CuAiAoTdZu9ShUAczpC/V5gqvTnRIhzSzsLutq/l+SR/78LQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-4a99532.0_1549554723767_0.02224974482299258"},"_hasShrinkwrap":false},"0.0.6-b52b7e0.0":{"name":"graphql-toolkit","version":"0.0.6-b52b7e0.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.0.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"b52b7e07a63795183922aee65fee3d057aa00eff","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-b52b7e0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-bmg6uPz8tTef03v7PYXKcpHTjOFcrPFFCy80fGFSLI0QRxlW+kGib4xpAcmrFqMq9Qzwn/RdI8SjYeraeTaArg==","shasum":"00ee1287685f81e6c43a82a8105841f7040d8db2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-b52b7e0.0.tgz","fileCount":115,"unpackedSize":140669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXFQpCRA9TVsSAnZWagAAGcgP/jIeqRwGEJxalxcBR420\nTe9TM5OW6a8xzLXcMoNoQPKXYWhHZSrNfpIo2lQ/nbMUWdaRT8bqYRbFIfq8\nUVAGPMEVoLkLz7ZUJW9xosJRt0Hy0cwY3XPpfY5y4bKbanJoiOVwY520Vw97\nGqfrxIZKCoQvBipAlBSie3353ZNcgwWZ84t20eYOKvDMzuOTE4pIa1XCzX/N\noeAxs60OygRvul+zg6YjHLlf9b4hdWDVjoR84kAmd5uQEsem6H5cEWZL66lF\n4cGk4YWmgbP9IZ/a+IaEfZYuTYTZ9kVNeQohTP51xRoSR7H9fqDJ+XmVTJjj\nlleMbXoi9ByvFSUF6cUKL6PxzHgeLbCIkV7GUqulrsfew5t7JaRhY7UJaDYZ\n26unjfcY2oMo7JR0tWGxhBsPa3HMGRDY6isTH0MzG9dqt16MwIogYsGSSQED\nAniL1wI1JDSA72633cmb+xp2X4CNKZOMXuwQ4TNl359K2mbR0fgNg7aBQ1oF\nG1MNg4oXDJRLJ+LIxvJgWwA1n48jpPSIqCOP31H56CFZ5442DXQsNtrJJscN\nrzsvF1QqHoST2yo6a105ttJIQTiAco6o9T1+toOR88kjQu/vb0djbREeRcV1\ntual3qek7JHN8fuHa5WdNys25iCzzF1/bK8WLJVTeBFRRBagYHBx7KCzDHs/\n63Wg\r\n=sAMR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCM599sPZi7qo3HYrgpF6+Frcds5VDRoW+FCJNmEEsrgwIgFG1muMG2WsetcEv2deGvCSbjSSCuZ+asNkiJ949hz4w="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-b52b7e0.0_1549554728280_0.7959445343027804"},"_hasShrinkwrap":false},"0.0.6-ce0dc34.0":{"name":"graphql-toolkit","version":"0.0.6-ce0dc34.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"ce0dc34885507e2d96aebc329375708cc07d5186","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-ce0dc34.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-0uwdtEcDk4888v5KwRXMoXwyAUyl1HswBzsOeMi5RZjJ5voRnvzg8yn6G5oxltutJLaSbF+zN+xwNO9q+RaBXA==","shasum":"3a0516b48083baed5be50c146b548376fea16f33","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-ce0dc34.0.tgz","fileCount":115,"unpackedSize":140669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXIiTCRA9TVsSAnZWagAAdmYP/jE6+7/80rJJxuWY4PxY\nOTpGzxP2NzSZ31HNVUhy5DPog797WeceMi8YZp/L2gv0m6Z278xWCdJ1ydbD\n308Uizn754wB2TtZhkC8pR7n5TCUnYenfPm1MjbQ8JhILxOkSiLF6O03RbWj\nsE7waWLb+RHlRcWupKEJQx4UM2qVYwxEkSEkK2K2OYq4zmsJss0Cufl3xF2I\nQmlMTvW0AvtYUGGjJtmRHdLq7gQZnesh41nee7+y9+npR7HG09L58vWQxo5t\nUAneEanjM3bUbmHVTizVmlWVP3sL7QxOb1uCTFDWT804elMCUi2CyfM3np1Y\nXCrL9AKJNagNTtnmRCFa/C0WQ3AggPHQyQDSoJNKxsB+oZb0uCVdTgs9dFZY\nJ5zucUyuMS32qPgpY/mWB7xHz9V5t24OvQumRgW55r0ZCEwPg88kGAdEFu0q\ns1co+qgp56UeY/ig72j4bLTLfYPtCohg8XEplF4kFYDB07v6BX8GHmgzBT/g\njZGdrBauWcOv4y/yAua/QypQsyo320bg8dh3VAaXvZRqsclxBP5eMhvKuJqr\nEmHCIFZGtuobPXXPCc2HShfVBVP6nKZ0MlbvSrbwsVvzmIOWFkWHNaoSGrFs\nSFo+57Ar+p5T3VvIDfaTxZJD4bGVEmZ+UlQt+qBeiwOlfXqTR3DKeiyfO1rK\nXSa/\r\n=zONx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNlEWBcnmwOrhZ8FeSK6eKprvorUY8gGyp6CHyOlNBRQIhAK46cbWeWPAQEJpG3QgV1vtkH98kh6277CYEt8bp02WN"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-ce0dc34.0_1549568146527_0.6525200647721934"},"_hasShrinkwrap":false},"0.0.6-44021ea.0":{"name":"graphql-toolkit","version":"0.0.6-44021ea.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.22","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"44021eaa10a0709fa61d5c05fa491c0a9bb08714","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-44021ea.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ayf+lwSM6Lp5z4rm17pqyWozwiFKMNu+xpqpvPKV7f+sCfoI14SaQ+/WcmjeuAnO7Ua2nu3rksI4pXW5C6bldA==","shasum":"d07392727880a894ac302389b3cdaceefaa17f38","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-44021ea.0.tgz","fileCount":115,"unpackedSize":140669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXNAuCRA9TVsSAnZWagAAAQsP/iqpHSusE4Y6UFu4dca+\nOsMxoszTnx3XDVmj+iENNRlQCIhGR8Ja+hlc1k0ouvzv0NJXz8hjnbyEc1KF\nfHTslMwfr9fAhDLjXwHf4xR8jlZNfg7IHOr6mNxckJG3lnMJ3wCY0RwC5biD\nkSyhSO2aJQ8wWgjMQGiR7r1MYAk+MLOKa1hZ7RyIcCUprFbdG//CXa4N23+1\neT5WfG8pXDa4VPnU/nbJsElblij63rqXOSvmJWZ2Nt+NGjNWgoxbnub2KQsx\nyxE2GuXifh4i2wGk3SH3Zisua0tWt/M9IOO9PPo8Ww82CjulPAdhOS0CpiNJ\niApHN9SvAEA7egcqWt32MBOSyX1LQP3C+eL7ZoLZQGKjMornO6L3juyAsblS\nU+zf/f+ZCTn0SNYZWLIxDuIybGGWcxjiSVaf4yXjOxn+RjBtRCFAuMunlC1+\nhuiaSaTtfrGA16l35tafSJbVXSN2f/eP07QUmsPZctF2/lk1c9KuGqWMLS+i\nQgCAW24/kK356tD3vl9HVxcR7eoJLVV0BogK41hsqB0ghDLYMMy5bHC63+DQ\n+ZY5BVefI8ZvV1VBSeX/ijjFEMrqt7DBTPDc28zwGxgttZyLIsIyTJiIPQBZ\nV12aPSiBNia88HkHgDLyTEYuOJhlsCDdbNTZELJpJzymXTBJy5QgafRMVt9k\nrh67\r\n=kvDJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZC+WWNqWBKNw5yZ9wEtz13Hmis7GAoP4G9wb2pPt1NQIhAPMJdf7yEKEbaWJxxKkUT/hS5R43WDpGfC82dxAamKac"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-44021ea.0_1549586477337_0.313146102996009"},"_hasShrinkwrap":false},"0.0.6-405e218.0":{"name":"graphql-toolkit","version":"0.0.6-405e218.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.23","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```","readmeFilename":"README.md","gitHead":"405e2183bb162dbe35ba57f206cd3efdec30cf69","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-405e218.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-T8ar9qR5Zv9wRlYx5PojaEkRs9D/9Iu3bDlExz54SIuXW9e2X8PFzU4uPx9aSEeshLkHAiWdn3QxFAFe1uciLw==","shasum":"7eeb3906d299c75bc090d81753065c6ebadd77d0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-405e218.0.tgz","fileCount":115,"unpackedSize":140669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXOhyCRA9TVsSAnZWagAA4K0P/ihZKhQcD1+j9Td9ZEc0\n9TICdgZUZEj0BLP3GeQPeNG2ptZcQJzuiClGdS/IKsBl1+KFdDkObajaekEg\nE0sA6B92C7n8tq3OlGeEJeVrIFarl7bQqwzo/OzwcxhA/2z3OH5Qyl8N8mdL\n6TibgsBsZCXalEhb8VId7ZC4iBTYlNDV650tDk7PzHPX1UXNZAMwP76eZh3E\nWam3gOlgFClP1u3BD8eQLSxPLlv08Kp19w2/kBdUtMg/6Y1EqvNj/ulAPvCH\nxnBD3BXZoJvPTCMi20ytvnycy49cJsOeJtIQ09aFeMeD/X70EzAjv7Cz5YEA\nLGpTIayXkBCFXy1ahsrnJXMKaWvZUdW03NF7S4ymPYnXc9El4vI8iANKRMX2\nPNtAsRDZGPqkt80amJd07oDl4C33vdWzIgGoTDo0DJYyMm3FbgCUDlPRq2Y0\n5Pn8Nxy2m/VT0roa0yyWqUXZ98va+SMBfLIvAy/HWKRp8bbAaSiABsnU+OAC\nXGaf/g5dY3p+KKDD8SB5JYMTIvDFkZiZNLKBGw1iCERH6ONG7mb+rFGX7FMn\n4uKkYOjaBcJKmurKOyf8vfEDhr4W+0QUqnRBnfx3EeSNWZZsJ2UlZm1dEttv\nfqKqUYHG7VAyOCj31DSwqMeVgApr7ntVNeRnbYy+ofIKnV//CrDdJUq+waZl\nD2Vq\r\n=1q3s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZ/zWGjQTYziQLvOILNb/ZQUSjz9CqnzA9O5mtHhsiSAiBm76QWBgh05asMIyUOdKwEcCqZ6KPEDdgdzCWtYMA+LA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-405e218.0_1549592689929_0.6016914041506649"},"_hasShrinkwrap":false},"0.0.6-4ab4931.0":{"name":"graphql-toolkit","version":"0.0.6-4ab4931.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4ab493160090190a70c0b1eed33ba488b6338585","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-4ab4931.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-zSktdxCxeYJIEEFf0dCsgvw1+FUkBN0+Zbfm+3xUfxdmIWmkXZqoDrzeEQ+cNTDiLaGi23cov+XlcRvPi+kGJA==","shasum":"f648f64f4238eda4d09a30bf5962349cf8babf25","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-4ab4931.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXRNjCRA9TVsSAnZWagAAilUP/RHdUEVbqhj1JqAn9QQU\n9Guz5UykQzbqm1IE1iUrq0mCaYZsHVfTC0zElTFrsTGjm3UYjSfOhhkISRyG\nffmn/32eaT8WzZYu5vbgCTr5De/eMiXebg53w4aSFJlB6KEgLcPX4nN7MvpE\nlc4K3hE4vQSDy/8glsdqWkVY0ytEoD86RRGV7yVJAIvVsw8VfsJAvuqzLTWp\n3Et7hlLEHr/KkE+Zbrp7imGF3rnTZ5vOOWkN6mNY0M/Ebgxvr44ZEGiPxg7U\n3I6STqVks5RlUgJDV03WIqrbeBvivzyVIb+4j1OlFxDfXzlciQLBgsPRuCHe\n8MbsSkLwK82+3sFfffAWPnKFNDkdm+0k/m5NwJ98c2x6zTADlyE0gn2+itAd\nyqjhoCYCpQZRtMCwJ6Y4ly1Yo1XKvftB9j60i8ZlGo/ZNk/QfXMX+1kD5RnS\naiuoz0PMcnnGQdJkwI+udRoAxD0W1HpoHzAyQg8EwIBUzY/J+ObTxJhPfpKA\nTHtr0NLaE14sejI84QV9pjZv4p/x9Cx9Kl54nwx8lPDywfOnm23ToRayAfZZ\n0yq5OBAdnPhpu4VEMDsxFIbnig+lw5cBIAf9Gz8xJ7zXRtLoEX2gtzg3ndCu\nUqPFR5abkDsAWQFOATOROuAMa42RxopzGnUjMG+8AiQxCpQoFxjB3lA2nqeM\nx2jz\r\n=Repw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXXlt1RsGxRtoy5iE+FhIP03OoIN+O0v8T5J4pvv2znwIhAJaX0/XQNDa6bFmIsm9YFQKNb+tXHEOBGmizo540dAmx"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-4ab4931.0_1549603682909_0.2407335320020132"},"_hasShrinkwrap":false},"0.0.6-e089b8a.0":{"name":"graphql-toolkit","version":"0.0.6-e089b8a.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e089b8a6d953b2a37648edb8e5a6298e9af2bd97","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-e089b8a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-HHTMq4W1czfAYCqT4YcJhWksvxsai/cNjz37h86KhKH+mAF8Y5GLfqhDPEjf58a2tUJ0867mXc/8QCob7lEYSQ==","shasum":"2861e80df3b7b2629e78443e29fb036346d19eb6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-e089b8a.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXTcHCRA9TVsSAnZWagAAdg8P/1Ln7fFogQ7GsGhAIByM\nxUfDQ62upI776MAKeTPpoWqOzlYB7Rh/Pd1Nv+JBY7KdNTz2lh8I+OoDmYC6\n5SPRPHUoBo4inBZVtPuev8Xj/6TdCoJTK1eALm6CXACHYnyF4gEzGxkzP9R2\no4tC68jHrx73uOYZ5IbGmDp5reOFC6z/WlkzEAKXsCzQUCTM71OEyejTbwhk\nUa6h8ho2hbbVeKZVbap8zGnYDEgWaWEwc/Yw/Lh1I4UXJx8kS2Jp9fjizyLZ\nztA5R9oNGFM6wf02tQbMJZJNOGdihg0vCxtGx7qgBGgg63q9B/QoK+aBGIvk\nsVecxP93dMBTFxIC6NAJV/WVIDgxfugxyW6yW+NhclKju9P+HnBsdD2COvwQ\nZYhDkt2JG0U1zxLAoMcnDAfDy32iM2m4cupDAwBkg1ENpH35myRjIt8lMBZF\nNkULNuv4g1bwSeQ3SOR6icbhJ6hcZmw/ZLfBp7ESmAEhqr7skhR/0tHS9hgp\nskCMlwUtJrXze0UPVKQeDJIsi8Kgnd/lP5P9EoRp1frS2fqc887pcGuYp+yt\n2IAIclGiZtzhuynR6QlJku+y+gg7A1hnMGJWDRuMwy1z0FH8pBECPfdL9hIK\nLsoDQuDJeuiG/X4Up0MKll67MkacbQZrPylEqKRWgRAD4c+R5PEhgkSt2zjo\n4TOi\r\n=BADb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFKp2+9C1eYDuSBAp22PZzHxDHzai+0+bg4v0gkdlKc5AiEA4r4IVFQWuHGHCw1aX2o4aH/vjs/t4TBdOhzurhMiWlE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-e089b8a.0_1549612806920_0.671955179567673"},"_hasShrinkwrap":false},"0.0.6-80f7191.0":{"name":"graphql-toolkit","version":"0.0.6-80f7191.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.23","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"80f7191a7e2b9fe37e5d244dc4c7b6f2382dce9c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-80f7191.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-GgsFbEVTch57gDH3p77XdTTuvFY3FJuq97oU9mplRcFW51WvLkLfuSnB1SogTMXzZPMwom7/gLYn9AuBiJnlgw==","shasum":"dc1b20d77ac5513213650fdaf59d589eca3b24f5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-80f7191.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXTcdCRA9TVsSAnZWagAAhJcP/iF54RiY1ImX8CaieTxc\na1FMN/zYAQ3eT/P8BI6uQ3hPAC6pXWuoFnFUcfTpciUhVo4w31YQJhnwms5r\no/4jJ1YlAEdrD7Fv8EY/aZNC/wx350WYVmh7JVSYVkFPCFCx/kThsyQLKr4F\n3lS6DItZ2NkEot6E0oGAYyYVU3vhtSiuNnxgpWGRZXxfEDsKBncl9NUpcyAd\ngM5suIqtZmLG28XHZeny7SHAD1wZnhd9vtAUBiei4QMY34WkLEilAYrkNLN3\neRnsZQqNYekiR9b6b0SxVqs7iOibKZocf2jdOdHhnyj68EgbPZ4iIMFenlll\nkmn3ewiPEwa35F5Ng7Yz1WSAHLsN86vSz/rlWILaxgAxHmC55IkKpanlh7by\nmfdfmSCLZEtvUSmrlzdU1uJ8KcWW2xKXBoxNbZaZ6G/I7ibCwDCWjHLBkp6a\nJpn2JnELdmtJHjuDswlbFQ4rEQ5IeBdmBrerkkFuMSAkPieTyRhvtHzJZlph\nif22fP3KKDAmC39ff5wMSvtO34+eo2lmLek8WABDfbH6+9qvFiwqaHIwWmi8\nc6hDHuvgXMFNQQMYPr0nzJjECesF6w3lo0wjEOCKSoFFJSVu3TxVDDmxazuE\nr57Qe7QnNFkehx2N+zl5Z0bbcZ4W0P6gQmZIXY/BQvuUjDGkzitAkuCSHJJJ\njldA\r\n=3WZK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKE5Q8k4UED+/FJBYtbMCLQ9EINJiQsIq4T9nEfzQifgIgVrKbcppK5xO8QujIqfcC3+eyxMI/U70byV05Y13ME8o="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-80f7191.0_1549612828736_0.861945573352751"},"_hasShrinkwrap":false},"0.0.6-a9f1c45.0":{"name":"graphql-toolkit","version":"0.0.6-a9f1c45.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.24","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a9f1c453c5f2b094f541d100c3991a512444c80c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-a9f1c45.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-9AhqUHn7GmosDydIIeCrRY1Om+DoJY+dmYSRl273/BawVtRH+8EtOC09nD88PXAoyyslBvW3SJpbr8PANgPnwA==","shasum":"7e0e4f49a845e5e9b1d4b45bfba4b0c71ec7ab60","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-a9f1c45.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXfThCRA9TVsSAnZWagAAVoYP/0RUMUZ4DaLsFnCWmv/i\n9CcUdn+ovlWqO1c3octnbfo52EL3MJCmeqO+19ApQ1PHl91xUGZ2O6rAysWo\neQ/ALwJQuKZXFQ7lMsgHrfsgUGcaPKT3tHltzpIQWpzH2I4p9zdCpZFNrs4F\ns6QrScM66OQdbiM0omNql8+8Ai50mt4ZUDCz0Bm/j3d0f49vf+A+S7HuMMVN\n+cOSqPm5elECj2JEsQ8sPPg4zF+mWifpZvmOu6k2dZxabBmM0EX67zuPfcUj\n9CtSsDLLpPHqeI/K6zViQGVfIML03TSQFiLpoOhA7HfANWdLl4l9BXOSqNjA\nHdqHqB1CaxzG5ZSqAljZlwBbZG5ljoqCTMDU3U3SCBDrpSn/ISdmOjxT+nxa\n4Xm7z9hV7ym6FzM5bAByJ/e0kCey3/br8pHY6xLevJ10dGvoFsXOrsk3YQb/\nHT8Ov9B23dkke0gZ4VxRrxHswm2wlBq+3Tv4NqC0SlIscT8sQAyomKdD/zuA\nC5I2/KLRQSD49jxXE5FYalPCiMh+auoyjg77aD/UxRhZ+9715qvYOv0L42jl\nf1/vCjqO48W8LO/sl6d6JaG5rNu1qEdPpsEGu7kYFWaiHrC05EDE+cZE/9g4\nDmBk13IdJ3LqkGVnr+iVqaD58TiG6hJsWsGS/mevvCB0FOCx32gk+QgWXiHW\nCH//\r\n=xxDT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW8aMHGirbqtJwz9GY+II0VwuBw/lKDVMo/AvBOvz5tgIgZWIPxLzDtDXAzstwtKuohgQBEesGDWu0UdNnuZAu1lI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-a9f1c45.0_1549661408962_0.9709019549248701"},"_hasShrinkwrap":false},"0.0.6-58ee6b4.0":{"name":"graphql-toolkit","version":"0.0.6-58ee6b4.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"58ee6b456f7f4b169e8e203bb2cc566bcb659886","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-58ee6b4.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-2pdhmeOI+QWRfZy+tTVllnsxGNH22z5FtzFS2b5SOfxlS5wuCiR5IMcIwkCLH/zXG5kOub9Ez7mYmuJXsSCZAg==","shasum":"c28e29945b38e86b593071f73417dead2514f239","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-58ee6b4.0.tgz","fileCount":288,"unpackedSize":279296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcX1VBCRA9TVsSAnZWagAAU00P/1Aawi5OCtetMEAYUjWg\niI7gzDd0HyAFCiLyDTLRWpoKIPIMZL5Qs+wJpU4cOp1wyQmrL6r6dwCAIvX3\n6dODLbgXO7/S+m5h0mMozSllKQ+CWeoQfufappQN0GmZocjiptlm4PHeOqla\nMB8re8Ug4m311c8O2DDRtnNUEjdG71RslQTfytncU7iQs9CsfEre6cIMyniV\nQvcezmNSmRacOrHVyC5owqjfy7J6JbD1DKFYSsUEy5Onv9KQqWyZMHfupyIP\nb+ZaImiqPcMBh9WQeluO83fFdV+Gpk6T75bsPbp/eEZKx/TQsqBeqX35/Pvy\n1KfWeH3daSJKbkh8z7RwQ4chUGJqcucaKb6pX1141kmIrxoWp4teT0m4nkYx\nzp17yAJvrQetQM+TlZT3X+dbfTA7IXKEKFonGcgT+vet14s+LKZYWsPV6YBV\n9n9LW9gvtLKk2KmppOfiL8t+ONGTtXRA+3g3hVd7od9veymTYiJdJ5O7nRKm\nWZ/9zveFXJ7YNV6voMNZaFMmSvkJP/WrgVXJkRDT6QQb5kMF1Vl6BN4tJbs9\n8iXXNAkxrLthOrTXdpj4hKLYnGFn1Lri2b5qrR5LcH5xAP+SqLv5VFm/Yc/z\nrpqYpo0E4EiMlwu7qe268j0OCerefYS3Qqf1kBfEGHqWycQBpEXJUqxwTZT8\nyT1m\r\n=vxHL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDt0Gwh/EWQgpV9V4/2qxnVBth+rOc15Tua1pevWdGPwAIgNDas8VRLWNOHmsNqlThQkXEurRT+ldEFlKXku947Mvw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-58ee6b4.0_1549751616357_0.5786275493811921"},"_hasShrinkwrap":false},"0.0.6-6d690b8.0":{"name":"graphql-toolkit","version":"0.0.6-6d690b8.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6d690b85caeedc92ca839a4899e0f280604944ae","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-6d690b8.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-MEiwD6Q//gDrwH4FBWsjpFj5GD3mFAR+ihbOGZLfIWatDlQE/sSMARjWD6A8GQCdjv2dovBPo6QN/iYLFdTm7g==","shasum":"df43f12a5876da966b119455bc364e28b4be38a4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-6d690b8.0.tgz","fileCount":288,"unpackedSize":279230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcX1nqCRA9TVsSAnZWagAAErYP/ApeHY4GF1HChAYnA2K8\n3Kde+2X4DSbWhP9HicPw1vtxzVeaKC2Vy7HEx3nPR7ZeACBvj7f7S8ONQykS\nfPc1Vq99YHBO1k/wOCSnY2B6KMlMx8aIrwaKu/7PXembSJsphoxJnQQwKCUu\nfsQL+LtYhbbhi2JBzlW4V3hdjjzMy0Oz7aQxq3GPbPydHBbEZATD3TCdhnSK\nVWbduOzfVneHUxgJY4eiGgbRBI6HA11DOowUFtY7BifAKQbf057p7y8qvNM9\nWM58TXqXe8AOghOa+m6j7Xz+tepyNRbec6HDIxpMkFdtrKTvXEG14qkNvNte\nnOIMf2HJWH1AoXnjCR6hCU6AqTN3Lefns74Mwlzhosx1IKv4+CwJogr/bOBF\nL6rjRykiwgiZt82HWlvJLPxzUvdQZO1FGcO/jHo8jW64QPzooYQe3GHsqwue\nFsZxe37VgyIdThxg19kSH32DYZ7VZz7cqnTDntbF8A7Li8Ip7aHNpEL2p+7l\nsoyXBEXBOmkGIt6BHvi3q0CihfqIcSvW6rMnU0p8mQVVBHpWK2yfLIMBZumN\ngpB3YvIZ7jogBPOSJ1WtszdWgNKCfJ1mC6KQi4D954hcusRhU0Nj/LZvv/3a\nG//fX8mFyKMWsmQxhP5OV5VKHXNlsc8cN9xwrMfm+iIx8/0964eKoKNqtaQK\n8qg+\r\n=FbmT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA/9ch+7R3ocB8i9f3Qbwth5iqnUAQwMIlQlkLM9ooW4AiBHFW5V1yrwW3CbfQ/SA5JRtKsU/LffaVqTF+uTuDXxow=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-6d690b8.0_1549752809665_0.5117187294495171"},"_hasShrinkwrap":false},"0.0.6-fa36d54.0":{"name":"graphql-toolkit","version":"0.0.6-fa36d54.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fa36d5432555448b92be06e9c615f5b0db26d0d8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-fa36d54.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-P4ECaiTUGa2c/DnkrSQcZcHcrkge1feq3AEhseZfBQe2jcivHPMnXHeXL4sF5Lmwzq6KK6JAPHrsxvUZ+v8ICg==","shasum":"46932138eb183f5cbf9dfda50e5d39953cc99049","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-fa36d54.0.tgz","fileCount":293,"unpackedSize":283970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYMfjCRA9TVsSAnZWagAABrEP/23vz0jsasunnBE32I42\nntJEwRu5ezIvEvgIGtkOY9N3ckhnFJey3iUj+rut4ckgYldUSmFle13v+3MV\nTuwgTlcrx2ucrKfVJZvxhlvhTxsMRzksynbcbDL3TajDw/Zi689U8IrtTXcH\nu8IRzX5f/A5QvhDXxtluHlPEwxE782FLNQab6RudI9mp/XNhb25zSFnDX9IN\nCdBQjHH6FAtO3rYtSvfkr9cc5Hmu2ZYtNgExR8pNmli8+ekLjAtwjNlE7A84\nlQJcHZy0+cgTQmDxlVCmbXuzcVU8A83gYAvC9KqjuROPH16/ZzFFOo/v4f+l\njF1I4QF1etHKkVRNWMqZ43E0Tu2omrNQLLl2jIolT4HqS3hv39M72QzmZcht\npMtMtB855WdqgWWt9vTEqpvI68kzQErFfXKHe2BvJJTnrDpXqPQt0Pnng2zR\nuPmiJjCjbxPAtowp+BIrwQdyw2qVInWnArAFtG7Kquhv8P/KkAVv4liyBNER\neV5UMZU0l7utZKKEGkMHPVQ0Ws3xy+Sww8OPJDzVb9xUaB6nAk0QSzDD/dyg\ncOzpStUd5Ut3y9MWKaM81O55Px0ZiVUrxiNycORqllUikLWWFGNFLypoF8yy\ncY5qAdN/f6qKNhY7RvhJ/AMIFyx/67sIpsDVxaQStN+41AI3ldKWMbC4TrEl\nHyoA\r\n=HMKw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEuCg7ysb+sHasKjfaQymPpNb2XQWn2eQZVMRzqzLepSAiEA0nls/F+928suVIIrRXrVezUaWosWoCTzeA95zM35LmU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-fa36d54.0_1549846499006_0.12382293378853926"},"_hasShrinkwrap":false},"0.0.6-b5b65c1.0":{"name":"graphql-toolkit","version":"0.0.6-b5b65c1.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b5b65c164a386d2f6fa75811a904fa3f102552c7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-b5b65c1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-VlAHPzGyKCLGKvu5KLuluSS4+tpgxSprE6q0UIPM6hKoR1LDHhJO0UQF3I4W719vfWwEcze+3D40OpI+tAPCsQ==","shasum":"a2ea4aa862dae5f8a633556a19b147a740ba2d44","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-b5b65c1.0.tgz","fileCount":294,"unpackedSize":294831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYT91CRA9TVsSAnZWagAA2CkP/24NvTuwjCcsRBWwjFBF\ng8fOMgwUGozQR0SiBHkkbjINm1/6ybmZoUb0rvdN0WyAUTcCUDL4IcBbWInZ\nDKs3gzVVpU9jD1yGwJ89s7H15vwYH0KxJ3lwTsd+2Uvw3fTk1gvybt1z3eb9\nXgchTdG5o5lw8z44P9zJkbepvIiKRWZDHjSdWtupecf2HwIPt5wDW+TeZYXs\nCOZER8OgrdaMxZRurh77I1+QU5pG7Sg0620BPD7fTgFleJrs4JslgrYmcZIv\nsGpYus4QVZxygZ/nEYb9umDexwhZNqkcn+yjYhxKsen9B6vEhYR3uUP02Qlt\n18WBw/Ahs9zQRqX4t/vNcYjxMXSakMTFVpTfd2kGBLZGwR2KovF86+JNtWE+\nXAqiZmjBZlVgbU2+h/wTaPU4WHwHtMRjc4EYIZxwBxHW5tpn1qjfp20IahSe\nQsNKZK4o0Ro+u5p4MiCEXY1aPsDNQOrUDndoAxuThz1TVPzW5JrbaFS7h3ho\nh7FN8gQ3FCPSzzLNg1F15MmJLa+HiocIsyadUh2Ly/qDfJDND7EwTUaIfyH2\nDOT8GoQhu5a9+RbOKt/Uj4CuZxSr7+HTO2JI5iiiw9pGSN6UU5LrbC45aTUS\nOvwO3nXHch7qSeQKGBpy7Z2FrsRiqayToq/iMU4NAA/YAfEG0dPNNEgjEjod\natgp\r\n=tsMy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH6MHE01Yi05sAZuVPr3zNelRf/aOWAH3nKVK7jgeI/zAiAXNrLgcp2fXX6HflP6m2YVYF9GMkWd9YCAhaaMUtdC3w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-b5b65c1.0_1549877108800_0.6471367687655716"},"_hasShrinkwrap":false},"0.0.6-eb67da1.0":{"name":"graphql-toolkit","version":"0.0.6-eb67da1.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"eb67da13ac2e52ea5e1fce3dabd5dc33f3660f58","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-eb67da1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-KFRhBhXQfjcbFg+I8moos9pvLkmi5a56VkMYDJ52/GiTQ/31fND2k8OXir3hx8Ps+YmwQKYuZ78NMLuNIoL5Fw==","shasum":"cd75e7a6c7c6f1fa6b2ada62511a3feeb1242560","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-eb67da1.0.tgz","fileCount":294,"unpackedSize":294831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYUDcCRA9TVsSAnZWagAAKiUQAIhk5xG9a612nXSmsbvG\n8WQZYyIanONxEDaxOCpKWxxOX/+2Id+7C+WgT6TDz/u7Rz/1XlmBwB8NmHtZ\nu9cTB1iAbl3TSmrJNE4GhQ7vjAaMNAyptnkTBNoneTV7Czsj5T6VONWB6Kl0\nym2GS88XLHh6FCDyrkJLhDY2SkKLkVFFUy4tyxF4s2tJcfBZrjGlZ7g7mcVF\nJf6ceregNzU48+C2yzUL9vRN75NjCJB92P8DUrrM/fCz/YK5VuTi42Tu+7Vy\n4e4EE4hsxty9EPmTqpZNCL4PxdlV+neAYJafV3lBcN4BtzOsbMSt/jBEWqM1\nR8pMPDPawZJZsUj1reeqU6wfu/g7D9oInZfu3zCXhXqmag0ZRA9eAnxk9ySU\nrltYuM4PAawG650LCUMaPcDEXhXtxKY4uECVLYih8JCLzFPmII32tpsKf8Dr\nAIeYimb/W58v+K/jtqy/s4BeR6S7QQbnS6wBa1biwn4jjD4DQ3gjETwrNPme\ng/hQS4BOhWT1Dmg2KyFxoCfLAknrwFaO1ND6qgLQ+ufOKt/IkTHd8XBDm7Oz\nThOJWWV4Bujm5F1Ff104e7XIXHfMSKl6tPknu7sn09feJ760uK3eONxR3xCy\n8mfF40wYgv2g7dbEZDT3Q6TeeiWqdHRZaCoWsVLw86v4y5ERkwNF89+Ar9jI\nEVI2\r\n=HDp8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOnuS0WImnvS0n756RkiAKb+F4DNcQKI5OQukyDedgxQIgfskb4mMj98H0H/zFzDVu2gfE/W5MrdUTj3shYmr58uU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-eb67da1.0_1549877467575_0.2703946833440922"},"_hasShrinkwrap":false},"0.0.6-24c4522.0":{"name":"graphql-toolkit","version":"0.0.6-24c4522.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"24c452247766a8fa674642c15b652cc8c4f1705d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-24c4522.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-yEmXU6vo0qO032dOqpd0jHMV3x2RR505goXHdDS3iDyYpcUHdCmDwjgNu2/qcCSb9xq7N7jmWW8BBT70C9Xd9A==","shasum":"d93b5df8c0ce94a64162aec403173fabd3a327cf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-24c4522.0.tgz","fileCount":294,"unpackedSize":294831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYUEPCRA9TVsSAnZWagAAIH4QAI3LsvgKrWnKsJvb8/RF\nmKzPynjlvEqTgzabIG9vjlNSI5O0GCxLo7BFu5xI6P+rSwTjVZ0mgjW9kCv6\nsq5lyPpP475/69gYRgmp0LR6nhX1fc1b0UqSTIr9w58E3LQHz0FbtXGW12Wm\nVTh7yO0FxZsmc9P9HTMsEHtX2//dadFlrgl6YluybKTdJfGd52Hm+zVpy7Ia\nyxn4+90YBmxvBTnf0agG7xvZxdBVf+wN041ZkrbdSoiulUrq4R6e8bdw9wC8\nwNVTNz7OrJdJs5CYoCFGISlzewHFLd9yzbT/YuBnrZg2zdLVeYyKMLk7JC0X\nhxRCkzZqd/imQ/maX1Lqkj+1dlvbOjcADVO4xKDmHXCEnPIFgl0IBTmbNmpJ\n5/tVgPej7uq5zKS2BKoMW8UHfGmJewnT6ZcfMvtmb9+ZZxHEh2pXJQtRbv/b\nSVWun1HF5SFVPxpF458rT/nSnv5cAMJwrBDc68M6oYbibnCnxJEqJ8z0v1WC\n0nBgtKtlXRjgwNq0jKRFmoWDkkNZv5o8CF6fgiYsGdZ3/85i6ZcHvC8OmBic\nkh55ZkhibBQMOJd8QwhUyN3jXX+0OO+wQ0rRd6lNMZxLVB69guOX5NvOopaF\nv1VOi3BD8nPELozafU91ENaZNB+c4Orh5M+vNH8Py1LNpNgnVG+tdJ8ZPT1x\nRhG3\r\n=vMmu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAq/Pfj4j3TbEuBZuwM2dnA86hYCZEDNmZISyHriTvWaAiEA9TeZiNcoyoalkcCv/YOG3MpTsLhzhvniEUF9n8OyXwo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-24c4522.0_1549877519206_0.9884820598578867"},"_hasShrinkwrap":false},"0.0.6-6c8f470.0":{"name":"graphql-toolkit","version":"0.0.6-6c8f470.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.25","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6c8f47058383ff870ddd3610a364aba0f310eaec","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-6c8f470.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-NydnQJ5D6+sDgCYCcvLqNCFYtgg9A2pbM4wFF2/zpoe/9PZdyqAm5KsQsZPOYS+U3jSwtMCVJD1trP+qmwStuA==","shasum":"b638060b73635080ee0576259e76e679c0634cce","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-6c8f470.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYhlLCRA9TVsSAnZWagAAkCUP/0F9sBK7AigtoYZlg0NQ\n58+XXaKYc78cRMXyxiVYRUwXKBU+tcvgUDfmmkowPtLwnLv4RvXnO4Ee/1Av\n/rzck+ZCqM6yAD8kC1JNiOxii5wGSCb56cSUdliTThVdwJePJPLmFAI3uoaE\n9FDetxgTgrxtgoyM72IiPd9Oexh1fKwUfCoaLqbruNQMU2vCIkI1UNmdinuw\nlI+kjTQaA+J0CVb/hM/tFxJ0hynHzheOBMQFRisWzj5+hLKRIbvea7YDTKIB\nSKr6npMPvkSKA04Wr9CTS9GLEeOQLxSlpotqd7VbSLXi8EvX+VS77vNgtaA4\nxfu6aBJZTK5mtQcqogCBWoHaIygQt5DRmeNi3ngHQP4SH5A7Zb2sNt634ttb\nxeKdmRoQqE4IBjpvnhKQbhoWXR30G67rXVDgCEMBuQEhr+l7vkVMjWVtAsoF\nDBEyh19kjlJG/UelXF4FaeII33jQ/LIiy6F8u44MrqE0Z25G82rFJSa0K2im\nhPEZoihBfll+VKSPnMJJED1+PVqncbsmUrSMikJ+6Vccor/dkLzcks6KsHAz\n5vZFFhXY0oLGyyM6KM9uukJy33qpQjUya96WO6XZWIL5uIROFyN9BPtRKgJV\nw7ZTzV7J/hmw8AmV2HpxdCsUv41SWA1PIK4F/iVNk4rs3obLttuj6G0wYXrr\ng0bH\r\n=KNwo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHgBLlQZ1WhXtnTMkSaP9joOmgW1dF0GBnHNKGQ2jalAiBRi8HI9Mon+SfSoeRVqCN8B6JMqKDo2V/NpIHQiefNgw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-6c8f470.0_1549932874818_0.03239081886195638"},"_hasShrinkwrap":false},"0.0.6-28ade47.0":{"name":"graphql-toolkit","version":"0.0.6-28ade47.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"28ade47ad2fcad5c31e094e66b071ad690df414d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-28ade47.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-HZZnIHFMSyGN6QHoRmtXOuILUrBPtBCXdw/3aZ5T+0EzIB4RJtDWZA+tJFnYmcTzCOMEhKLkXF9BmUxT6v2CQQ==","shasum":"f3cf914235542d9675ccab7d53bcd26ca9e68eec","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-28ade47.0.tgz","fileCount":294,"unpackedSize":294831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYiynCRA9TVsSAnZWagAA1gUP/iFClT71GmC8qQ+QT/aC\nKY2O/eEPf8qGNxVFU9AOi0F4tOK3f3E1WlZxW5nadycbjlIImAhbBbwq9HCm\nbddMh4VDi1eVoU2pP+3+j74Q79Fri7HSg1cqtmPaUPWT06PzwWUofSY/aqLa\noL2nLAmOWDBSoK/WqquHME+7vaG9rvT3bbmGPXyjsNitdHTSCjzrsNgYkQ1h\nFecX34SBs7VK1qJ2YjY6DnR1xKSG/xzzFYLBr1tY0uAfaDMYUgEM09MROoAY\ntJn07mpaUFg4TQgupENVymh7K3v+sdk7dgH4f8NwGBHUQBaC3lbDt6dw3zuV\no/67SzSiic/nNurjp3aCIwIWX927uJdMBuhRmMO6cESGk4CHz1chmQ6MvA7G\n7WHozFO7fVN3otQ0xCJZ8BYR7jRecr5XuL8HY2FznxZ/3plpYlJ5Qqiqn27a\nKXmdNPkRl8G9N1MW8cumDxAkngezifzC8L1NrpCKIlA3R9g7S7WQtrjtanve\n/xEemsAXlUYfDE7lljJGOMieE+gmWAh5YotdLwcTqT55oD1f54fhfy5bAKuS\nLvJes7HXbhXTbRV/h0piD63l9+4NXLKwXZWmfzjEpAjf41UoO1ZVdu4dMeH5\nzKJlCLw1U7Ovi317XTbKInqouGj+UKTLv9vBNKAsAkIcDY8QFNRl/UOH5x8g\nnEXq\r\n=fVLc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHRimKa+KMahtszO4EQS3IOjHE3+zZKYW+RSE6LLRRezAiEAqE5HhkauXYJTg+1kONeIAln5z6Wc0X2jof22IZavtp4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-28ade47.0_1549937830562_0.5415173022604174"},"_hasShrinkwrap":false},"0.0.6-d8927a1.0":{"name":"graphql-toolkit","version":"0.0.6-d8927a1.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d8927a1e52cfea2dc2ab40deccbbba4debb8c4a3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-d8927a1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-wY8DgMmBMQv99MmQoftlAUWjj2hE7qii9sYyVNGHXTUptxPfAYlOqbmovP2GiI8Xk/jhZI7R4MmkfjRp7MH8mA==","shasum":"3e75c5bbeb0adb9f0967d573b1c3b0b7ee26bb3e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-d8927a1.0.tgz","fileCount":299,"unpackedSize":299651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYjsqCRA9TVsSAnZWagAAF0QQAJeePi5FJ38uTqyYULXm\nZK3ng8d3/TGmjvUjKTn0N6lcX9w+1zKhiRSYWIeXnUjHDTnro9DKCEIrZV4x\nE6nV/V9wABiYWKSVqN+qizeH3Q+iQ0/AFOt6DRpzQDWqA25FPRWpwAyJu3YM\nHWBhI3zlk1N81WYdRq16GIkfLYrF8s/ZJDyuhmtFJNt8F7tQy1of0prwY0tw\nm7PA5eDfZwYM4sb79FJePoBtcdwC2OYN2lyT0fggH2ayAklEnwqjQ0jOx2Q3\nBndCjnxZ2BYQa8f2Ht2zKSNA2WwzPWhsezzIOT2s2zdaXA9+cGIR5nTlJW9n\ndQdhdGvHbVkTjq5Q7scgVg6lLnjxec6nxXYRm/Ta/wZP5s99BK3BJFWSm559\nMAZ5uKZaklYULhE8CIycWFuzuBV9cEN3lX7ASpptDLCcE/F7i99SBDozlFAI\n86ntmmW/hL5JHt7x8pMpUwxZlddi+xOzXRmb+lxEBoz+s6Zhm/d2kgRac+N3\ng4iQxuezmFttsy/Kg1BXcJ+s5W19oLN8C3j14Yt/2fHPk05pDQ1blhByRxDI\nVzyNdKzmPtGSeJqSDFJqbHViWo5pD9o4S9uT8KzoisQ18ZbvIIBZEmuZ1hou\n6PUYfxzii5zqkmBrOZsd3faYxG5z/MGdz/OwXbr2xR5z0R5DcCmsC5aW0Mof\nBxv6\r\n=EY77\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGzhWwk1HiP2yp9Etd7OibPEF5J5+AXtQOg/njvTqoyBAiBfxepwWFkP/gFFC9DxWRdAiDE42Mn1Ksr7I/COHs5VhQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-d8927a1.0_1549941546010_0.14421167552006797"},"_hasShrinkwrap":false},"0.0.6-e1a0312.0":{"name":"graphql-toolkit","version":"0.0.6-e1a0312.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e1a03121fa1241a5d053c22b9de61c9328526701","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-e1a0312.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-GlNEXE7mvj5sKym3SzqHcdYsmC1BetUOdxvrX8ZFGZBbQe+Azh9LoSdoxWm/VYGNW/SL+FrEYTkr4kPP14qbPw==","shasum":"785fc4508005aaa65160119ab601671e5d64b1d6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-e1a0312.0.tgz","fileCount":299,"unpackedSize":299749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYnP1CRA9TVsSAnZWagAAhqQP/2HzH/xf0NfW4ZQFyDkV\nvZhIKTE8hY6crIsqlPyppxcF6BSa+gM71ek4TEs3UPmuO0K4rtbDe6m3Khw9\nPnYH6t4rXs0Wm7G8qCc6Ghrebr2IVKtDbzzQIwUU1Sf/EH1/WffZGFPAkscJ\nFsIXzLmAUqPsaWqTYs7Y6Z6Y6W88IUttC/V/wY4PtylGNlSiHPfwS1zPwrz+\nu5ZfMGL4WB1eJ0OJrScz3hU09xhXICKRTbyBJM3btQ/TV+/yRuzkbQypDzXG\nqUxj9gt5Pa2b2auJr7bChvyilhNz0Ji+1+89QVsBrn5Zcs173+TkltrcdT6F\nTljoPaW59ymAXx3Rk+qvAvKjDcY/FljdNU1PFzF4ZkrTjinOA/vwEFzCdNBF\n2vyqn6Msq+l9LzEzFZ7ON7m6YKqvm+ms6DVxpfSdYnJ+m6rVz7tpI6PBtIuH\n/o12WrmWeF/SQULeKTw4jw2Uv/PnMhaaeOK9o4CkSmu+7doiyICQkEJlxi9+\nOD8Tt7Ackx4xY4SccvXcylYm3ra3zuX9UNEkvKQLZI1w12GH27srId2cxwFr\ncAL36eoBokUcUofWnuWwhOVxcpY8NUvd62pVyjgBNKw5+4IGZ6e52+EY1nuo\nMlVSIy7EoMhSuJzdJ5pMSPK/uvMarb6pa0xhmdPc0iRq1Bh/rDyDa+qnY2l2\nM7Ro\r\n=GzWJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH1pLnpktizrisdDjhaYpt5mdoIu6gmbHAjBUz+YOZV3AiB3d6uBFyuUyk7tqzhJC4n/3+2rfBkv/xqjedN/oGM/Rg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-e1a0312.0_1549956084530_0.538944167350708"},"_hasShrinkwrap":false},"0.0.6-65bc14e.0":{"name":"graphql-toolkit","version":"0.0.6-65bc14e.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.23","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"65bc14e08add70a4fc489d7ec0841c3b40e77dd6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-65bc14e.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-+ifBCTR3aKTeqkwItMd9qx+DDK/+doxiNUsedCa+/vu2tz7CUb1Hx/JEOltnwPpqsWOrxiN+F2K+s127FEdZJQ==","shasum":"c1b7362a746b813c74da1da1a77fde25df607df3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-65bc14e.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYnxECRA9TVsSAnZWagAAbz8P/ipMv+Be0wS5TV4CGa0q\nQtAY8BIhVVzFe86STkJT0EsiHDyCsY9nE2elgoPIHSa2AvsIQRj7+WLF1AAY\nvE0BQdh4wBPYxmIvZZ8/ITfVZ1vAgLJMtjS/oMrEffdpDAytn3zi547dXKRQ\nzaFbHEYvGZgPAEL3b+v8nVDrejWSYk54tuGy2TjqSVt+TdeyTWRZNUT66JWS\nBP8sowuLBdkuUH0MH1hzfunK8Os+dbklfu+s1KNf12+GAI1qDE9btDjYomVx\nxmiQ1LAO6RfPoznoLHYtqLOWdt9hh3YhO3DuFjabXBqV55ps7DPM8V8yX3VX\ngCBW3Ilz6m4nuZrGVF3oHI1xXDfoUX4h/rSus3ZUvW0b8q3+jzgUgo8myNaW\nFv/DfPHwSU4TGMMCekXFnvFUKl/BGY/gX/yriHiGfgd8v8LYCHyzGo1H5zC5\nJVOFY8Z3u09XHXfKymkvYWk7f7NwidGChB6Q0Rlp1b2YdPvU2AEkKSY6E6i5\nzD/zX8ectxDBgMGsxnvUkf7I69SYvnttFrsSqloLT1RKVR8pE0OyxHNGp50K\nSUWerOe0Wce5ukB9JZKXzYGnvtKmZVstrbEKjlGYqMKuqmnZP2fvpXGyRx34\nJ77bP/INRdmNrXVIcBoJy/EBANaAPopN6nV8WRmlnvP+87cH0uDp0ph9h5Bx\nxFcQ\r\n=aK87\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDX640lDTtqwAOkX+LBZpPvcXUv0AuTs+qoXp/TV5Hm7AIhAPi2DxBM2jvZWL8xHvh7abx5lZaHSOYVxIViXttYy1ZP"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-65bc14e.0_1549958211736_0.9069749626268622"},"_hasShrinkwrap":false},"0.0.6-9602acf.0":{"name":"graphql-toolkit","version":"0.0.6-9602acf.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.23","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9602acfa5217bd73f1016de7ac18f053cb06595b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-9602acf.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-g6BpNm0cO0+UG3/HO2Ta5xMHHNddx/C8AJH77/wgerlxfohgSxnLQwJDRONNr93qpXEAUmWJCGdIzVphbGDtKA==","shasum":"45a50ea4cb2242b98e86668cf849a8b053afb65e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-9602acf.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYn76CRA9TVsSAnZWagAAWtYP/R1ep7hdirsNzhHgrsS0\nTvNeDHPhjk9bfZMcts5+DUT36XT9i5C0MvVeLOnVoy2puZt7me3FV3SUwAsz\n3+pgtzGKexn4bGo9FHvmieDiGC9BjKTnIVOHCWtzAO4Q2zTKdhP4vmwnQsvZ\n5tpiRgP47p67p7oV+2q4PdAvO0OgY6NJQaj4NV4HglHRWqBc9eQvTKR8GaQD\n5J5ob5gQ8nh5kkTvBvs/HwwGJHJlxkvKzsagxOeYY9+mAI2m7sVfHx1i/+E6\ncWN6NXekJGLuAZ1Fj32IK3Hc+cjcrR2+kG2kRlYtRD4iagsSH9TSPKJAZIdC\nri/BxuHAAPLGyIgpA8KMhdGVRSlQHgjFNS0ko7Z/OKOSEqC6qi+OO3l58bgr\nBzjXSaJFZJMczLrm8li5GoXda7uFpaF8sbN4Jm3+FfGtQqfLcfTonK62eP1q\nDVJzvyQQkb/wK0F8nnq3CH4mWfmLfgkqSLDD7y28qvecT8uSs5hpH4ZwtZfB\n921oGGxccJ1dspgkIpyV0SZQ9bk5OZEgscmk2eN/uF7E7XZ1y5OliQMPPyqq\nqQQ4hZXWaR5MQpilb9AWsOdXNIVXF1IcARV5KLCRrlzCndvfPcPJC5v/MIoY\nT05t9+ElcfH/pDO5c3l3hKg/tjH5fE+4d6ryX5dvz1ihwy15VMG1ONnH8sw5\nEV7x\r\n=hASn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBc3CW9Oa0wCRocb/1/7ldZcVfm9Xf9kZpA5czOfvcR7AiAOG//SZlKWeh3q+SyffR1M0px3pfyjV+slOXENaCH7sQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-9602acf.0_1549958905643_0.2303222988062772"},"_hasShrinkwrap":false},"0.0.6-85b1fe4.0":{"name":"graphql-toolkit","version":"0.0.6-85b1fe4.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.25","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"85b1fe4aee5c9815fc40b84e67c7dc3379cbe35c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-85b1fe4.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-fWQOtK/wi4yQp8eYH7a44Gciu41W0adPgxNM9OLtst5LL4iD9jAJYOXBTFvhosothltNCCKW+ZNPF8I1EEmZJw==","shasum":"38582e459de01199e7f3557000e85665603665ca","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-85b1fe4.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYn7/CRA9TVsSAnZWagAAme8P/AmHxuITPdXLoShCkguS\nuuOfP/K7vc5RVpIhwoxr6ia/FUErFF5Ethh4Em/nWV0G9ftlcMH0ttGw0dE4\nRR9QDXzPSO2iYTdmgt6yJQ+9n+3ty1849UPYcS/xohc767xmZHk5fCYqhfyk\n+Myvc/v9p3OPJuBPD10OXZCveaLpTsqv4ZnmBh3fBw0tPmSJnGwPuby/uue8\nj1l7GXE45G21/iiloNZ1+E4WV3BsuCqPP8WpftMbQVWY6AAoAM9JuY+6MeZC\nprVLAcFCz42kFSMhowzARiMMnG15zubsCoCwN9tg2p2lTyAu/iBGxQbaQvEq\nNnqYke5TaYRlxMV/Vr2cw1oRUgmrAtO4rAVtedWMarBzVa/o86PJ+npJXgG8\nHrQ9jf0AL9gVoIpK0veHIL43ZqRjiE30gj7+fmBK0oG2iNGFj9et7Ng/wNEe\nBNTdegs9UnPanfY+ZwLLZgg5Mwxlm1EIUwTdgBInOV26NGqKc4TdvkisnXf6\nWLhLBNDAfcANr32cwYHHLhMUQQJedC7Ca8i+O017y0m90L1um5u/PdeSv2Ej\nI7eJjGkYpADQrJStmhsqPpa35dTlNdGH7Dt/5HnLHXGQnkB+B/8evFsV1hEf\n53ty1lBTErDNBdh13EVVPtP/XX90BZZCY5S9E0LQThZXfWgg+Hlt/K6wF7Pr\nZrl2\r\n=79bk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGsUjpNSUoPVkEXCn4MIG+Z50PCBFt8Xwip8LfR+rSPAiB9UfwfYo8TpBLMAOFRRc5C+VPVsm5vPz5lw1CMGgXJ1Q=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-85b1fe4.0_1549958911172_0.5963418932221949"},"_hasShrinkwrap":false},"0.0.6-73408ae.0":{"name":"graphql-toolkit","version":"0.0.6-73408ae.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.2","@types/lodash":"4.14.120","@types/node":"10.12.25","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"73408aec16b87c7c2478f8866a853cfdbd138465","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-73408ae.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-GbvUY/zO6WRjQ94WnZulm5nnHBcTqDIUbYwaKNsJDUJJ2OKIM5HZttKDdvXS0Ih9KGcj83pvb3cG8tMKyC5OWg==","shasum":"cef74d23839ad69b8b1cb98ddfdcb7915283f7ad","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-73408ae.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYyEmCRA9TVsSAnZWagAASnsP/1OTnP5WCDZAapouPtmh\npHpcDbUZYRwZODINhhdYaPacbzhgpZi449QhUxm1gHR2tISCJVKLzLj11YnC\nPReUhAfwh2Kh7rX8rqMef17zcrq6MMBoXhkKUNDAfa+r5jFt328BIHsx77SF\nvnnCAQx8REZbVTm/KgL2ov90JzDtT70fBReq3d95FpYfU+AF9V7SGrv7Yopw\n0unOD/Idla1tt5TG07b5m3EEazRZXTM7zQlA1+FzXnakbiVX9/HMASZsMOFH\nkiNQ6e6aBiMPcdT7hkJLcOCmnEy/77/OInny4gTqZImzWZljgwmRlIdpPaIB\n/ZWkS0xcH6W7RtubtNvZZj/pPOWsYhQCASeSWlWs9Y43DFjjqzhgP71SGNX6\ng2yUZwAj4b/CKO5zUcE0rN8q6gg6MsgsDCkXjr1d+l2T8KiGHracBMeaPAk6\nVGPU3Re4V/UsIxDkoY46WWq8LoMH56XeMOpNd+yda+Y7ahv8xiWF2EWLzLQS\neVHUkMAx5ZJpRfrH5Lj0QJD93eHSjdiG0UliJ6FaCDrdSoDLNd+8PbwLKgsH\nFiA6ZG9qVK+iAq/CE7iFPCPVw3vGHMd+m+x8TF/q/dogE+dX0yMbKtLP5uZw\nYXwVr85MvBP2S/rJ6KiB48iMWYNqKid6eUg/5SmLXBb8NW5QBFn+7pQTJg59\nJeUN\r\n=1eYY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCv+410zyAAYKxUH+Lhsaeu6RwyZr15B8O7BW5+nJyJJQIgS4nd4sKBc+wg1LyQDb9Ug6O4XXQfLQkQTC3m4JtSbb0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-73408ae.0_1550000420335_0.38119738957244853"},"_hasShrinkwrap":false},"0.0.6-ad1a604.0":{"name":"graphql-toolkit","version":"0.0.6-ad1a604.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.6","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.25","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ad1a604700727add2ac85dc52050cc9c40af6297","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-ad1a604.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-GitAOqsd8xvslYzoGTiYD7QzFqf/C6tqDFD3pRg54pf5fKIoAY/LcFbn7KrbTjFqlxPjVTpII8+N5gYhcXk9Iw==","shasum":"bb957fe23d10fcdc0c31c576f3e9da9deefa9c0e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-ad1a604.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYzI0CRA9TVsSAnZWagAA4sQQAJhbGSgHRfhdus2fAw0z\na54t2Bi8Orq65Ipi4R42GLoVHAmhXYK6sPxr6JZmi5eIA9xvQ0o4EOOOUJTq\n4EaGqcBDnN7jrn0THO8CdqE8me8/g3A48WRy6d7Lsc3VluxJH/Uwl/9i0IN3\nTnWZuI4r7uubE4x4MEWY+99dG7aS4N7P4cL0sJZQZgEbAeeMl2oV6uWQuubK\nCZwI5N/0Hd6InPLiZNOoV5J8/GPz37m4DkNJtQIF5MQ9PWRqi0Ncg3pdKWRm\nU0Aubv9UlhrqWKJbsA1eCjaocBP0pomGd2UtJELUeBrBRvns67UkNyByFlhs\nEi0NqB1EBlPd9hzkGvbLK1z4IjFepXksTXu/FpYHlVfAH4Y1cHz/hneojS7j\nP3VI+WBNGMFuJs3rbkxKq+18Ks4FvaZeOKemGI+vJBRQ6RHeOWz8GFvFf8iO\n2fvHC58rQeOeLfeL0KYAJB+Kv6tS9Vq3MKJwcjU3APBwu6UdB+2rjPNEEylX\ncjj5BPsIETGBU5yYycdo8rKFT3CzK/cvtkM4u0Uiet9izR0dmUfedJdLvwVY\n5C4dOo6eOzUYUHh4CaJldKWaJo+8LLSooBlPHexNaXzlo3XL9A/xjsoLIUmG\n6cUhEncl/JxxfrHoogEfJcKRsXWPsnfdkLpj31qU+iG07piFZrUEJvoAb7k7\ntpwy\r\n=qEu+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbhsAE7yOGdx2vjR9mZvqzxwnBqRwc4uGArvEEusNkfwIgP/qLgTbsLG/a1Pi96/Jk7qZLmcjw2W+WcqE0MVSkS9g="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-ad1a604.0_1550004787787_0.5738901612991838"},"_hasShrinkwrap":false},"0.0.6-89554cd.0":{"name":"graphql-toolkit","version":"0.0.6-89554cd.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.25","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"89554cde748cad52e25526872f63dc09b439e3ee","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-89554cd.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-6t1kkpVo8vRynJShdCailiHwY5PQ52FYm9E1BPTr6/XEj+iFeCm7doxgiKTmVuTgP4x6oxZop0Xc3Tz2u5Q23A==","shasum":"8d934e0a0a8dff8540495e0d3488af99fadc5c2a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-89554cd.0.tgz","fileCount":157,"unpackedSize":180161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYzb2CRA9TVsSAnZWagAAK2YP/26n8puBR+iWkAPnqTWT\n/BGZlhhKW4T0TFnV8JT58svCs21exzTtxPx/4tWg7PAg25dOlJXxSI5GJ5pX\n0CooP71VBVSruUzcr92gMCBsU7i2iT/t5mr3fjOLvbJMgW8OBeOQvSsTX2mc\nI4DMIfdIVTDtQRs/3pUHH7VH5wJh4RBJHFYph4eeRBB/siFwOnQ0O5daoLlu\nedE6KuqTpBTBC3xzDwsTcRKpugEd4w08zzFzKA7mOQ8s8o4si0Q0B673fCNK\nzYX9XOXLgorI+Qc8SmGj/nPDqvvOXyaa0ekwZ1ic0WdUxb2G6rxxiDQrqgnR\nW6HBbt6lnQ3tYZMiqn3E/fPX7rLltd/+T5WWYvEGhL+sq/CeuCHuqa/AxUbS\neyiROEF1iJ/DXRADMw2VFaHWhQ/vN2HlO1NwgbStqprQduMB4LuXhtUgJfhg\nZVYSB4z+AAglFhSf8Ogm3+eyEPfwWsBbfDbceqv7NnDkV5ej4dzy8HacBIka\nXec+ToxxpBpSM4lRPn1UNtnUx/Zr9EUDZDYp5bRilywn2J9WlV7nXkjyllk6\nceD+bNGWpa9MfQNv3WT+NBRqX+20smuOUTOiUzkW+CdwjSeNi5AN8GLeicfm\nwMkdVWUtCRX9aGW63Dkl4dsuoEKzxSLHiszCpvCMKxBtgTU3xvMzkp/GGu7H\n579h\r\n=O0SO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChqSeBam59dhlOEDbc/XPyKUPOcNU9EfMne8Fk8TwSzQIhAIrvZpQO1gs7iEOASY7z/YvIF6+UC4qEDgpyuLah3YmD"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-89554cd.0_1550006006364_0.7941815518474118"},"_hasShrinkwrap":false},"0.0.6-1630e8f.0":{"name":"graphql-toolkit","version":"0.0.6-1630e8f.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.25","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1630e8f4e7662f624dab543b5525b9b1117235d4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-1630e8f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-EPwQYDjnq9nCImqJoPVzGx0gvyPzmn28VyvL9XE2BX2a7rTrVKO8VzRVFcoB4C506GAdCQZEHiz7l1w8X9DHxw==","shasum":"9a2404a45ec45cdbbaa0d26348ce412e8f220ba5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-1630e8f.0.tgz","fileCount":157,"unpackedSize":180600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY0EJCRA9TVsSAnZWagAAq8UQAIzJS4ZXUpuSUSUHkpOn\nT9r77vjBY4Q0qcPmdYIknAVI7i85rK7t13n3qjzfP1khPVj2LZGxwrF6LjG0\n3yJrsdec1YLk4+t0D1BqhesDlh1sOXWHdWK8vTjCy0QeF9tbjUeVe4Mggjol\ncy3GI8CjA9IraOf+IxXz1Gp+l2cHg49uOrfayeiFr1byuxsSNXVumMbA78Cz\n1COTdTRm8715NGOltVSGifFmB12OjJlgyU9Cb66nMyrAb7/x+g0YRMgops/E\nZbFJwnic1c8T2PEOEwRred7OWbu785jj8N0UIO6iwUqyJxtMLkifj0kjgTRr\n4oWYe8D0ROSCkziKRmcYkyB1v9qcEZLqTGPMbLKjV64egpvy/ODbx/qddTYp\n+FrtSzgg8jfPuOkgAV2lkb3TK3FmZDOp8X57I6tT8brm0B98/OVf8NNLcIsu\ntAkt4vKfBRkhcS2tCOGZ5fYwz9WyjMuh0lye2e4XEEiUVjlIEqRoE+cfZf8l\nSfJpNGc0vOFLDdRCv9QPuYxzA0ThBD7vayj8OgD7I/i3o2f/ap5FX0AKKFpj\n9yn7ev8cLnR5qhPFzkryvDI1/PTNTKkfqkXo8NgjduueTYSX1STIaPsS2uSP\nj57xgv7+cddisnDU0HsosCh25Lh+gdmmdCU4kLOQyJHQFlCUzVSoZeEzyPSp\nMHOe\r\n=vT1P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8J7T9xM+4L20F3zQv2/3vYeGdiUlmmjLBn7kO2YZA2AiBsa3lYiTb83lhuyv8sRffuSF5gNngZQ//zyXnKObO9pw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-1630e8f.0_1550008584790_0.3423648449473309"},"_hasShrinkwrap":false},"0.0.6-0c337b3.0":{"name":"graphql-toolkit","version":"0.0.6-0c337b3.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0c337b329197f433c66ab6fb84ceafac8a4e4ca6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-0c337b3.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-MVhwYHMDchspN9fxzavHBzPUG0Gxqq5t6VIi+VnQJHGX/3qoGOyS2nRm+iX2ajgln0itmLTg/Z8YEamzcTOd7g==","shasum":"8f5b774b100065cce97b1a2001419b044c692b1d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-0c337b3.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY2EmCRA9TVsSAnZWagAAMI8P/it9EkEeXFftRT3qSWDE\njD9Wbd4MvxRbkjMnwnenqJq16TjRnJ97bTEJzBpfpnInpBMU1wURDDiNDYS6\n9RIeGdleliT0yzu5T3LdxnIZpdJehsOpIxVeDQgqymy+Po76KPB924saSQYl\n4tCKjOgzduhXqsX8vaSKJui0QOh0JqxizW5AryAWgJ9ZY88r7ievXkLGzB/m\nOyzv1r2B6l0+wedJOWqMlBDI3RDB20nH1C63+2wZNyDyo40Zib0nVbn0vl58\nADhr5NyQ/8RCxlKkYlY7zBB/UnwaFQOcMRw5tw8fy8JdnThBddnieemBrJhz\n9IqAQz+CR+pRofx3yG+w1o+Q7iNFAbBoSCyrDJwGx0JihsK7pzzEieQLM/XR\nYafxMnxRCIHbYI/by1rbr8MMkZ8NoSDshw8LaShXrqymLSAEHv0xdyi/4P/l\nACiCWi/oVlltdF4PffP9QQTs4IzONQ5AUfCxS4t6wDFjhNj+xCRm1Wd/vrSp\nqL4iCbh6kzALHyNXxAchG4kzD688Kg/Qs2d9inp0+VmW+S1hoMXEgXgmawz+\n2xCRATHh1wGip/5t+JvaaPlUII3crBeCwRkKuQqauZ414ITxv7lKPK23yUKv\n1i0h4OZGRSzHHq0h3MG9pkkONJo+hr3YcktR19FrZeah94kkvwFQ5PG2xJ/Q\npCpy\r\n=AMPR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKc8ZIvLBaU3jjOJbEsA5oPswRuiGf9un8jrwB7vcwIgIgF/qZ69/a4A3YudZR6Cy01Uoa7wWIh8DJZ+J3ewrBk1M="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-0c337b3.0_1550016805530_0.5599311076733746"},"_hasShrinkwrap":false},"0.0.6-a951985.0":{"name":"graphql-toolkit","version":"0.0.6-a951985.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a9519856ebcb11c96ad5907cb90867b771a066e0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-a951985.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-7xTBAjyua427MtLXFvqN/Pz4Dq9RCFg5lsxs4CvtRThISvkSEXPg1e0TCadtdib1Kkm3i2S1VdClfJBS0sEttQ==","shasum":"58bb8909e8567157f5fc6953fd672fd65893e27d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-a951985.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY9UVCRA9TVsSAnZWagAAlhAP/is9Yi3Mab+AP6+Gppy8\n9wDkX/3lWwLC/POJbr1n10ARb1Xz/8LohDVZWwLoxI8a0i+rU4Faa9ACgyH9\nEQ8YUOcncm/dbIQgYs9E2TZUt4e79+6Dc73Ens4r1KgeWqXaLNAqRP0bGezo\nwoomfaIe4kNiVuYpPrwc93Qum7wX1pvqcPc11iIE1P06XNFUx90dSc1shjN0\ngSD/bZt45L/WZiRMLh8K7dc8OT7Y1LBcOnFvsZIyUHjREanb1YmdYpbde0IU\nTYbkqyr9488VHmszKLItYn+9Dfc0Vz2v1bGLXGa4b9SM904479grZZcQnfz6\nRnVcNxTQUMi1IaPndw1aDvv/gXu/uIER3Qbs1HGadLkiphBX2XQ7lj9IHoHP\nuFGdOHir8lX6lppg89VPG+JE7e1Wtzg60Mr849XvFimlTpiegicALLNpoxlc\ns0E9+fLbb9j59loNN3kNtsl1oaTOkT2XsAarggGRCOmfZ4+2HFx3ojIgbRJY\nw470BDpgP7t3YQQTkPoHw02/0REwLSijkHVkWD6G7lvxI3zFswsDG2cAUFRS\nauWny5zWL2aTEqTdmSvjfQlVnMP/2mUzOlF3/zVJmKPYRCvjLPn4p3CDq2oO\ne3pT6f4EJgWu0F3AHZ3pYPx940FsaAZIIHUUi10kR6q9DXpJ/SEAivZmYC1e\navGw\r\n=ZoqJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdBmiK0j6Wn2fAgqK8vN0CNJQ1HPKlKdXK53j54WSFHwIgdmn2djFH8Ma+owboiYrakNet0+0xJ9uUSdmB0xNTQhc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-a951985.0_1550046484676_0.09131833086646779"},"_hasShrinkwrap":false},"0.0.6-e0d719d.0":{"name":"graphql-toolkit","version":"0.0.6-e0d719d.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.6","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e0d719d92c9732a6879852f6b10da11855e3c416","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-e0d719d.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-1Y30KsgvylSf9vYUWmCw4X5Zku3j5Bx+1k17RTQXovrePylnHT6SRQCBhVFfVgD+7DD33H/FGcfrgRWU7864Ww==","shasum":"5950e2931ce672ef2f53c180344b1a98e883a02d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-e0d719d.0.tgz","fileCount":121,"unpackedSize":144819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY9UrCRA9TVsSAnZWagAAgAoP/09Ud1xcoU0qKgPKEzif\nEWExOBEcVvL6UwwvZ226V1uUmuBwIg0wi0AKBRDWdDinTzmgxU4xsaOmzvOx\nT2GMQZkeA5erZ1L9r4aH2mzAugs4Uf6NVLc9Onnml5rmEm2FVgHiSOBhoZMa\nNJQJlfuhiA4IhR7XC8D+DG+sn+z0l2e+FCQYkE1GPtxcAHu+V5/sGDrCyA4D\nWRAoT1hFfpEPUNDFiNteuA2pZDLpxGfWOJTNhF5uusxfueWBKAVhzoAiFl8u\npYuh+M7OiS/BTNoVyZjBW88vvFrG3evrmwlFRTR1BndHB5hUUV5GSQpUr9G9\nVgGGvDr+gprHEVuESHr11vXSErbFJ5YhXkaLTnKlBRjpooqxZNr2JiqvQruI\n56amxZbVfOXlsOiKhu1CERMz/3IoILJ2fZ4Pkytm9OmMEp30CassfYg5c28d\nvxNW5zN0S2DYIzjA46jKF6B2fXuI3iWFSVIsq/61BP3P14ZXNBkgzeuAQeXK\nJlnP2/jF9yUnRYQRqfFf9uKEjFXcl9FGSMCJHUhSREcnFq55gOSn+TS+OorN\nYIrvh6WxTEHpzKMEsgcv1vkAxznIffTWZ+JJDcPaJoqzAiCdrLkD7In1dbDo\nDkFRCW7PxOvSlrHlVMBNwJzCnW+Vv4rp/ruEB6725n+5JYdgp8mDLnv9bQJb\nbzJe\r\n=PHbY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2wyNdTfugHMsgKrVdAyAhXkFSgr0prm9VrQC/RkPy4gIgd9phu5cO7bORHeaXRyFfKjaSaFfvTjYQzIsEXR3ak5g="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-e0d719d.0_1550046507255_0.21835625472389664"},"_hasShrinkwrap":false},"0.0.6-1718593.0":{"name":"graphql-toolkit","version":"0.0.6-1718593.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.25","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"171859342c5bd3e4de186017057697693694f23d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-1718593.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-aWw3c3qQtLAxQ9fceoREBrC9FgXEXV8aRKJ++elLfLyWhHSZP+ummh8jzmLa9gWVxjym0esLv2cFMtn0ukDJDQ==","shasum":"237d027cd77afb65f8ad9551bccf84d3f1c00399","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-1718593.0.tgz","fileCount":157,"unpackedSize":181384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY+lQCRA9TVsSAnZWagAAC7oP/jh5V6dazrnggFinpK8o\n86m2f60HIzcyl0y6YHPMXaQABvQBDgY/9BclHyPBRbkBt4LIsBg5luvo5DbA\ngrnw5jFO+6xdC/DIWZbAHLQurSPiQfJid8kSAd/PQKP+1bQBjiAOau6Jv23M\ni22QM7gbw3y08twS+OixheWrhFGlkGmoZdwtZaJC9dDAdniQbKvq5Kb0e5gn\nhc5iok5W0QAOHi7xguRMSCkFd6oTACCqBoMUhNiZTkI8pq32oaxhsrJvYCCq\n0UVYxngfr2jvvqZmx+qSMU9uLhmWvmwKNSk7Qnemn4bW842ZcLzV0se92txT\ng8Ad0Pa8wTrNazh6HvXY566doThjra31xBQRStm5/oLR2P2Sh2bOnO4HEQ6Q\nBAGe4UlI0dWjCZhqz0gYz0aM/EtNh3j0Purt5aVelcQ/PiJe3KgJxT/6H/Vp\nmobXwato1OTPQeJVu0eEeFFoi+4PjOHbplKdNsphMKFglz3E+OyWwIPp2Yoa\njCGCHmhkyjJp5fxC/qb0cvrkznoXYSgp2IiPYmsf303snuSdw/o9BAbqvNEu\nnVyG94nK7al6NARpXjagnW/BnUHnM8Yt3AfB32jSw+jdrEyS9ZaCp9UV5AN3\nMBCfquZ5bteS8jJG4D3ZLHw2JUpLdXkY8eYfK7Z/oL2U3LheZ+HJHiZkV5ft\nF4Gm\r\n=cA/j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSWLYDq7LRWQhVJeioJGPaBmWxYbT81ZTD/J9JwzPZfwIhALG0M62hVNrIBn0dfC2Xf13DhzepkcphLY7S2XLMWhaZ"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-1718593.0_1550051663506_0.5461128827471824"},"_hasShrinkwrap":false},"0.0.6-0a07751.0":{"name":"graphql-toolkit","version":"0.0.6-0a07751.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.25","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0a07751c528abf8170c03b166c4fd3234cd68512","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-0a07751.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-QDUyQRsEWGGNHtvRDkkiPJD5V0H3460m611AIwB77T+SuA4kURMc22lKjIglJJH6lsN/D8TqGocez9ATg9mbMw==","shasum":"99895dda6eada209f97aff677a8149ecbf72d7ab","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-0a07751.0.tgz","fileCount":157,"unpackedSize":181496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY+wWCRA9TVsSAnZWagAAv1IP/RGP3QbOM+PK1JdmySlj\nWIRHZaU3cj1J+Ljs6FsL08OcYJ8j8jkE3eIDvi4em9wokTyxO/wCyDzq+4Ba\n42v83XLJ3ybwc1LdwMcWMcorFyB42qGxfPyP31P/4ks3FgQG5TX6eOEmL2jK\nFqRz4SIjJisN9efGxcfzXMfEL4aJv8GB3FmDh/206GfmNy63xIOu5PGxLE0R\ngoHwdtV4ww5lA/8POGCUsAbi7c/KHdhD4xIuRMamEYQO4xw72k9Oqj0dldl8\nDy4H4ElUCS9JqDWKAU1h+sJvzX3NniGOtnniPGmUUzhplMgvK/SGpb5T9ugR\np+yEIJgYhOfahDaZOYd5OQ5aVqI0fn6gExKufMLBYKzuUhwMrHDz2s4uDA7n\n8/tdYu4JSfC7DpsfbTUHVyW8ahh27WAV7/A/LPlXBSWAKMGwdR8pMxN/rVoL\nncXvxuW0ICKRTFSCCf0SXwxTUnUXFh5D8r319ofRe45hpNMyYQpuPhwwCg4K\nre8NviIu450YvZoQRa8Zxz67b3FIqy7SkG4k4u682BQqm9rcSRNgKuJqfwEV\nCOeDEsRiR00aXlfs2+NuvUfLq39CFkd8itPdKe2XUhlDWgJC+sZs6GgyXm4m\nnSI4tEmB1j2ZIEy+zm6QQDi7D2VmESOvkBW9kjOUO2KBukpg9j09caHl+3wm\nCTsD\r\n=RZJr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGq8nyqgrb/zXqBTrld9zlBueXYDke/vnNO5v1JyP+H2AiEAmfVLrn7PmiBgkX78MMK5WhnIC1/MYR3qmb10hBAp+fQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-0a07751.0_1550052373851_0.09804956137588161"},"_hasShrinkwrap":false},"0.0.6-5d1079c.0":{"name":"graphql-toolkit","version":"0.0.6-5d1079c.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.6","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5d1079c07d8dbd570e0c5e6a5ab29bd7ef64a230","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-5d1079c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-sBrbVHrMzBimcJCguKqJkpudzTxXj7DNX6fEzNqaCsm52kszpiOof0LU2OTQjSsXKeU7i6h5E0PnTGmCGuPubw==","shasum":"4e4e9c92ef6ab57a2693789cf885b1956a60516c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-5d1079c.0.tgz","fileCount":157,"unpackedSize":181496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZAkCCRA9TVsSAnZWagAAM20P/3M/nn7SAoTw3S/CrPS6\nYOq420/SieJDTEuSURaJLsG5jJ3XIVIR+C/EANpgD87pfvVK4n9Tr00RcnIE\n3t2qbGTN2GxZjgphKh+ajeudL3Gb6dUOZb2HzypweZk0UfyGI1nmnWywhhRw\nVb5fdPhRg8OWwt2t6XxsU3daLZ7UVIXF1XQTEdSIJ+jPNxfFuSbQZScpvi5b\nDH8q7R9ox8E4qU1LbOdqvxYJLNLe0Ua5XkPtNmfCLAgnXyfHipaBj/XbRJ8J\nikfrREp8GAPgvm6BcKtScmwp3L+iAmtv6uR0s2psLdFYZWn1UeHJj8e7EOum\nq5y+spqzdsy8W2P4oHip9FvS8iMR+jmPfjNS9C27PgkSnUI0Yqy6HJKtVvik\niNHwm1IkjEkL9GbrAsNEF53R48F3cgLBIZRSVREU96By3i1J0Hwc19c6JnDy\ne25JzNZXZ7283ZMpnOHYJgdw9NUWNaC0I7igyoFLOvMvBPxPh7TIEdEoritp\ndCM04ywiplfQZ6AMi7aaWSwpdC2XgBtinRh854I8USv+djtj7xY95X96MZnj\nWZ3LfOTr484J/moItP6C1LP55jupSLfKKA3+sQj9nGzpQFdklGyFVKWYJDJU\nQY6Xe+DxrwNOFy+0dmVW+TAUX7LYOCbjhfszq347m6enTV5jSKsHHQ0WyaDi\nsrXr\r\n=mjCC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDgS6iB4HQizYAx3NR4WhblfXhDMXAqxEDM2SD4ouY4wIhAJtnzlrjHbDGm1bD8z5kHGUrDlFIgFUmjjB3GKK/ZBQe"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-5d1079c.0_1550059777697_0.9830605551902092"},"_hasShrinkwrap":false},"0.0.6-c1ff403.0":{"name":"graphql-toolkit","version":"0.0.6-c1ff403.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.120","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c1ff4039121e36cdaf74bfa58cbcad12430e82fd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-c1ff403.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-B+XlunInnO6OOIjl5b6eT256WeUfcgkXCzsKPCxUDDwhxxP9dnvJ7RzSIDXisUvm8sbXWnFdMe8wiumPcr1O3Q==","shasum":"e68b86ecb6060ed2d47ddb9482084581165f3633","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-c1ff403.0.tgz","fileCount":157,"unpackedSize":181496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZGrJCRA9TVsSAnZWagAAKYgQAKFj9Tu8RtNNUMxlkbL5\n/RlQ7uyN9Ku36z/e1Tei3W9GccnFVKWVz7PnAq0v6jf37GJcl8qBomCYiwxo\nLMxnd2uoJoUbKWqNaBVe66+XkQXjPiZasNrPM6cXA8tg1zfDH6u70qwSK7bF\ngY7UGPDC5ylYbaor+WYUlqEWjjEkqdJ2gw/EAXiAwkpNOqoq8quZ1Ib6+OqT\nMiCNm+MwLQy3C+44fB2X8VVr8d1t3CCQSVCNdaW1KZeR9zEkaMbJwYhtOZPD\n2gx6XtRHu++MIPYAN5RtGxC5V5H7yG3Plt6qHd97OgW5QahDJG/qbFrGm7CV\nOqIRD1qLBBYe82i7FHqxfvZZQdzF4q9vPAQ+uvkfmaFSDH9mL93CDPKI4L4m\nc3WqBmmTLY+IV2iAMbydbLXuKlL5Ipb9IOIFr+h0ck+iN94lkJ4gaci7MwI/\n7Fxu7P/CTwH5s8a1Qx/5mtvEqb09b7r1mXe+MsxNMYHF4DaWdOxBdfFAtdIZ\nDxULVcLcE3UubIW87LBxWJuoZu+7VXTgUoEOJC4/tHpnsPMenE7nlmUfJKcv\nPXxhWryGwL2By1XDRAYF5Sm1ggezN058PKMwiQkUOXt2rdODMR66UbPxrc9H\nmj7BmsfbnPhMkHVWdsdHdfSIEiz7rW5c6PL/Z3tKJym9g8aZjFU3IvKRwHx7\nfChB\r\n=nv3Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6YMb0ECW8YCmgUyPuPH2HSN/aLqJzev5p0NAnLi3ouAIgYZPrFpIFLr8pdvw6e3W5jtqrXlXv30i2zjm40Dhz8Mg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-c1ff403.0_1550084808904_0.5021541707508481"},"_hasShrinkwrap":false},"0.0.6-783fd34.0":{"name":"graphql-toolkit","version":"0.0.6-783fd34.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.6","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"783fd344eb5bd118a7eac8b5f62637c88feff7ae","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-783fd34.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-D36vfrc6vNhXWuivA/nP/kNu2cjpEpOl3R5NUXts+xOd8Wl9TIb6AeT9kJviOq7hDV5AD06QKxEi83Ag5tqbCQ==","shasum":"986e51c521be46c54a43e0c4df1d39784457c49f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-783fd34.0.tgz","fileCount":157,"unpackedSize":181496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZHMzCRA9TVsSAnZWagAAgCwP/jd9jXCPHIGEiR/hdMDP\nF5MS6q5s7eddm/xKtUxgncWDm78b1h9uP9v0v/LtNPiF23OpKdcLJQSU6Y9d\ntEuMwAKj+fXLCzGyzse/nPpffgPtvg66o5DDQrDhqaBwsLURcbAm5+uYDe26\nyLFs1FQ89zS7KylSi9johP0OZTE39PqXckQGatfKAaLKgHXbNzk4kXs6RwlE\n66eO1oh5tlnsXTs8b9195I1KSxGV41b+RW1TY2DmbyBeaPlvLVZ1GN9JMNm9\npMrLcats3YCPsBkSvu53QurpWw3htnX3OZy3pmQDjDT7j7kFQExrFw0sXWTa\ngpAwHQWLargnWRUtPkS9+e2XOTiYqzDtIc/JJpJalKlANPNO9k4N3f0lJsrB\nYL3RgBZkI3QOVw9HTY+x5OPwhjr5yxcrxKGpEnIwJZNKX8OCjoo7h4xwk8BE\nxM3NzKvr8tSLowbsKi57RY7jl/5Eng3yB8pctwjiHVkC7HBZomKwIg1Yyt0A\nf00e8IDutAXCtgOlLecIllZ0YtRZ5Av5GGZ7h2UFz3ykHcOdhftmNbAKfLN5\np4Ss8XM6WKw8rlA8r5wwli2gC9Q1CnOmnOm8VquSJ7lgyk7HTKWSAcmZPA68\nVWkcD+dMYbUXn0Dif/XOExiyDFkktRxEsQMUqXePYzUa6OJXAo6kPjiiYdZE\nUYCO\r\n=GtY7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBm/bJR+S3GfwHkg0i2+zflfdZMXVBxPLgLK0epCwnyXAiAfQsNE/3JXoqWnw8pw27Xg+dBf9liimBerB7CJb6bO4g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-783fd34.0_1550086962804_0.2232750052952841"},"_hasShrinkwrap":false},"0.0.6-bd956dc.0":{"name":"graphql-toolkit","version":"0.0.6-bd956dc.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.6","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"bd956dc29351eb85efc73d76214cbec7deb44bc1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-bd956dc.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-TWHPP2n5bH6cYW/XyoyfWM0EVazUngyiNolqsuW4MH6g0YDF0PE5bi7Y4tdh83Hgw2dime+l22MntV9OuuDCpw==","shasum":"8b996d9dc0e9d5a2102ea16e8ab759a748973a53","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-bd956dc.0.tgz","fileCount":157,"unpackedSize":181496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZPSvCRA9TVsSAnZWagAAgHoQAJg+E5YSXBWesJz7pV+w\nZKCqJZQU9wJnXPS4gOuYTtrV8IyJjMCKKIXbNCsZ9QsKsXMWUFc4iNrCQoBd\nkMXM2kAD2BAnFPe0ftHdHi83B3+pIQJN3QNGow8bIiuaLQSzrY262l2Ws/GY\n+VDMsw7YxeTx9i9xNwfBMfuriDeLQMIE12PzrDszxePTAeD25vLuYW8yBMQa\nfAmaWg10AXmMuMKZ0BRGhV770uiB0uy1VOqwYt3hzzUOtEekKBrcuAd5ITv1\nIf788+6+ZUPQd53fpORMORxfD9/BbFufq87I0iqI61CRuP1bN/UdBYRwYUnN\nIvVKmg9iJ90XfAEemfu2odHjv5ZyN7eCjXszt3Ou/UljmhWsSP5DyI94wL5R\nMQ2vVUOgtGoTnpHINbdDiD8DiMbUTUq0qLnCRjacwwiotp5RXts3gtLUp4ZS\nRGPDC91aDyvzkEUNQwXxw0KjUEZuLApqEHY33t4SYaRjW3Bwvtawpq5xVj+a\nWTM5jG3qfw/iRj2GE1KhtvFgkCtgvzh1qPZZjVpdVJ8qyo31WcywhjLdIrll\nopIwWclnoLDeJTmvkphlPDJAp0F1IWLcmQOuPMUQ7nKd5R5oRw6zzWIEwZwU\nHOc+7wdwfV55mdLHVPkPTNv3kuJxqi63Vj2+Z7c+d81a+gfn0QaUXfBXvR+T\nQNpM\r\n=VEnR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKHDUb/H+zftRfmTxPKqVEp+etoys8v2AxzngnQd+X0wIhAO+mp1MB/TKSHhcoPrCy1pAAS9TXqRmVH8wq/Us2Z4Zq"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-bd956dc.0_1550120111061_0.5572131311909188"},"_hasShrinkwrap":false},"0.0.6-7ea81cd.0":{"name":"graphql-toolkit","version":"0.0.6-7ea81cd.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7ea81cd15a494d7da3940351b2c19228a5e9148c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-7ea81cd.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-U3ooGBBjbrbv+j4FzcPZjDl9b8GF3zbsnrq/uTyQSu8OrbzGpT790GYUygvEjd4zpRjYwkvn8t5yKTG1LWXEkg==","shasum":"29a3697f546b5fb288a57ba27b9b9f70ee5a0065","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-7ea81cd.0.tgz","fileCount":157,"unpackedSize":181496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZPS8CRA9TVsSAnZWagAARxYQAJ8ieYCDCLI4/sBs7QmH\nROIU6Mqvd59OVOMvXoCVdX2Hh3tF0gefCrGp+3ux3yXLr46F8gtU9HeqrUmD\nHkyPSHZ8MexRHG6Ip5hyE3h3Hu9QopPunB2ZvisAYnkKhmraUVgd1tjpzHnR\nhTsFP8loVWRU4iblgaGidAe2E2bqySS5dbHiBzSoSD6D9c+18B+rOYVM/6tp\nHYjOGu4n0/ZsQy58FhwfWD1m2NY/1z8kWSOuwLSnt8OO/12mNBdI/5H/REV2\n5xzArfio93qqVWzX4Mc+k0S9hkntdksTBvYUJJfAyt+QwrsSvBW17y6gESP9\nWewdPRnXhjtSPPER+O4Q9cZ1Ix8EBqUM0nTRAuXn16A//o97nvjNzJ5DeNLE\nM7aNzqXxhKkH7sVFvZ1ukOpPojqtEiB7Z0yiF0dP17qfQHI0v8dxQ8TFK5cT\ngNf1KJAYQSbGNbS9k8bvWMLBqO0f1/KNkcA6WSwft6CGJgtfazGN3xaGqVx1\n3Y/i9Zr8Qns/dpbPXPqzYqDjLQAOBREYaLNuI/v8ie439B3umxqLjUYoXhCh\nL3HWAKW876wzeGyC8dZeygmZhd1MnhjwJECaAlPD4MXtroP8vESxc7rfWQat\nXbb5yRqJEQrKkQUSYC8CVrhz9fgpU8l/fFrYSROfftaQnL82BPbAL3ngRO9g\no86I\r\n=+/sc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+UlBQJK71alZewKO+7M8F3OFniUSom+pSFOVnu8eIdAiAeVEKCUYO+RwVQSil6ytJ89apJywIk6Lcsp1i4C2jt7Q=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-7ea81cd.0_1550120123573_0.31602726604713793"},"_hasShrinkwrap":false},"0.0.6-a2f0179.0":{"name":"graphql-toolkit","version":"0.0.6-a2f0179.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a2f01798704a08fd55188248d1e6c8e12b664aa0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-a2f0179.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ZtYTMWviRJOpFEMnFWqRhwpeGn0nKOxAm5NqGtM+bdAmmw53sR4z1JuhLbDUenmK9iNfE9rX/uvja3xPJf95hg==","shasum":"b8c151fda9bec3f6725d9d55f273d33f443bc940","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-a2f0179.0.tgz","fileCount":299,"unpackedSize":303267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZRxZCRA9TVsSAnZWagAAocAQAJ5xV0mpae3MRqnSNwKr\nYC+NaB312NCKPNofgOFMU8MPBlocJA0roAdxPMRJAqV3qIYzg2xDWdGnpURj\nTV/tw2GVDoqdRt8OPAklNtCZ8gaIfCQ0rrTUHPh4C7SDtnnej72pxaPaPCkx\n0I7x9VB8spwPto9jt7H5NIhB5ZLe7qX5ZeB0lRraiF5TQQbLHC1YRTk2eNiL\nkVu3Y6ZgcdTltVgcD6I9s3co3bB2E27APduoSQy1nZeOnWchzbkNC3p2Bado\n13CfcU7A0O7D1tjqGLPGgKWBI7fkdYyMHg/mcMaf4dnZe/+wbFo390wiqn+L\n74i4noqecGLMQONScEZdPBbHLQOn2W1LY2nVkWEJ9LoKBFrswNKSyMZ3hhvR\nODUq9NnLoiC8D7uxK8oDvRUhcoKM5vJtcCbBU6WSFZ+WOL7pEZVNoUv3rmVF\ncCK7+s20qta1mStYneuTyiMAdyxZY7bvJj+1fMQfTBt8axvPII4Q2SP7r8EX\nPEZQ9g1TDCoy8tTnJ0RPuhCA6PwK4w89C8H2X63xLvfij/ZiKS1uCrkjKc4+\ne8MPaMi2b7h3CIcA2feKUdTaZ3LReERzAaB4fkn3KSAbGiB0ah4nGM8Z2LdA\nPMro9vuqO/Otrf1lo2mjgHWywTG2R8/xrEIOb5GLJAU29N4sKlkKr8WAE+6g\nuYZT\r\n=oGHF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICSzk3YCSqX5Rlzyt1NpJY6D5p/P/Smkd0E2+zYCugrLAiEAxbws1YzBHsQeMXKthFUuQ1JXyTHDfanIJFXLmAUMPzM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-a2f0179.0_1550130265049_0.1619895638193456"},"_hasShrinkwrap":false},"0.0.6-87d7109.0":{"name":"graphql-toolkit","version":"0.0.6-87d7109.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"87d71099ae9e3e79d8d9d43b1e8154957c1563e5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-87d7109.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-SC6IqDoSfGTjfGRp/Hjh0XLrUIOVeotYXpxYO3KP4Tm3SRYbt2jkUflYJSUK3oG36Yvth/ZAYy4YgAh5aLtkGw==","shasum":"8a7614a6a08b4853ee219697073a76a1db3ec479","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-87d7109.0.tgz","fileCount":157,"unpackedSize":181496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZvapCRA9TVsSAnZWagAAlNYP/2FvHbPa21fqMSAO8zfM\nihH9W6Xw+4KggC5e6S2/O9lCbUGgGtTWMQaDLzbmRvWmxti4oR1bubL/pL2g\n8tjs9SmHAajyP4MYnC5SJvUHv43r7s1aY0rXkeYsxrysXfy7//jfbiVl3JGf\n1S/griXPRxwVp8Z6TGjX0ugTi8RDHWNed1lzc7Gk6vrUdlQojaPCUQSl1UcQ\n+wkL8aR0osMYQFwOmgzUuhTaQyqmcO/FRxZZiI9H/9bTaSel8JiYWElF6mrV\nnAh7nxSocCf24KZgL8BSENtN4RFbwKZUaFHR0qOynzwLqYEM8OR0OwKLsoF0\nQX2hpaIVPqvxKOH/2UmRjd9ORj/JlH86iApywvrpryHkG9zMoj5piG6UpROC\nZfrn2SVR6+aJTWqqvMw1nL1FnzUAjfimjrr6pSdxkxUiEZesSJnpgWhTVopd\nkDEuMotXEHh2GkcyBPj/p9IE27twZ/XhJp0vMxhXBnVM8GOWwx/vFjJxRLn9\nOFPgOxJmz0ZwdfponElE/ovc7Ly57eA1Bv8vQb5+5gcAridmHoUhs294z4Qb\nG5ME6uyBXvIYKGzVwkRPXOhFu0eJ3zk6BATaQnkklwoz5Ufse9pMP7jbyyVX\n2nXHx5RdKwTLV5Swk9vD7MMxkPNfOjpKDn+0pOkNU/m4NEyldVL9FY7qWCCl\nep0X\r\n=Tje8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZaK7MSnytOZQ1AXmCNqdPOSYD6+gTuArhiuF7kF8j/AiEAhxblU9j2Z5aiYUOnXSOIsyKPKhKeQ3CJokAglXHWhyk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-87d7109.0_1550251688310_0.36513428734311315"},"_hasShrinkwrap":false},"0.0.6-75d576c.0":{"name":"graphql-toolkit","version":"0.0.6-75d576c.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"75d576c236432cbc408dc076889861ef5d2f3410","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-75d576c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-qNIKzQk5RyRHLzNxva3BrpA4+k3ModLB+q4mPG48XIGcFfPQpJUWY20wmBn8I/VolvFFYCDx0zdpdhYh3p2/mA==","shasum":"ec6d5aaff035113f243ca1c59c2acbc6d50e1e08","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-75d576c.0.tgz","fileCount":157,"unpackedSize":181496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcZ4BLCRA9TVsSAnZWagAAG3kP/03R8ar0qqIhgM+gdL0i\nzygPFA0Yeoad9m+iTycFJc1ePDQKDsdDF/7V0Up52VQp9v/vRGXkPoILGmHp\nfkupSoiACr9u7WPCXDkbZEEloMYt8jTwV8+N8p4dWltwmBG9kTIgxNVtKt8H\nIYpe/Mc+/MXMDlecxubtBARJMGlyqDW3XL/CLfRdiy3RMzakXia/WCiHXU3X\njNt37sa9V9nVgf1S6RR+nVsNa+ErJB9oL2pi/XWIcAtkmf+dCpCzlrbfD2BK\nYxyr/xPGAGCxHFCkCbWxMFJL89wONnxyJ5yG2P2MIUJgAnrw2dWmJjdpskYu\nesJzjMoV5yPrfkFWwZQJpex4Bt1FDoWOKXLI7N2uod7oOn+nKd5M9xpjROxI\nKF2IuhoY5H2tTiGj+7UXTebC0nlqQtiDKrB8fJ8fTsRbxSvk7LLP3MI0iZzi\njsOXZE1++DJle5rPjlmd7/aTd8NfTQuGjeOI9mosLHSRI+2Kl89HtAqr5p7w\n1eG6b3z2K5h7uo30h0CeDhilSlpPOfqA3YEnPiZuyvJqrcjw5HS8ujciGQix\n3SqP3jC/2B+lO658EYo7T77fX7U2a1c2+9k2+MmCkCPxfPaO2PAV4w+5EXc6\nsmttOcnZb6e5KvllsMfXwuZ4Sbv8heShRsirzaZ4Mmy/H7ZrXWltb/QExIhx\nr8TP\r\n=lOvO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD63XQPN9sL8OOHW0IaeK/lOkLyH/06xXTgJvvW71bEbQIhAMplFTOQfv1ZFsF4VxgNQZIorjYmXM7Iyj7za1OiQ4yh"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-75d576c.0_1550286922598_0.4486722767140281"},"_hasShrinkwrap":false},"0.0.6-e0308f8.0":{"name":"graphql-toolkit","version":"0.0.6-e0308f8.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e0308f8cb36c5e671def07af43f6f3acbbed307a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-e0308f8.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-/vXZleeuz2b/lpJpHNJGBe4b+34tgd9KQ6R7UgO/Fk/wNur5I3BGIiy7HfCrG4Pgx31+aTtpSuZWbksGMeYFjg==","shasum":"4db1e609f2dcff89f86f0c4a1c9f8f390aaffc43","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-e0308f8.0.tgz","fileCount":299,"unpackedSize":303279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcamRLCRA9TVsSAnZWagAA5JUQAJRB4OIBQnlkboySLeDJ\nuQUSIgoiwkA+u2fSPsmPo/0a6jaFyjjAowsX4aucPlCYhVC60FghOZEJvFdh\nVTcRA4G1KgTLQPb2/CG580AX66GDJhrD++4STgkcpXLRF0T3Pj4eoCM9a6Mf\n3ZDI0AVvNJc9wgAs4HB/am+AMnrS3L0iSsjOCvqUsN6fps/Cvgt0hx+35UXW\n57jagpAT4v2dZmvjU+l7NM8G6R2DHxeukeh1tCMnJEqy6Fqh2kE0W/GT1jdF\nc0jHz5nJ4poY1Q+8/7LFW2RatSiROBRmNPb0eVZCEa8VFrIFT2OCP/BDAC8t\nN4xErbt8Hp8JW8htoDhZvhAHSsMK/E2wFXgwuIh5Otj20B+4qTi1gdhV+dSB\nOc5orPiZ0AUWmP5UF5EHR8J+/6Fvd4HttCQz5BSp4Sx01df7A/BmqFBSqXfa\nB6XJBrBnsU4xQUQhjr4X8QCcYnCcvJ51bDyuMOc2G6/wjpFypxFU1qQt/GNv\nz6V7KT3q4kDHHB6SnhqMx0CnpnEe4nti/PIBD+vxERb3QyeV2yVT9r08djsW\nZUcbNBq00JGqiRxxj2oP8Rf/lGDYtP8hEuBmjnhDvixXnRbTorfYtHEJcTbX\nVIniWSTmO+be8pGuithmVKWu+6a7qCz450mYvjxggDN8I4iMqKB7e6jJ+kv2\nOCVh\r\n=D+KC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICHZbLthMTcajQAhs6PZKeYbFhObh26lwJGQHQ/F9nlQAiBy4//Kn975w/MvGHMvwyOC6oRobHUv37A1HHfdkkyJXw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-e0308f8.0_1550476362814_0.0165255947627585"},"_hasShrinkwrap":false},"0.0.6-88c48e0.0":{"name":"graphql-toolkit","version":"0.0.6-88c48e0.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"88c48e09d8a2481279665ff3c0d8b177d83d9fa4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-88c48e0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-gteAO025AVu9x+RsKfmHMWZzhJuTvqBEexBRAjDWUapIcC1XjhJAnDDylFl2II8MdypAAxQwYgisNxCJCZ0lJA==","shasum":"4f86a3b28d087d7522c6c3ff7b0a52936c2f93fa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-88c48e0.0.tgz","fileCount":299,"unpackedSize":314965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcawLJCRA9TVsSAnZWagAAdhkP/2hHs4J9/BaD4SztGx+B\n9lHK2oKGOZZneFuWV6EMedxMg762g09KB9VvxUI8aYJnzdVUgtdwD+vjbdd7\ncMgwCDc+dOcGYLrlwHAQVrl/kwcgNDKTAdL37jPhPaUNTC6Fg1VrWZaJf9CT\nsrlpIfKkyaKgR9qddWq6vJi1CQQktsgf5IZ5sG1hSqxTIQhT9noMkrAttwV/\nz95RZIX9R+k+UsCoOjszPjKQGwxNCcUn4At98/w4EvUQbFnkJhMf1YNIvqnJ\nPgYn0YdLWFNDAcs2j/uwdw/W+Oej9OzriZao20SK11FpqvxBawLGqvgPyzm1\nLP/FdrOpj+wWyUxNjq3/NOFmQpfs09pg6nvlPj39yQ9SOJ7pc03jW/CIlRmU\n0kjZjTMv7RUI0eag5XTz1ggcxuynEh2AOxRTGBMRCvehQhB7IS/ij9bT39uS\nbLSF1110/V9MuJAZ/TwX3ScvK4pN+UOM0AupUgiMafZQ3DLzHuUuJzC6Gmea\nqYc1W+fwEuzLGx2q4Co9d3ICewjEoxNoAm2BF7JuqXM/0oPBHVLz6cn0L7Ma\nodePCGkiBW+rNGf1IsyVV0PORWu1U7SzIAcrlo5hch9ouDbYJTkbA29J3GkC\n6q+ZaV7DHJKxvzD3O5qT7643GW7Sr8wwMBfuN3zbOsz0dljz8BDoQMIM6muo\n/iOA\r\n=dWah\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAkk/WPWc39Mmkcn0h2dII1/OpT8cZRMnofiLNFRac0fAiBqeyQYOcRnKWyBkcViRyk8p+J6zx47irRLczYz0YodFQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-88c48e0.0_1550516937209_0.3600765079744277"},"_hasShrinkwrap":false},"0.0.6-fc51064.0":{"name":"graphql-toolkit","version":"0.0.6-fc51064.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fc5106476118881dc20823efc63029d0dc8b181e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-fc51064.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-HB2Bk+aGRUKA+SONZsqsvjJGfiP893KtsN20j0hRUIEg0vhPKNVGi0zq0jMKZjHcK9OEmW43pE30ghcIpdYNUg==","shasum":"4c048c7eee0947af549a2e024b1767da80c91b48","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-fc51064.0.tgz","fileCount":157,"unpackedSize":181495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcay9ACRA9TVsSAnZWagAASWcP/iVX10ul7fI7U990z/ay\nFl/x0uKpfgv3j3TPUJe/4ButXzykfx2ZGQO33q59DIj9lsXsL6pk1gv1S+k7\nR1Luq0S7YXIrzspf8wBNUj5zQY4OiooIAQcwUW1yqJWLfKyTPAlZeChLdxUp\ntuKzoj6vOAIBlvbDeDklX7WPqX3CnmjfgiHkV31Ql50TKRroJUjoRGXJM0O2\n65IbuGMLpWdQ63WuvhpkMBGQd2ILyIqzX9+ayFfym7ChrpD4+VUQNH0JPnTv\nZlclbQcG+pGS1KwJicPly+IhtCmjdGk8OYXtVi8TImFM5T9g55thpXJ0Fw7K\nqvFMCt+op7D2CV6H2aNHxJs2LBHcYrDFl1ZHujP3KwIem0TZUJDnSunnMaJc\nGPJX/1mxsPpZYAN2OOZEaqh0N8XDCj7ih3YjlxNx95CHgkyt/27YbktrQcg+\nW8dYy6tjsmwHtfYe98A6lRC5eTmgsww46RzLHWVxTh82ALn0bIIp/k+3YFE5\n34UmMHbiTOsObL34UJ1wFEmenomKNThyIs+Xtt6FLJ8xBUDhcAP/Cfmq23Oe\ncw+Jzspcv2iXCGR0uJO2zkC079yFY9XahNHt93AGpQxw2PPz8Ct5zVDUeyvM\n0ZNUUpC9Q1iWM5Xr175jAkCTM8pSo+Fp/DFZAVVHNB8ZVX2SwthwUZjEq+tt\nwA7O\r\n=Ic6D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtuQAy2KtTJzTAll6QffDEEtyAHn/IOyekiWG1BlP4LAiEAzcGVoXJq/TbEOJnTnLk0ogEW5mt7JF0vHv5wtOL1Jv4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-fc51064.0_1550528319896_0.5755453387807135"},"_hasShrinkwrap":false},"0.0.6-f8f8869.0":{"name":"graphql-toolkit","version":"0.0.6-f8f8869.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f8f8869737e0c23989b53231da70a562f81768e7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-f8f8869.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-b+9gCxJ5b378yM9T1rRcT9UToaBpsq9cnwmjN7o1Y2bmWHyYXTaWRkGNLGffhj9erkC6bgC/vTpjZqYxI8dsvQ==","shasum":"6b28e3e13d0e54d2ffbf68b470e88e4e32363a27","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-f8f8869.0.tgz","fileCount":299,"unpackedSize":310341,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJca4QSCRA9TVsSAnZWagAAF40P/3sRMRJVUbHcrWif/aqS\nSVIs9zFKHF+Yw0J7ZSRc+Yl2mjb1jtR8P3CFCCCrP0gacFt79bjiYukdRUKH\nRbkhRTUm726cXN4kUmppMJZFVNqKtewOWu3Jw0iSihZ8HpktUios0QnDyf15\nO6i+v012a8XWVpf04Ze/cCqG21NtXZfkrAD8sDSzbMd+6u8SqFEJFa/EDBbp\naZqAttsJUu2EpNGUH9Wlmn/862FNOysK5R9+blsh9cDW1CnFaUJJJbWthXPA\nHsikYnjmp7BMHhNbERoA/BB0K3lTE7GodVoCmphWsZcjL86G+eCoIAZZI3v3\nKZ23GH1PCaBfmnDL1d/ZOPD9FUm8VZdA6nxb7yfAhTZFRzEN/Zs6k4j+wF1O\nfyoXqLz/Xk7wS+pBPVTHNzUIJDoyUj67VXHigZ54bvInPYs1bcPDRr3eNHIF\n/9vo0RqlpPZiZz7m8O+Isk/9ZvxOJPHrb84d0xA4u1L4922D5ewrfKHhT48N\nyz0kaweXFHBsrq1aS8m8L8FqWBd84XrA8Rk5DLO9TAArV8yZg141g0okk3/2\nPr8WJqEQ/IWaYFC8AupkygjZi/xQOlPC/M5bSSQzwSvhADFZWCT1+Y3m9AWb\n0qhSS+XB28Yoz+3vJGXOUNCF07fD4KMgLwl1PqBmTjjo1j+loMAqwbG8CNRA\nNzld\r\n=XXOM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFQ7gd6iMqFKfPIUu6xUfVBIjd53o5+TYWaFtiKr7lWAiEAgyfgjOEOPLQqq1Mu6Z6jTl4+2lNZJJk2IfgEg884c50="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-f8f8869.0_1550550033928_0.3923990116147873"},"_hasShrinkwrap":false},"0.0.6-6f0f152.0":{"name":"graphql-toolkit","version":"0.0.6-6f0f152.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1","reflect-metadata":"0.1.12"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6f0f152e89d77d02cb1151b4661135911b15a685","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-6f0f152.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-biROKKbxvZypA4Edn4amOcLDcvi5Stfj1gjlw5eLGZ0mxiU3yNMMLaWANfKyOBtvF9NKtEiMoqw2l+4s5wNK3Q==","shasum":"b2cb6051d6b64bc3409a9772b1085d5a2eae2e4c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-6f0f152.0.tgz","fileCount":299,"unpackedSize":311211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJca4gRCRA9TVsSAnZWagAAAZsQAKDYyZM1pr65Fll2lP1z\nv9K5y5n7s/vCQGiijWV1VVPOAoBJ46BXsh0HrzATu/g67zXDryg1pcfTbHqy\nNZybl9c+ZaqtHq//ddy8/0iW08A5znZCQbdOl7xEP4u9Nv2mZLtUEZbhAOmA\nn0HZJ33F4wB8vJY5QKhV2ZehGHL6FazMqqUjee9uGpDVWvfagkxVJhgJF+ZG\nH5axNxk9L4ENjrer2fauOTmZEsZffrnPQ8+iW7B5WDW8s/BMdl9qW6pguvVf\nIqAhoC6aCy7fI6BRBjotzXyBaCaMwRVH2RuHCkqZ51fiu2ipzTma9HkpXA7D\niEu6dhaWhoC3Vguy69Gi7ttKPcjMhHXhLaSAJmEKOjhq0E+naiq3LrvDu1My\ns7Tp0twjRKTfQYlLFqbT9cQedYLHNEEPnm95xinsvxiwQEvtyLUMf7IW6ofz\nJtcRX0bsd8pSSf0fIJ04ueDf3Jook3qQ4KIfTOCif9yKvvSlOku2zTqhC7Um\nnVnvi8ColdBozWmZiZHxGvNymwd2xrR94OyJcHs/3QOt7z48t1kmncDBHeF3\n671gPrIuIp8f8Ov1REOhQDYnBQ9Q8v3OMfu5zQHXyEHREiZ+4NLkYmc50qxH\nQXPQ0A42Ja4JM+03X9NBaFLBdnjdV0bZtYhiZrcKWZsG6hL9LBACcVZK7xrz\nGXNN\r\n=foLz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFRmF/NoHEYj8HlMLO0qaexAcK6ubmfce6dBc0hp2/wDAiAm+ifVzPe6985RjtJR8ceXWV/TPYWrbGH2ytaMaAJsYQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-6f0f152.0_1550551057261_0.9921905147862831"},"_hasShrinkwrap":false},"0.0.6-ddee125.0":{"name":"graphql-toolkit","version":"0.0.6-ddee125.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","module":"dist/es2015/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc --p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-subscriptions":"^1.0.0","reflect-metadata":"^0.1.12"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.5","@types/is-glob":"4.0.0","@types/jest":"24.0.0","@types/lodash":"4.14.120","@types/node":"10.12.21","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-subscriptions":"1.0.0","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","reflect-metadata":"0.1.12","semver":"5.6.0","ts-jest":"23.10.5","typescript":"3.3.1"},"dependencies":{"deepmerge":"3.1.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ddee125fadeffa9453af6b4faca94a578a262dc6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-ddee125.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-bsTmYV8Tb4r42Fc7pKun5M5UitDamIpf2YmWw1ROjKPMFAWrxiH/cLB/uQWjVjUHgonE8LCaHJ4AiZkNZih2YA==","shasum":"f45bd69b1243ade87f9568018386da7ddc3cdaac","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-ddee125.0.tgz","fileCount":299,"unpackedSize":318000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJca43DCRA9TVsSAnZWagAA9gkP/0vNYlIRhI5Q0Kb0WUlv\n6M5Itok6ZhphNjW/diPsRsbpLkIoHZBIlA3ySF764YNWFcrh7cINN4QYWKkp\nikVZy8boxTsa2zpe0cEHCzzleqZJjQZGDo7CYgl+FRNcpyDYQyY6P3VK7eXQ\nj2Bm0bp1slHCSinPEbhThOSQOeegBgsnSKoRvc4N8HQgRJgIe3vzXcA82YW8\n4NZxPKhxILiVO1PbzEDs79beZS19LgVF+OBlRC4eT+6QLLXhgMpEq3f5sVTm\ncxnpAt4iRisbg7JPzQxjCFDTiz0YMloQ5Og2/zTVI+qFffdozGSNmlm0VHYI\nxUkSuFr5kyLDvzXNpRfM2PvUasBt3Or6uYOY03zsJ/ytL/L0jIpkrJF8n1Gb\nO+ss1X/807PaoZJVSh5ZQD9+JNI0LLAOL+qoNnDNWG7JW+OUaGOr4GJfOrmI\nxYEiE1PW+ORrvk5g9ETNKaX4jn3PmV7mbknMlZjs2gM0Ag2TDg51GpaMw/BC\nw1+eAIcdZ3tAZday3CWLdOdFOGWGeZybwNTDDcvFEZzEQROUHZfwg88AKBNt\n1YRH2biPzjk4tZAkNJV6fuwgr3ld/51UXl2I2hXUs2GOT71aMRRAUoPY+D1Y\nL7pF+NGKYVDM78aRAXiYAWRmGKsF2Y1iUd0yOfc7Uo/yGAStUqMhOGuuUZ9k\nVA0M\r\n=dei0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCI3WYwDb+3UQj5KMBCL9aLTSF7U3X15DTBGM7nnKXCxgIgFdLZT3YeFDghyMfExKEqk4yFNcCdKf5wU1hx+jjljY8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-ddee125.0_1550552514793_0.5213491316962477"},"_hasShrinkwrap":false},"0.0.6-bb6b66f.0":{"name":"graphql-toolkit","version":"0.0.6-bb6b66f.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"bb6b66feb1957dd356a0490a1362d3c58f1002b4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-bb6b66f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-f3RcBfBUYha2QnucgXBNI73wFjHgzHK6GWTgoePnNnBlYPXUrExt5Oy8UWiBwETJiyRW/IwGLoBWAB/GYWox7w==","shasum":"c1ad08275645606afa9c1122913acc6df17b49fd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-bb6b66f.0.tgz","fileCount":157,"unpackedSize":181495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbtjzCRA9TVsSAnZWagAAHXkP/jksEi3srlBKBwL+BzLn\nfdaqxK7Eq1XJYOcfc8UrX8Ec0wdLBJ1esN1AzLN0CaopW/HsRWgKWo10LwH0\ncQs4wrM+cRrYsRytrYhSdcSUoEqjZNwP5RicsqIAUavV1IqLKpGCl02Hg2aC\nr8ZJjxxGxQnHkkd5Twc0UylqlY4Baf8DniiabmwUGboRhCZH0wwUhR32eaAG\n4vr1UpPJgWJeO44ZwRiS0yTtTvE1mAfGStrkW3qXhOG6jptpkJQXViNNQhaL\nIOOikSHB3HzO7Du73InKtxhDMWt9k0VD11YGkIQJs39ttcSVnOv+PxldmTdf\notsJLqcnMn2Z//dlJ3bSzzFPSwfFLBdvRacGctV5WV7DQ8UILHT785ghIg3K\n3Ebg0PiTL9dqkxBSRpusekjErGDgYSYiovHwvileS+PGjITzo2JdReFn3m5u\nBd5r5Bx2XqZQdlHURTaIl9odnD9IOQi07SuOy7iPn/boi5bZRKhAMd9BMPyc\nqIxYtcOb4kY8fA2kJh0rUi4w2dK1Pk1qQ+zWMFpxdVQHOnCfTdSVucA4ba3e\nzG7ShwdI8oJlzrx9tZg+cj/rOJdn95k05z+cmjwuR1GqdVFIo/aIJeTWNBHi\nUK0PrN+zj7UX4GMgk6kvwwkq/0T32HmSl+0Z3Psls7qKQhxBmVNxmbEFRIBE\nPfIu\r\n=suSI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE2K7SXd1as5XfZ5XrqaW6wRNDYgINfzQOGRMxWZbidMAiEA8wh3mBcEsN4Vz4qgYRb0ebneWNCmqovlSbpPeaJCwBY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-bb6b66f.0_1550768370155_0.3228570967066997"},"_hasShrinkwrap":false},"0.0.6-d6598ec.0":{"name":"graphql-toolkit","version":"0.0.6-d6598ec.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d6598ec3cae6dfa6821a26963ed0416adb8dfbe3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-d6598ec.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-E3Zuzk3aR+izOgFCP7i4vqGprDj9lr/dt56QOC9C4AkSyAKS6uO2eRFGrRQSN2uJ0sI4kB0d4BnGefv+dbcLQQ==","shasum":"919f29e90ed586731b0197eb2616ffa68e679601","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-d6598ec.0.tgz","fileCount":157,"unpackedSize":181498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcbyh0CRA9TVsSAnZWagAAoQwP/RVZShG88dmJMtKh1o5Y\nvBY8Og3dSYRRFyMw/kwpl4cUHsBzeld1+/yKbm+8HAboMv2IlzDgFyP/LqyI\nqzGeOlW9NAeYsWYmClQXN8/PduxZNpZTlbusBcQGx7OvsK2ZGL9a4NLsnlwH\n4ezKySM1Po+4sLsycKChzS9aipqQqU+ArLqVIk1rpOFwVe7xcHX9SGfQWGyv\nWWo19umuEDxvsjuxjUZyof55/cpPNly3EyuZAkC4IPZ2YtW7u9mSFJBvTsY9\nVmY250eBVf1GqRTl4YWprT8Ll42aD3+StTdOzRV6VebEYmU0jqHZgsPAtbqd\n5TYLNTDe/3apv4Hb8Ejqwe20jUf30f+Pi1ldOHi0Od0U6corXNVxNk8aYzlS\n4F1s25hI4iCAwRxCpNzjrW46bbgv37cOHlsCDNywAvNdfP2dvkMsKp3gPifp\nJTCXHfGKmtOtW3DH+KHO9s3ufMqJGzexghkYcJRtF1+Q0eL0Op0LIMjCWASC\nZIuLR/mOPkyEVEpIEEy9Wk0/zSeKGvfig6NwvWW5NJHaZ0P5DfO03bhKfNXR\nKjHA09rqYutqHz7drJNeH1ZddX8QgTAzkmyAPG3+NkSC8xXdLTEeCJXEygxp\ntczH6Psm2B+AilSO6C7S0yAR/k+3xU0QA7d7ovQmJpMVPcGiiIEsDZ4sXYs3\n0Ue6\r\n=ocgI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICwEilQBloTBhEPeMliFxfHadaMhyAXiGFdggKIAJ9zOAiAvQ5v/lTf4HrZivphfqU/YDQL6c7LiewFX7Rbm3ZYYsg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-d6598ec.0_1550788724117_0.08080845388366242"},"_hasShrinkwrap":false},"0.0.6-582efa9.0":{"name":"graphql-toolkit","version":"0.0.6-582efa9.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"582efa93eb494de92eabce01b1b1ea82ae202741","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-582efa9.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-oYX+3Zm2ERWA0EDSvBU4MMjMTMcCZxCR5wWmKwebQOkKghJncwHB7Pe5GlFR2BLgCFxRLrdyTlqXNq1f9f6l1Q==","shasum":"3313f907cb7fd05968ed48bebca78ec99f75800b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-582efa9.0.tgz","fileCount":124,"unpackedSize":151038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb3/cCRA9TVsSAnZWagAA8vUP/2LqJ9jQUbVBSqQ7cDKv\n9/Zy0uFHl/OdEPgLxsXxWSeUFxP4gEn8aRHzooFf8EnvrstO85XIBCO1OxVH\nJqUs5yiKCxOHqBuXg0TueYRAMXD5WRcNfJMDIr8jh+ca7gtXkTdOM3Zd6KX4\nqD3WrwsJYIdvGpUr09QyKk4QBdMCGubbGZwCUGPMX6xbXsRmAt1QHh1cELVS\nsdTeY4oiSLzB9eXNGM014K23l9EOeOU6C0bDhDR8G2ia3FMq5KdnV+WBK4ka\n8jjUEnY93Lll2bw8C286i71gBVJ33qRjsMk6I7lViLAiQDcyucUe8e+rXu7Z\nNZHwWSiCaVhumFdxSEy3JG6Zmwhpk/ZxybnUtj3m8fY7k49LflL5rKcLdO8K\nWvch4TGmSEz6n/TUNjU6K7kroG4Lc9BcCDbaVu97gE+cRuEoMhtunIWqTUpy\nzOdyoqq+G2Iq1CytxPpIf6VugUylVaKDV2GSciqPSjpkMHu0Gpi2IcCsZHwI\nd9022MVDr7x4VbDaOe5YoaqfKntywkEpe8M8DNyI4lSaaH5PlsbYI1RmlClR\nLEWqH43qrqM8gKpJuTkI7ZSSiE4TTVmiz8N3pEl9WY2cKACseQ2Oq32H9jv/\np04JIb6Cg1UE9svNE1dAnvZ+eRXl+zncuF6OJq+PiqEXQyCd0Sc4o8WKQfuW\nYTes\r\n=iodK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHjEERQesbXsLqIH4k0Vt2CjaID5+QtSI3SJVTDghHaTAiBMU8G2CUN1BpAeWnST8+9utM4TRd6kRWlAIhZGN13lNA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-582efa9.0_1550811099270_0.5614558604521449"},"_hasShrinkwrap":false},"0.0.6-67ccd2c.0":{"name":"graphql-toolkit","version":"0.0.6-67ccd2c.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"67ccd2cafed5ea296107375e3f1d3335f09ed67f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-67ccd2c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-FoZNSgLMwHQPhkRBIZ1pUJnI9oObXblHAVpCpGPyC7duMphmRkJvHludBEVS5I6KzxUyH8Ujm47ujjp62insPw==","shasum":"14d57f02fa391f65d8b5618727b6f609083b7c85","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-67ccd2c.0.tgz","fileCount":124,"unpackedSize":152122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb7A2CRA9TVsSAnZWagAAHlkQAKRseXUgbarfDEPmNnxo\n7+fEbeETQIcZZezxscJVSlCxzXYsmts/c9uDNmHG/ViGofh40JlejgweVIv7\nXSWxaAHhpZw4Ojkm2JiT9Htq3753qB0FWCTmdh+Oe+B752FFy5j4M4ff9GxH\n+CTU5P8kFujw0NWL98p2XZlRvziKMvchhgOUJ13XASw8LcyiwVpkZlhJ2RFf\nOwX2kXEu6DTC+WzWvK0SNXLkFM8/dAqcPYZ6XVrSoTzjGQVKGBYDr/1IHh4P\n8BvgeejkLmmmbjp0mVX4srcQjRdb79j8YmYpKL7bt3jfHHg8iRA8cD1dAlVr\n+GXDD09MPsU0MO2JKc44azKFCvCoNjoncwx6kbzjRptAAqmVGXsRRkY8H7kf\nhfYk25nUKplZnwL/0EnANrCdRsVXXy1EoBmn/LWsH7aPcOqdZgQSAhITasuX\nhd73XSy0V+NcdQwFkf0jGZugKVRChNQxlueTjig0Dm15g2nVUIEiJuM4AZi1\nxZrn0uUO1xxCZu+IoOe+jGtYd93Aspz4Pl9R/KjtznhAwB3LLiZkHudt5/Bq\nbogAvr81BaKeUrQr6MaaBMBDM3VcZENmKndbQKnrXH1Rko0dNDL+5yVYoNGN\niVo6r+7+DAyFU8RlQA4uVbsHUxcxNmVdnCizulG5y4E9oQozxYBd2FVFkHY2\nUVpD\r\n=gxne\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9EOnD6WU5I3URfSwDCmZcItXmCBuIBuIlKR4SxASuWAiEA33Ji+keMZr7dkqRMppbJxdduBVdZd+07aArYPqHMnCk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-67ccd2c.0_1550823477559_0.739968154073454"},"_hasShrinkwrap":false},"0.0.6-b3343a9.0":{"name":"graphql-toolkit","version":"0.0.6-b3343a9.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b3343a956327d9578af4cf2cccd771e5961db005","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-b3343a9.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-v2Yh1pgmnRPPdLATjLnGRUByTQ7hnI2c5zG1MhXFJrmTIFlivWceQz2rJckdTOSlVN7ORN5rORYxMXwBgHan7Q==","shasum":"657cffac8f7b59f9994569a012625442a992dc8c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-b3343a9.0.tgz","fileCount":124,"unpackedSize":152122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJccHguCRA9TVsSAnZWagAALeIQAJde91yAr2MCQhEq3Kp1\nCjgC4myzfnDvkPWpHRqeGNZTlCA61g5dFa1+ub60Q5MiFvxKVGato9PfsW1t\n8Xg/SkcPTsqQkxDeRQr1dfVosARc6XTzI7drmOyzBpSVOYONnmYtnP0emHSs\nzxMr1icCco4RhXjC6vX0tmN2KLmkNivbgG+6j2abQEL9zxXaqv8MGgXRmGY8\n1iJR0/LTjV/qldq6dWr8BRd6pK8caoLlda5zGRtWEnfDfH0y2CeD9IKIZALG\nogH1k1JPAjNdn/sUfjuQfTVs+nTGgRRkgkiCRgvCyKtOB9SJDusT5VdiJ8mF\nrbAISyzHytmTJyFsQE3vFgPLwhLt/aL1OapXRkDN78wBfX7T7RfGVOFwTXsQ\n+c0fgZmAOItx7bI0MT5NUozdCggwRrZYCfp4ir+R17pLjQmLx2BFYRu5RzNI\nkAyHd0cHv/zCNhKFv/h9I0Y5w4H1HaaSdMJAfvKa/iQzrwS+42gzvsQjprgE\nPEVd3azp6NF3bVjA7DYXpg6pjDIWJ9abtsISEPjkSe8s+m0o6WzxkyDxR59h\nLbSP88CLd5kzik343BMkHIE2QcbriPzFbVIYEQJdUHuA07xt+VxN3mdIEyUK\nQJVLt8ZCItAL9NiINmkv7eXv5NpkzAFop5swyIFtZfpwvl07VOT2Zd2hQHSS\nl9pj\r\n=czaD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg3gfGuwL38ImG4ieFBs+GVKgg71xmDJLS7ugHplClhAIhAOTtSzTd6SceK8RL3GSRJo9ltiDc2tCfCoUpScunIq/v"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-b3343a9.0_1550874669881_0.6843212775650318"},"_hasShrinkwrap":false},"0.0.6-0f4c37a.0":{"name":"graphql-toolkit","version":"0.0.6-0f4c37a.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0f4c37a2af6e24764e819ec54878cbaab040ad97","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-0f4c37a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-iKC23ZmZC0k2+eAzbYLZQoPFNyhs1RNGWTM422FMhDDV9X5hNpBKBXyywKb4KP84jrdP2wQYKCaCtz8XnIF1eQ==","shasum":"07199277fd50652ed53a5c5cccab28249ecafc29","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-0f4c37a.0.tgz","fileCount":124,"unpackedSize":152122,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcc1xqCRA9TVsSAnZWagAAKJwQAI8o3uq0JW3YW0+iF9vW\nH01fRty+em43GFcOV/VJRkZO8JCX1hoapmWukKY+5LvazheGAoXBR55ScUC0\noL9uLzZ7OqiCNK4F08/8nFnMFkKtKXpI5nDGPC8yQA1ipq9MwrLv+k0ysUiW\nRLLZ5l3WtaslFmpfRhc/CoEBnggoAbPPRTUU61x8OpFE4zqbNVwnm+ah/7aT\nMJ7zMkIWfyrJYCQ2ug3HZo/cLFH+7FR+h6SGVYRcZNv6OOFn06zucASxj0Nh\n2pvumHq27lkKq5b5R6rau63a5loyIh0DUfOoXqT5RnzoC5bXWGL/zhSlDC9M\nU1Nx7f4N1MUzbfuFb4LoSnfGi0U/ZBKGEofuazgULV6KMOzTiqP2VPmpPWRW\nNju/bgB/Y7ViRLNi/qGHvd0AeagOi41oCDkbOgklXNBY5BZgo4rqoTScdakZ\n7fjkpmW27GJD31j0bVv/TZLZrcWJMwTY6LzF3WXTxABsnsoCbYr+aTAZzD3g\nSqPDi5Cj7vpElkVG62VQElxqKtLgMJ1ZvApYrabgcxjY9IqQ7A+YuWJfplQ5\ncXGRJZoI0lE2S/suboHCQbVjRISHizsC4aKvRAw6lF8J+Nvgml/z9SVCNJ98\nuat+8XyE6E4m9uEBcuVXjZo8pXWc9A7WD9C3JzU09xXpDzNdRcUWIVHh/EhR\n4J3F\r\n=Ar5L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtRKozuxcW9wBloUVKqOhm5TcFSVGfa0gbZUgKc1zZ2wIhAOtIE5hs45GHQWopJhlM1rC3ugpBr0AG2xLOGAPvDW06"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-0f4c37a.0_1551064170180_0.4409837832890571"},"_hasShrinkwrap":false},"0.0.6-95821d8.0":{"name":"graphql-toolkit","version":"0.0.6-95821d8.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"95821d8ae02137948a7c7f89ebfc10166daebe83","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-95821d8.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Gnch8GQ0dPg7h1Z+RWN2q1g/EWZQlr/1g5XObK+pWCDQe+zM8MPS0XPaqVBzJRR3ESuHzCAXqRSIlM6MHwN7Qw==","shasum":"a970c6f10aef7e37a22707840a8819939bcc617b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-95821d8.0.tgz","fileCount":124,"unpackedSize":152125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcc1xxCRA9TVsSAnZWagAAdZgP/jxk4rV+GJG7rEBhTPe9\nCMQ43FXmkvFqRxQTVi5iMGfwwDqU4zoEE+pH2L4g79QmyKAILIqQLkbwXBey\nA0ariXrHNCDqah8x/WKP9ztDrQSBRU5B4mW7OTluQxPbYeReIQNMmM3XmMSm\n9nSqBlLNNmPtBcnXU4yMjioQZ+Ia6si4y8/3fsDFgi3YJmHAHlLRrRnxTYwh\nMZDRDBHNIEyM8lPd0dUEmj5oNrcZtzNdGP+ThCus2J6eaXNFPE5UdNNul9rm\nNgBTHB7uBt0Nv9TTvLPd2Z4+boiqI3PdY76oiXddF8pM58ECQGdEH/CkhcPd\nb7KvNL5Evfz4BH7CN81XZlHn1m09CN22sN0DOIIJNARjar07N/Tmv8uXxci7\n3KmlK5iqTywHj34nE276xUq/Gmhn186jLbcG+z9ifrKO62orAMu/CfM+q8h4\nHfBjuTqCbTWGaWtkCs4vltaa8drn6JxMqfBJGHObi0WTnCXCfc/l+Zn+0Ecq\nBKjGlEQ4Gq3+To8+CM4OTIfvIFxS2ksRsPgyYfV5kqdltjtgkROn7ZWgkjr9\nt9cH0+etptG+ACvIpNtOK4C4D6CYhZA1qkZyRDIdOHCWWoC1l9G9+lXCOR8q\nVXnbYggRk3s/Dln45e0or9KQogoIdJujIuqHXPyX7T8twlmOLv+3C+qb4+Oj\nkQq0\r\n=dePh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDE4RZjxzoCtmsCsHlHIedZBsJx7vW25xbgAP44in+3NgIgEpPtuD+px25E2wFM367MkQWvCC09e2+oK8Tma8LNkm8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-95821d8.0_1551064176505_0.429636555769654"},"_hasShrinkwrap":false},"0.0.6-39b9126.0":{"name":"graphql-toolkit","version":"0.0.6-39b9126.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"39b91267bdcdc4b19b41412621db5731502577dc","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-39b9126.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-TNH7WP6MwJivuO/Bh6QAJftERNGYWE3rN/sfu6KlvcF+cAgTZHIKxup2tr6ZG4rXHX+1ul1uQl0OpET8pk2zZQ==","shasum":"751f1ce0ffa4bb47c1f2dac632cd68e0f4ffb5b5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-39b9126.0.tgz","fileCount":245,"unpackedSize":242633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcc14YCRA9TVsSAnZWagAA55oP/1dTxSKIn/DYkZm1eMIM\nt/xa2RluUDhmkjj0VN42ICQJC0swMkTcUnI86R3VHxAMOY32RRmCl/8sdcUb\n7hdXE/uX/F8IiVj8oI/RojwJtLGq1FTECXKviu4w4/oDOv9MjB+kfK+YvM7S\nZ8GaUA0dKlfePoag+lzSz/9IXdN+IElWhlebCtklxr3rv4HC8K2nVWvyD/85\nIMxOsfN37vlsvddy/MC4CLS1xnvm9Jvj38ixAE5XTCHeek/7wN9ruJIeOnFJ\ngKYqBYZa97jem8i/zODALfehCUCP3NOEDpwiYIjwD57q12j+gJVU9uFOF6+Y\n2gt5IjNnCyEVP1MiPzrL03kARmQL1JLXRq/f7nkhMZcZ+BwVuiznLP90yngF\nMPSzOfg699yj/cR9W3wh/CxUyweqgkpaYneqQ+NUm5LyibkF5+9DZmEsdW6K\nwRa+QOZHMvKJJbU9C9M8LEA2jY90JTFs5cUG6nq+MNsdfDX/TcluvRg/0CFb\nhoX42eHNO1BynZY/nQTjBZjdNaDIp79J5qAwWXWB3E46LhP4Phvss/+Y9n3d\nzjL9miBcKR2LzTUIdAe7w+iiMj8xQAvr9ucOTFDBVQTCRtDYCTTyvonxUheX\nBtp05SLNSVAI+EeNftpWTLpvFQ4IPiX7pr8ryWyi5znuSRATdQacVSC4arpf\nsjp4\r\n=wu1F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4Ix+kzN43mu4UA5asqLZivf67HtWJj5cSkJ66b2u/dgIhAMddCIvQI0uFX1yOkKY1GZdwK5nZI+psWyK/a98pUFGt"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-39b9126.0_1551064599647_0.4493576656192657"},"_hasShrinkwrap":false},"0.0.6-0c2a5a2.0":{"name":"graphql-toolkit","version":"0.0.6-0c2a5a2.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0c2a5a2e712ced4cd580e279606b131071d7e7a3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-0c2a5a2.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-h0/RFCMJBx01gJKp0gAaitVYr6KsGO1Bqcz+mLupo9gG7UsgGUEAXDaxutoC6u15SHur205Xa12QQZWguwYwrw==","shasum":"e690cd402a6f49e031a088d5b436586923487bae","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-0c2a5a2.0.tgz","fileCount":245,"unpackedSize":242828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcc17QCRA9TVsSAnZWagAAxyEP/id787zlLy7v0zjiNM9L\nk6KULaxK58KGAXqyz4xwQyFmjMPvPJk1HYS034CRDUsR/qpwlb5bd5Nwd4a4\nMDQ9z63423xRqDuOdzOAuuWLG8T/TXYsslfb1ZiDF7mbQ3hOXybueEXEj5o2\naZkjI3FPp9ttzVhXyY9ckh3dAHeehLprGEl231F31LvgfySEXw2nr9kLkyHe\n4JKJ9JrQgwkd3M6CK3tElK154wehJ/F0PXicx1y+BKXZj85fqE8B+tdA30u3\nOSIZtta7k5rA9WhR+HWqv4k/uMLUvFh+2YTK1kmjVPlJngBRmwe9c7ECjpN5\nkSE9d78caFgNZn97DLwp8lOBr7Wn0oGknfzbcvqfnG+lIMn3E7c5EypIXF6e\n0996gi/i2PvVO3m67o9Z1spFeeQhD7LPJEc4yl4lz52TFCsfdfwV6pf3o1nw\nLXc2WwREHmg8kTPEELEKyfJT0mcUQEA9RkvphY3ObJ59f9JPOot6T8h1Uod9\nYqVqtUecN4sp4hPH6jnL41c/ZuOkooF+zERXTgxan7088fRnz621Ibbx9HfI\nGqjY554GCd5PZ/uk6TH4LMgdV/dQeNf7vupq/PR+7jkx5mBMnbP1EbYCM0t1\nSFWfM7TAbY/6oUeOzvz/QobOhvR3kuvJyaD66RM1OdwDe7Sk+gLJJCHY6rHZ\nOMbS\r\n=IRwR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCM/AKYdgdYZB/iIni2IPQVVI+Wpia7gHDgqadWujI63gIhAPv6vMT06g5jjGrptARpC8okHNgc2IdlpIW8rDxNFyZv"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-0c2a5a2.0_1551064784036_0.6254571848154054"},"_hasShrinkwrap":false},"0.0.6-65160a9.0":{"name":"graphql-toolkit","version":"0.0.6-65160a9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"65160a9a90face83a9b827430f7e75120fd300f8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-65160a9.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-xrNhnSUJC7gAa3Y6nZf7jOE3ld0Elf+D/n7kJ8Oq9uUDhhTxkFcNwDEoLkOmqAUnAk6laW69EVn4DPTxf7v5Qg==","shasum":"5253bdc10b38d470030a69a68ae50a03ddb11b41","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-65160a9.0.tgz","fileCount":245,"unpackedSize":242831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcc44YCRA9TVsSAnZWagAA7LMP/ArzDpYPwT9nDRmuLXJy\nq/HUutufWn7GrcTgir9cxqvcA4PyosjskBrhhYzwWxn+XRYilgqAZmSG5c3c\n6CwSDdogadrH3iS0GeroRC/Qfq/t6K4kW1uWz08USNVCQSngDHRFgAd05niE\nObIekEFwiP5dSmNJ6HXHCZVdTi9JcNlwHsl6jaRhP9stOmXf5LOgeNC4xc7W\njyS/WsGPUhQPboeqLlYQWNJDLmaA+am1VBFabM96A7QZQ9Ew95F2T83czap2\nPjsqngv6DG/6er5T4uKddbrTal3+SPpSLUs7Beva4rr0yzNVGS4godRTcRBx\nj4MVD9wvHNOk/wyTAm6igzUWKADJrVQ+PrXq7IoKcXzmmo6O9orCcCRXHksr\nyQ2Nh3MQsghvFIUPh9iZsoivVRBWNWh7tzIJyOzwS1upTLoFb6AEvtb8A/+3\nsNE6KHmc/QXuU0TaOLhNjQeZWS0fMOqcsZt/dUjjTkdB5urPp30c4JfoBk9K\nHomaxhxdmPeqpHBGY+8DmH9tI3jpmjURnMwR6wdu71NgWlZPiJ8/r6NP/3B8\n/9wizjOf08oakW8WVE2cIWsMsxolVnrfvzcrqB9AlLYuAssVu57X5yoBWQsS\nNjePqQe3T/cyTsQnL7hzsA5F8pX2S7pS3E7D8mK6BAA8gKRVrsVlg22h853t\nAyfX\r\n=fPkY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMLKr9XMvthCicQCfEpXNx9FHSHVE3kRO/v+GMO6jbtAIgCRCqKfcUNC7P/9uFm3b/eYT+nfjS+EJLliltpPbT/xQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-65160a9.0_1551076888122_0.5577242342838147"},"_hasShrinkwrap":false},"0.0.6-45011fb.0":{"name":"graphql-toolkit","version":"0.0.6-45011fb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"45011fb0efe6097b736eda075b451a3c07e44e93","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-45011fb.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-5UJNb6PuHYFSEkNVk3Y6IYJxfzUGiMOR9Y8sAQgVjH70qoKBnuILTyJpUZXp6tCz0htPutuF9szVxRiTObTUhQ==","shasum":"bb06babe0e030817af1bbce6fae4b528fdd3d47b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-45011fb.0.tgz","fileCount":245,"unpackedSize":243017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdWtACRA9TVsSAnZWagAAnaMP/R3EvaEXPezUY+uhNTZA\nHn1R8AYeNTGRpFUGEQIf8ZWjBDaDrt7DnQEcQEBTWXDLTrrW/3gxGAC4nV4k\nJDLmFLXG4Q+0ElfZK2Npj0hy1SPGEGi/q/vmi8ppTIDr5iiBowBk0D52GiPK\nn+Ar3U2W6WSG9j1vUVm3ND8MWQYHLMb/ueGz6FmTUDzaMdKRJ0JnqmfUu+rF\nnmaApfauc8NNMjcFFlePJbHtxpEpAmwnWsL88VkyG0Xvsx1ZSEjQv3qPB0vB\n3M4LLboeueakFeppJFGjkBWYNUON8EwFAGhNug8g7yrpVDfTmWhhefclVVMt\ngUASJZ2O/royUeI2poo0lLpuEydqtU9/P7xd/7GqfwfFEnICq1tHm2SPzC16\nDUHuKH7OwOLLVjilY0C8iI2Cv837iPtuE3ZBwxcho7MfTJzLFqz2bxpWtzDs\nmYgYLd1leQ4G8b/OitoDu/a9qQY9D0Hft+reK+z3Y+B5Z4LO0FR8OIIuoae1\ntBNc8+cmsWi2IXOIdzRkklBgta1RvVBKK3EknA38UJ1o6w5x/jOUeRMgW7n8\nbh7QT0+lyxpLz979ZDkRcWudybACphxX0naWPot4zte0Fbo+tNx1HSiM3Tjg\nCMOojPye6hR450gbcA3fi7ylBWUbxNgDPcoRXRXgnk9nlTOlCl8BmvSs8fpX\ngd7b\r\n=22pB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAbYJ2J25Wk0kBBWqvndOhLeMFuZWFNucazABUBHLk5cAiAxl58tRgRWYen6D0FTU1XEvSatVRriJKyuhQrhm1WSwQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-45011fb.0_1551199039466_0.8754777305784318"},"_hasShrinkwrap":false},"0.0.6-56a083d.0":{"name":"graphql-toolkit","version":"0.0.6-56a083d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"56a083d96f749749c33fb197d6dd9a0148c2c523","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-56a083d.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-VEXkdVpFJ2+J+kNlP+0+HcpJo5LP7jgiBZ4X/CKfNlxuEey1k+jk7K/Dosq7x1xGqPlf8VwsjhmOSPrBQrYtzA==","shasum":"dc053199118a7ebf825a6fb98cdadbd8cb95d7f9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-56a083d.0.tgz","fileCount":245,"unpackedSize":242831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdX5KCRA9TVsSAnZWagAAQM4P/3x/+osmnOkPp7PWKLZ6\nOO6xxtwUzyduFz4DmN6UE9d17iYJ0JG1jSw1+nBnH90FVio6KfNxizP2nUMo\nX2oJrugMAZA+I+Uhg5yJa71xsJJSz8kcsOVL9ElrpSGANEdcI0i81apkr6og\nPGY0UnDmgRUMJQaHiu0e/4bhhaCbwOqrNAg+6IqKKAyBExIZ8Du02yIDuX9p\n1UkNu6yif4hkC1UiZ9yHbQ05EkrF58IokrSUUzsis1aekSqVFT9d6Q8vjivh\nLGvYaWwmnu4W86yOyR0Yshj+fk/Ho86MXvMNQDdULNbpzvw3OHEqsE20SK/s\nHFHycJQaEx4MDlIsEyIW3bG+Ndlm0A3bkMpl2Yt/8rsjr7V4DCqIi1LATevC\nunMxob9FJjlr1d6lxmm7Jo+h4pfxioeTabkO7/7+PTwFiTjGJ9HAO8h3PsFU\nNJ1EQEa9YabJthWy6vyI+KMl60kNYxw9Pp8akCmRLUoioEEswHv979GtyR8r\nrwq+vSgjIa8kOjPgfnH206CUFW/0FlppLb8boOr8VYsDOd28XekuoN8gldvL\nPtdecAQs44ImefQSmm2KdG4BGVewZYad9hjXxgxUZ+MaKYsPQkFXVTBAwtyA\nj6rPMsylZnUkXz0+xzvE10T75+iPgwUmUdiOLJ29atQBDNSkvqE+1myKyUJR\no/UI\r\n=C3lr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICMiFlBfrBK6kvfhvURhx6HGebsD8QNfSS5M5cqqDbUpAiAnU9gak5smytHMoK5pjB6g0vUa1xmU499Pq5bObBcgVA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-56a083d.0_1551203913470_0.7433184038741232"},"_hasShrinkwrap":false},"0.0.6-54bd718.0":{"name":"graphql-toolkit","version":"0.0.6-54bd718.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"54bd7182bac31baa5041e4e34b814ec7166a4e5e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-54bd718.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-cPJdgQLC7TT6WkVhlHCz6AMjnvcSpQleIO+jsHT2qQPwLagATUtVaIJYbpshhTur6uEcE0MrOOKZt4sxQN4H2A==","shasum":"db506c0e92d7eb84382020ce0fa29bacf3cb0758","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-54bd718.0.tgz","fileCount":245,"unpackedSize":242831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdfPSCRA9TVsSAnZWagAAvQcQAICuzr6XxsGUjhCN1jZh\nMWriKfyb94cnm8Moepv9G7xWGKv3FWLgsKum3Z0+POgMJX5fkCDcJ1Lkwqcu\nv5OXMaAUfi5i/UtYTc+NzQqb0dnrwfBLqYgJHEBG4bL79xopMpGCkV1pX2+w\nfv1KRdbQMaqFvtOmop8YHvrtsCuZYkSr66ab170Q/We1eKksazNULbIGWvph\nc4yLGGAtxXIyt5QyZXECbxWsJBxCu+NHIW+9TKBEe1JqGRLKFoUPh+uOMGnb\npNtA9/w4BskSpqaT2biAvhTdHR5yJkLFSOuIjU0FiCe3Aa3YfigS4LL583Ze\nkOYKTP+Ly83lYJjiOK2W/Xc8fsVmekOIFydPacVcvh+jijNVwz/cJxX2USrP\nL0i4lm+4AWAifOmdgwkkgo/f+VrPuijDF245/zbLsYwSs+6p4R4ziGNsLhcm\nf5HMFvti4BaTcenM5dt157DNxmcczGp5pUNuGFN2fsrN77ifZXRlOE/Uhwn+\neikAlnDyLF/cyGlyKFTm+BbvOpQLRqErrH2AYnxOg376lYIvl+DaWmVczT1h\nXs1WMwl+FklkIf9xMqrYKKCMaXnmCnt+yeYp8ddNBYalPRH1G6vjuceXuIj9\nLBNTaPMswoCVbIovrvdW1wViR+P8Xn7BxWr/Gq512HUrssr5YThAUvOW9fTZ\n2LUR\r\n=YZ9m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdlxmUyfCG9xolqqsZRK7EW4jMVxgBZggF9rkc1HQggAIhAK/MtLPn0GpfvHSEkFUlX8oJopcMLIXZ0KfxtcJ3Q/SK"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-54bd718.0_1551234001612_0.5964883698664509"},"_hasShrinkwrap":false},"0.0.6-2b50021.0":{"name":"graphql-toolkit","version":"0.0.6-2b50021.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2b500216f82ac282e098d99631714bf1cbc80138","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-2b50021.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3Ei7ULuDj2fJ5v/4swTa6+nxnCj/QM26WKDbskdC8E3GqzN/xyCRK5K0ZBMLLdnYfqdAgPEdOnfg9Npga2+gng==","shasum":"1a1b49cc09e9c4dc8f72ae0671d2c470aacf9c17","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-2b50021.0.tgz","fileCount":245,"unpackedSize":242831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdkEQCRA9TVsSAnZWagAAyMUP/1b+jXjsLu9nITLdGSKw\nDP8nYaKVWq1wrd6ByiiM4ABSRKUqgPhWs+/drG1lZMmyj0sSDBzpHzFVDa0S\nO+JU/7h8MXGBTT0d9xrNNSlrKTBwc6seqwk+dl2Aqat4d11WEPoOED+Yf3H/\nr8TfpAtBkEs6RTEi4fQil25ggFGoNzH3M4DEHPqTDV77VJujvN9vPpJ8sPkW\ni58WiyafA96eCav/XUy9Ka6SrY7slH4GnEddXKg+e8YPA0vTsNL3jZkkIo2i\n4eEGDoK6zaTzXiJUSz3iCZ8vTDfUmXeUG4mqebhh8MH5TetFWTFYop2Gv2ne\nyeMA7QE0XfS2UZqi13ftiFNnddVaS27m034OCYE1GHngEJqoex3ut3RHzWrA\nTxDS4dIPR3KQ0XU0dDRrc7xOOAk1P5VdP/XiINci8M+fJLg6OqfIdAADeQzS\nsC8pqZJg5pnLXX5y175lgDIOxuMY4Jan72CkKuzbS2gyAzvkrrPTqfHjb17S\nR/Bj7xZvSI+oDFQXCEeHhx4v89MmzrUjGv0IF1s2nnwTrHLLjbfZdgq//Bak\nXu8/GuEnSW+4o6Wjl/bJLx0qPRJ+TZv1MLmIFurGLf5NN1pfpKO7vQ/aJ3OV\nispzciaGpHYP7lv2mmPLMWEbsMayHKFkNrQO9yQY1rnF6/PSrI8RvsoE/k5z\n2M3V\r\n=Pm2Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCujIkEv/KN2DDyNfXMBP21j7FL0zaLchoZuiIB3+YEZgIhAN5zVxOPIrXSzZbVquE/QNUjpeMPNdG1HHF+wSDXr+Az"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-2b50021.0_1551253776248_0.6382444782124872"},"_hasShrinkwrap":false},"0.0.6-8858a0a.0":{"name":"graphql-toolkit","version":"0.0.6-8858a0a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8858a0a1116bc7236a6f29e7c1c3723cd5be4720","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-8858a0a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-+9Zcn/pmXT84qTPsYFMQGqw4CPNVC0YyiaSBBBI591NsZHQq4JpgLRpth20BnfgAak/S1Jb284Z74+mrzSKC2w==","shasum":"8d0d42030f20181b6005fea040d581c32bb337ff","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-8858a0a.0.tgz","fileCount":245,"unpackedSize":243017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdkEgCRA9TVsSAnZWagAAMykP/0zloWjNjpcRk0AqHCxW\n50ivIzktgj2YHKswnTs7hnkAQ8SaEdy0N38GJS7tXzkukEAqE061Lt9IpBWg\nXHKQ+ULE9Eohq/nL+uFv0YglfclJArBt+SDqxkg0O2Z4VQeupvYrLuuBvJoY\nKTRva+5DWqx69iQGZSPaOjGBZ7dRWbpW0FMpPdqL31YSdkaMAEbAilYDyHUj\n1woOKH52rh2jAkA2NXq1B/meXQyuioVee+JMZqtmaLZqGO3LJbd8XJu2XUZW\nG2Ai/7fsrPKaggAsLIRpoop7gFPyjOXKPYrMhSQNtawH3wP1cTT1ir5hw+gQ\n/7hbs/btT7Lo5o2p/xM6/Z3ipFiM9isVXJZyG+Szo2dbq5oNykt32/dqiD1a\nB0I8NV7CXCZTlhVwtCAcQoHrHRAPSYUPHHsamwzH1qf1qGkLG+NUK3cXNd6/\nXpOxqQCLk3gxCpeCoUrW6I5LdDWRu5Va9q+JIQWK4kP/XDNkWrmH64/Di2Fj\nH1BbKp637zMd88oEjiBTczgJ9GMon7nMAiAe6leLFLoAugHIPTaEDwI9xJFk\nTgC1f/1vJThXPjxSU7NopdKXmQ9suefGOxgc84SOtr5SC3esn43205YU6wI7\nLLkqf+rAZ6UQJbR3eyrhE2wZ55oBFYvGqk9K2qLS9BJkVLOAjhzwNSSxW2+r\nJjUW\r\n=6+cu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWYeh1DM3qPKQsjosl3HSfjcLgsbitJWRPCclNUZvJTwIhAM0bzHBG9E8nK527nFYGYIcQMmAzd3Tg3lL8UBXySEAW"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-8858a0a.0_1551253791885_0.4431822297222947"},"_hasShrinkwrap":false},"0.1.1-3dc4d04.0":{"name":"graphql-toolkit","version":"0.1.1-3dc4d04.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"3dc4d04ec592b1c1ff9e5bb5a946e5aa711d28df","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.1-3dc4d04.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-0ouUelqg8aah3GB1j+V5irubRjf5oYwHOBFbF3WJt0wGXFZ9fs8lj5jx7EBG2I1GeCBxin6IBK2Jqk7FOPXUtQ==","shasum":"f6ad68b5ff38b2b668b2ce3ce15e2049479d2b38","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.1-3dc4d04.0.tgz","fileCount":245,"unpackedSize":243017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdlkUCRA9TVsSAnZWagAAgdgP+QA9UZDgGc9A+RV1pxdd\nfr7xtNrgl958OgAU1PGqXobso+nbOJUH/BpikPO3zdEhqzOL0HoKDSjZ9JAg\n8Uc7+U283lxRscreAF2eM/upwThDUsdcQ9JbO7DUaCwgrrGG+QfVYOAMu6wz\nsDAJLy3wWpkL3GFKPFnVwO36tcEa2WHggYQPBeypcobzRsve4JoKH+i1Quqk\nT7X1bJWa7CkikNo/DeBcnJTWBru9WQbrM4iUyZt75mHI9SfZBtm4a7xaMsBU\nDsGDH/qmXNNMsi+tOgX02dltvSXpRgumGSctBHz/+KzBdTKdEBThQzqWRcuf\nyv+aARsoVThnbsvIk9oIxnk/9Gt8vh+JUx8jRu355Af5lbuxkwWRiEckJKju\ngXc8OMlBM7DQpBKWWl2tYo/0cqUTL0AN60Qi0puScoM3/gyxWIXm51nWTJsX\nGti+v7ONvXk41S5UBpVr4hEAw8gJc0C30rj4RogCqy45EHokkeUIMeNETmHp\n1BiDW2uiVRZ4khslI2KNeQOI/rF46+HuqqVAWr45/ruAOQv8TyG7+3RmAm7/\n0mOPy/bndtvHTvQhMH3EHyAhWGsTW9n/V8HCFrCReCbZscs2i9XMvidlR4/V\nib6KQm+jFtdZXvSmZREJHDT00wT26LpkpKcBXp92HR93A5Zw8ofwg6lHGMCf\ndHFu\r\n=FDaU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDTFM3fAVlUsv9Zn836diOoXoLQRHZZ70myijvExnJq/AiEAtr5GDKikVukIzHJJXWLgOqZ+0yVwH4/5/nStCjAKhAQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.1-3dc4d04.0_1551259923682_0.0010723503820688762"},"_hasShrinkwrap":false},"0.0.6-52aeae1.0":{"name":"graphql-toolkit","version":"0.0.6-52aeae1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"52aeae13923c0f1eb73122b24a7411025eae7399","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-52aeae1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-UdisyBaE1qNTvksoD8W4JU9Te+CPonpAM3RJ90pWPQqpXSDSS69j67hM9HetNVZuz5uem2/DueLDo+CZY+8BMA==","shasum":"8ff36f543fd5ba4258f5837df1f7173930f0f280","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-52aeae1.0.tgz","fileCount":245,"unpackedSize":243998,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdp5+CRA9TVsSAnZWagAA94AQAISMk8qbEorAm7YiSBAo\n2SU3RjLn8DzTAWkQ/rmqIxe449on/mNoEUtz8CRnDLhFh0padq+ndxim+DlQ\nCIfyWi13/VYLnWZdRKsFJKZKRNDccLDrqWAbjyRzHoQcUE1vvFk0ORr3rcBz\nkdatVNin5va43+cW8QbewOwBRNSgP1VLotNFOjtVT4FOJHchdd5Oru7FZLqx\ngCjjrXsIek3OYfFSRAonk7A1su9BfXzADOmRHsI7zN0AgEMN6dPp6lKs1sEn\nPo5siQhPNCbi45RWBV0gJfX/wawPoYgwqXvchsNYM+KajCQREOsph4HbxgxM\neQ4FazYnVLTiVrPQWUnK00JsKCeg3zESBF/7QC2BxE4niDxBFztjAfd7yb3a\nHevghJJCYqfw3VRHO+7kCUlliBW0UCqF4ox5lqo56gZLDuXgMcIeEccytRyt\n4IpnoT+1v4UW0VydK2hKSvWFl5bY7WZQ+Dz5jIkRmAFCq5xOtjcck2KZ7uNI\n2k9EsuBpLPb5Qcn1jdFPc+y+ep6ZD4zoac28IuaDUak88SPxsrI/utnbk3Ad\nGoQfKcIK7YKtK/AQ5b9Q8t23gBfUSRi64gw+WLOi0uLOSycwZoUaWrZVAjyD\nVv0V25mf7xL1eYhbmGJDWmNCLUMoBsch+Bzrd9NfnONoeRipJX4IfTqZRhCn\nLv00\r\n=0SuS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBcBNsZiIJ/gO50iVMoXORGt7PxXQ3KRJHeFbdR7U+3sAiAoIxitTwK+5sKKwHxXivVKZsZ9AEQBKNO+O4ZLb0VJeA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-52aeae1.0_1551277694248_0.8512945170844499"},"_hasShrinkwrap":false},"0.0.6-591f47f.0":{"name":"graphql-toolkit","version":"0.0.6-591f47f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"591f47fe8d24c8751336b37d78f6fcda60e3c884","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-591f47f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-N1jkQbPOmDL+hxUH9EK7Oj+nnKt4sj1T0ZX5p9ZVq4yqLT1CG6LCzsAx3uT7eYNpko9NK6I+qwKgbN7D98VMPw==","shasum":"5362c1f25d94e0bb96c09c046e4069deae641a6c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-591f47f.0.tgz","fileCount":245,"unpackedSize":243910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdp7LCRA9TVsSAnZWagAAoDUQAJ3j1NkSMhRjvyGhVsh4\nKS9nH3t0grqgpJpSG79Skq+7XRQibd6TogLFXo3nSg7p/aKKiS1ljit5iC+2\n30j4YwcihKFebFystSRObGutvBunPOnuEEa/WXlc7wWQexz1m9RVIqAGRFo8\nGRv5O3njBXmUaNgrnvXiTQyqwp3SWQd+7mp5bs0Qgt3hRZijBGg8cmIMLmik\nmesmjp467PESleaDM8tmO09bc8817wzQ98nAXqwlJIUjKVhChVnw3mQQAosR\nQ29HTguLQMzs20Ct/ObyjFSCew0xAj0DiadkRhHvLEANXNAoTEJMRl5znmvK\nUtXr9v4kzTgP7L9J0dqPVlbp8oHUetE71f4FazHFeSNXnMl3SiFLhx9LBxhc\noCsB5L9A6GpZHWphzZyoc4QS1BH5IKbdKsAIPOPXFFeceSBAh6jQmJd03tVK\nbuqiuoheKZCDtg8nLNgEI4DGcjI8nM5z5whXFvxanAjTQTFnN0mI1kne1JSe\niy/XszWrQdOkKkefVouY4WedD0nkTJSi5jkDm7vZpCS8x1O7mGVV8y2ZlHso\nDAK/g5Jqer7LZrtL18ILhddn8Rg4f0Fnhy/NtHrG4x5GK32f/JE74dRXBx6Y\ndwYEqHnX5r8Te7v50vqbAP6lW4bbGLbSQMBzeDlxTTbBU93e0Y6uKkUfoMGr\nyI/d\r\n=gSie\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHXAnYvJfXWN1qVhSdbFs7d7kHbfPG0YyydkpvOiySunAiEAijRWwCu5AbS6jkNaLfWcUcNtpQRX7C7oUpUa0wngvE8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-591f47f.0_1551277771256_0.442386487354969"},"_hasShrinkwrap":false},"0.0.6-3021abb.0":{"name":"graphql-toolkit","version":"0.0.6-3021abb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"3021abb9693fb5ebf6d440960307695be681076d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-3021abb.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-1WExmTX3Qzh+6XqMBYvW+bbARfXMAa3mWgpknLRDhHbdpQFXlsA9FK6bys+43bwpSf5AvMYTZPMOwXW4Md2b2A==","shasum":"18e7ed573848bc1cf79692026a09048b6af4550d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-3021abb.0.tgz","fileCount":245,"unpackedSize":243910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdp+ZCRA9TVsSAnZWagAAbFEP/3Pt5MgBFl7i3s97zfPX\nIqx/O7m/4I4Dde4Kb1vqx65CIvmiracMiBftKfxIN6wmIPx0EQep/ThLiXCm\nqSxrypNaQefqq8CxRrpyHWQK8MOckzmOZ7AH3GjE8q2fWkame+JwrsyvyLxx\n1D9bMHTVsnWAuaiHBkR17chpT7SUHPj1+1mEmtaiukSexmVYECJuCPJwmyeW\nOzJm/MMFtKDbS7BwD5+YqxMCIbQ9M/HQE+LkwnTjwzBVUMPSgocDdqlxKsBZ\nQGVTowjJD1UkQy2OCuABlnWHwtdUOoCy1zbj4mQl8sDfLcZMI3npfYnc83/T\nC+rkMNvXJMDWpyctNxavfTuqP5DyyxLNAxyqH6bMlSMdfqxNvoLHC1pURlob\nUYwj5PFa+DdeO95xAJ9UirQ67H5MPrFfh0SjSPMySPoqY78NaU/HhZ0XZf+Y\ncldoMX/U3J4PFXn7MGB9qrKuk2Ucjah71VbTTDtaa6u4X/qj6nhBxWOtAy+J\ngdli5lHi1wzF+rFwE8Bp67YzPWDbGaoI8tamtegGdMU7uaAMtw4lUcvVuJLz\nJ8F4883RurKar1/YucBeMMdEDhwsawnhnpCAnN8C7SBTT+AcHR9mvrMYcQue\na6X2SBf+YDKR/caA12cj94MK4AnbSZxKTgXRWDbnjrpW/tV3UUuUpgDiLyJ/\nOtov\r\n=dcLh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDc8/oQ8qXYdfJ6G1CdescCE+nW9QwhkbfGNI0/yXNDRwIhAMm4wylSAqyWrnudBwsycDbrB03HRW1GH/oBk+ljfU7/"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-3021abb.0_1551277976939_0.07988622192131745"},"_hasShrinkwrap":false},"0.1.0":{"name":"graphql-toolkit","version":"0.1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"3021abb9693fb5ebf6d440960307695be681076d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.0","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-XFVb2/CVJ4l4Q7nvOie0ojcQ4XeI8FjY2+m6rSX6tOKthGs0IlXH+qdwevPfB5XTlN91XH9BcNYkcQ1mLElA3Q==","shasum":"b2f69afd7bfd29d711396cdb1d197738b3e450e9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.0.tgz","fileCount":284,"unpackedSize":291086,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdqAaCRA9TVsSAnZWagAANzkP/20J/Ew9ue4CYBgsAKwW\njL9As+y93SqxZyyuMjI9W2IWo5F6Cm4ueEt75E57/UvdjtyXRiNlqgVfB+0g\nKyJxLOnQm/g+Ym3k4tmko4pTbzs0XkNnuRAHzs2X3rDLmCqhXCjugHkXL9lo\nZk+YjVJqRdeHJYB14/ahVJk8CgB7ydSw92zpqt031i7OIUPZXU+P3GUQ666o\nqlMCnu07j6CAVMDXqTRLVXib5raDVjHXiG4SFd/WC3s6LhozuWA4BhVRiBiL\nwXlp4Zsejn8y6I6OatRtT+oLEAYrsz2IPVxcM98rUUJYOuCEv34fyuh5XsmO\nxoXnqJffgHp/GzMd28pH1rVymQgrFVeBOc1fx+1ZTf6dnkiyOCf/jii8g4YX\nFQ05cK5goUqGsJpBGQEh3T8D66Y/6Dvlqnb+tniL7r+o7d03JwFR4UFnQoEz\nzzuT89OlSMv1Qj9ddIgDp6Spsp3ed2q6rRi7TYNIFmNDdCb52evNH5fAWdnJ\nQKYcf70OB5Q/P6x+k2cuLXnyjvCy0h3qC1K7SpGggZNjXWSXGKjh+9naJGo2\n475PBglWkIJHzgXjT81FrdQ5+52g2iU8LOIOhC2pnDSFg2YrmXIuchVCOmmm\nnMqovm962EhdstiOoqEEyk/G44YZvg7+2JYfBJ3w13AYH2XMxho5VixZSz9S\nSUJd\r\n=t3RY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCc4DKk+I5uvDUzlCQx4fPnPPr7DBmGo0hWTydz4MFSKAIgE1pz0zkn/xIYAVdK9Tp8HvmDc+IsFa5aRThaRFbh61g="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.0_1551278105453_0.013428156910891609"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.1.1-bd40ec7.0":{"name":"graphql-toolkit","version":"0.1.1-bd40ec7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"bd40ec7b948336fc92f717ad6afbad811b01e002","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.1-bd40ec7.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-TRdSVdAn5Pa5kEXzPzhcIDY4ImbLYIzv0IvfliAgOqQnnTVsQCzrp7dzqAk+JofPxgBnCG+yHMh75lIII6rBOQ==","shasum":"2942fef8bdd2d9362b092db0bcdca0fa47744dc1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.1-bd40ec7.0.tgz","fileCount":245,"unpackedSize":243910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdqBjCRA9TVsSAnZWagAA7gAQAIZvInJjQz4uFKCAuh8s\nGewI9QVNfifIiIhOp6iPCYQ1FBojPJwBtfgxp3ZcW5p9Xdh1mUHIS854MTAT\nyxM0uXWZP7g2XU9JvRQngktWfEB//thTGUE0u4qOuJ8RL+ZSFr6diX9baGGt\neZllfmNnhxQmGr7pCSK65jkQr1Mte1FH9S9mLoBK6moC9rajPcxktllztguo\n/Y3RjGy1l7qBWrq//o+YeVlce9VM4oZy9LnxVwRld6JwEUAJUYp3QKL25kRR\niHm9LhURydoAFA0mUEUYMkGdxPvA+1MbG1NoxwTVqyiZnKBUWnLeeeyr3UV3\nHOjtOPAtADkxLPjyBHkTgNCVM99Yzor+sUAI1LmBuvjHvYKBTJ0XQT0uNlL5\n4GSkzkAT8hEYKVhsCZINxU7pKOnYI5IOACTvgJ2BFgNd9PX/sy4GQKpHaLHq\nk4Z2FWLe9RkZjy0W6DIZFmhjlOS3qcWsClw5y6R7gTvFK4NslvUs7yczWN5y\nZ8RUYk1TNk397QqTl0Oi01j35CpR0JN4dosjLz4P3Hzg9D7/2urlizUfpZE5\noCfOc7aFzpmJU/z6wk/PIGlm/NKikejzQQHhkLQlVJJACbuvqHQ+AB4sEJVp\nH3NiVRA8CCPassamZzJ0c9kxhZVdYkGyOcKE9FrxaKMBT7NgxYXZaNyTJiG6\njYFy\r\n=fJgx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFLU6okuVbmH1OA4NjhcDO3waCS5xh1+1rCsZAnThc00AiEAzw1Q7Pm/kz8YPKW8kaZUV6h3ePWFb1eTc9WkKgOx4Ug="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.1-bd40ec7.0_1551278178780_0.2972709114464469"},"_hasShrinkwrap":false},"0.1.1-fb3ed1a.0":{"name":"graphql-toolkit","version":"0.1.1-fb3ed1a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fb3ed1a6b893afb4f1922e071c949dd38ebde43f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.1-fb3ed1a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3YAbWoxr/JZU5UJy4rM+8KUyROm1IOhuu4bSKRBS5olVgB58QriltTjF8o+aPyKbZ2gn1pci8fUtlHSSz9ziNA==","shasum":"96a3686811c758aecefd45b64062b904f32bd54c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.1-fb3ed1a.0.tgz","fileCount":245,"unpackedSize":243940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdsaACRA9TVsSAnZWagAA8kcP/2P4KFolDv6Tsgr3Ga3x\nIky5aXNx6wz8b+YmgcKh1x+pSISpUlkqy4JRtZSAhhKPWKyV4udVOG3AKFij\nnfA88Qjwp09/E9VXCFvwbrFWCTZJaQw97l3dkvHmhulbvAPG2SP2G7VwsoCD\n2Cdk5UIRgVVc3FoRZUwt3Zxb+Ug5DcNDUf9LBsaAQOfKZAvgfpNMAmFTehfo\nlX6vf/X/lnIwITj2hdLjezcPNL8EnMp8FE3hsMoTqytb6tIDtIlsgK8M/ro1\nfaEhA0dlaaB5itJBB2JNMZlUuA8/XbevmYX2EVhkpa6M4OlP1L/hRBawdDq0\nN+n9yR7FaEYo8vqz5WQMFxdkyOf4pv1o0EEZQOnWGWkCKSTx5muSCvEmguo7\nQ9Zt4MX4aluzfTmiIkS2UUHA1sbz7iJEPHtuCwkYLYDYZg+MSSGEH5U/IkT6\nXqs2OmiSd4XjfKyYnWX8SYGwu9OVXmOWN3aMf4NG2jDSakxB49nba9hk3jw3\nbfuVfgQG3OeqyswtAeJizx6OOQXSB5IZH+vqRZ28uj/HrANQBZyaF2h3jjNF\n8QKYAPi7VBz8GLvzb2uYtscdCQM/RZy4inA0FhiCq0444d1CDoCxqqouwbNJ\nFDyLl+naU+EMCPUENvXZpn/0SlUml00q6Hez+Hm4u2y0PuTW6bClvbuOYN1V\n18xH\r\n=DNoY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICgCGOkWC6EUoEuLpC85yonWK1n6xqUf6lzzeXXU9jCBAiEA5Hx0zpqk2oc67SkbNedY2/+VpTGOdq4bEURJZr1vaYQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.1-fb3ed1a.0_1551287935271_0.9598890972195468"},"_hasShrinkwrap":false},"0.1.1-3f94098.0":{"name":"graphql-toolkit","version":"0.1.1-3f94098.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"3f94098da66e351facb752465d9acdfe1eddabb6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.1-3f94098.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-/ZfL7oS4JMYpvowBcsB3SRQ6AJJDSG0HC/vrqLG7iPlSgifbrmpouEKU8Zz/nNpf0Nkys7p9qkAJ0yTNzrpyPQ==","shasum":"c6fd9cd78d638cf101b75a3dca6ecfa96c5393c8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.1-3f94098.0.tgz","fileCount":245,"unpackedSize":243940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdveECRA9TVsSAnZWagAAxzwP/iJ2fPE9ijoorCXbyrQm\noz4S2dQrv86h41lujrcOFjI2tSDVIwcRhCpiadFbn1+m0BgSrvQh3YnJpvo4\nk0LZ6wkrITe3AAlOX6w1asIS1bpuyvAO/uxWohluIxH2r2910oZ7BEZTp1R4\nGtex+fAj9oEyvmZfIdpsp1R/LI0muFnskfdSJ3oG7Kw1Ci26juJkq7f8WZ8W\nxxMSScTeJl13Yu27zlmauUeA9HkyvoX9Jc2qw+hVHkF9nJqpNyZauL4deL9V\nSccaGi71NQLH+sG5iHQLPojR9F58l2z/KR2Y/4iBUOCr7AVjNd1sGHilI2rF\nUawmZEKT9mZ7vf1dKWunmmN9HxdeEZ7OVUJqWyrwQDhdaxJcCf1NB/0YytO4\n+WwWv+QIcRaLr6zN00l0BwCFiKWZnFcQVLkneSx0cMtbF5PjzSI4loDbNXb1\nwmzYxcU1F3uG4DLZ61qhrQLD1p7gCra6unb/t5FoFXFdtJX7xPGmGCGgJyfB\n8qtEPdh3TYNTIIV5wGYDyTaSH3+Tnm2L8JjiLZ+lxqQlY24RhSAFnYM2rR9o\nAzz7w8M4xFbVXc2G5DWY6seckbhgnRkekXNyt8niqat1iHU8FbsOrDoqGY+A\nIyRXCyGvNeWE0ZC5kPOcpkUqrgCUIJcN9mhOydDNeN1G6p/H3NhyhagaA/VA\n+OwK\r\n=9R40\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBdcE3AqBYWArjgkXGRXeeO1CrQdaS84k+5mhC2zZwy1AiBVDkRNaa/E8dQohJq7g8geIcy8HlkLJrUeEZF6PaQAjw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.1-3f94098.0_1551300483798_0.013933451343516312"},"_hasShrinkwrap":false},"0.1.1":{"name":"graphql-toolkit","version":"0.1.1","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"3f94098da66e351facb752465d9acdfe1eddabb6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.1","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-MLTqeYi0k1KVEeVEPMLBoeAYWWOUc8OCu3DmfzHMHtahz+RatV9zBlRA0vghWAjzJP7/zH4xM9bJldF5RaV7GQ==","shasum":"b1d50afeb9f11ba90f93e896ca8f48308ca7b549","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.1.tgz","fileCount":284,"unpackedSize":291116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcd4coCRA9TVsSAnZWagAA0ikP/j5GCnp2dxEBa4bpDTk7\nLBv6cKnb1wU1FYhUG9srpV1TETK6C72BkbqyTCzAcY7zsSC+DBEu/UcWuF3h\nrHzSUu7exZFew+bwwTFEDE5Crn5/K7jxV+/6d/lGLgonUAeiByinz5fOkxsS\nFd/ywJ1hRchAdZPctEHfRU2gqPJl/8Bqdk1mjVfj/0s8/BHzKvHvXBBu24uE\nw8uQ29eunPvvlrs0P1oW9yxmdJ0rbkebBxoLIAqvXVWMi90wv/p4p/ZKbgIi\nUUMuhsXo6j/N3UzygyXm7ziudIyqjdmlcd7CFnm3+BXwwBtGQYMcWdBYzDpR\n4PbiNsqIo+rPjAaENV3ANXeuQCj3MlF5EJk5LNB0pi1nm+1wDRCrxOhUFNtS\nFUSb4r0bLB5UMlCSE288yxaqr4ZhQSHg6465QiN+rNg0KE35YcpSbQhd/KdI\nFAxcFZ280vPLNDxC0uk2A8EGNoeHTwW9OlDu0D43A4sKNUL2QD2/JWvdRBbK\nqz/lQlSjp15EUTtJFHtG5SQ/vY2tSVzjTZKQeDOCh2cYHhyKyLt3QX1yER1Z\nmvPikiuJU95+giArj/GSaKyaS4VbLvVyiPsXIdoaqMeW1zS/TrK85lOtCutW\nhekT6FXkvm6tXCtQvQ7NSi5frQ/wdFwy+2LqwItw6vlHfHkN0DpOXxnpUbf8\nXshj\r\n=M9+j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBxDJxxkdItg+5zNEcN4rfpskLA4fhTE8B2PZvBW+98cAiEA4elDtVY68bNTpFmvzo3q+hobWlNbVP4BYdqqgh9zSRM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.1_1551337255473_0.683736759508005"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.1.2-7cc78d7.0":{"name":"graphql-toolkit","version":"0.1.2-7cc78d7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7cc78d73277268b2dd24340d6861b5ff16ef7e2d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.2-7cc78d7.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-407+dJDl5FNEJbgZTGM0ixE/yugwDfRRKOMNpXamHaV7rhr9aExaT6gVmAlzNvPyASrtKBd/KgNW4umqmzDteQ==","shasum":"c2a1dac2ac4a38bfceb7bfcbbb0a5da276d32b88","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.2-7cc78d7.0.tgz","fileCount":245,"unpackedSize":243940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcd4dpCRA9TVsSAnZWagAAlMkQAJsWC7qjn41Yopcsd1mo\nSBNJd7zGWRTlc1ARnOtNL77ewtQduR17OxjfDEMfbtnhqZ81OWiSyZZE6D6+\nnZZhCUiKDpdRX+GmXWP1MPjdjkHPPTCPsVDQWvX99PZ/SYgS3R6tEBbm6bof\nlSh6D4wtBtXD3x0dTSx+Z6LLP0WNgYuvh1srU8dbic0/tbvz9sI9LA9lJZI/\nAxy1fZAHWp40+lP/+6KZ8sTzwKZc5+hds15JSJz7iZ2BzQPeuuVbKmzZD7vo\nIWM+x5W96Atv3cgE1f/icZsiLz5wx17Al5bDORLQFOqhCxYQ2AR16AMG6LlY\nld63KIZfp23u+9/Yg+/ZjYBytCa3iucsDPgf3AJUpgzJkITYY/T4zo4u2HkH\nePTBhb2ohwCe7YSbVfGd4/n6NVbb4mcTkck+aeZGjFyHjRKNxAx/2oz1HPk2\n5bexGL9a7cKBdumSRaH2dgH3yqpC2nnAy7PgzVIsdDvq0+mszS0isLQfIrcy\nPlyEyGEDnnfP4ay46CQ4RRrWhEUprKj9P4P/NkG7Ko08v4JAQIBark+RhTbi\nTsYA7pqSzBxbhVK6J4V2g62egf5qcgtLYbt0JpIGT3pijiU07VAzZJKmPqGi\nDETnoARhsizUvyc9qYL0DRRtWyeoDrIdP5X3K7czDOfnm/+rRG0XVYbqJTNB\nwuCl\r\n=3v4C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICkX7yp1QwPpwQ3DzrHf+M+yvh4y/7kKDpE197WwkDj3AiBJAvnFvaawB2H1aJluX+lq4moL9lWTJt58trVim2pGfA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.2-7cc78d7.0_1551337320323_0.46979460509867943"},"_hasShrinkwrap":false},"0.1.2-fa4b5df.0":{"name":"graphql-toolkit","version":"0.1.2-fa4b5df.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fa4b5df406640e56e93559b411f19a678c853516","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.2-fa4b5df.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-dc/+HhhMv1mf45TZrIpGSmrIqVg4OidR0yFoTOrSm97/FORGZrj7sWmaI/x3F/XD7HzVXKnaPf3l39TOp2s1uQ==","shasum":"c3a95913ae170b3c131fdf41a4aeccb1db55cb81","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.2-fa4b5df.0.tgz","fileCount":245,"unpackedSize":248212,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcd/1aCRA9TVsSAnZWagAABZkP/1emfiB8VEXW6XeQpvno\nyIEH6pvh9O6QA3xM2c2doRHb8WHHagg0mv0snQw04HUy3yMAWzYHWVA/jj0C\n6/szf3PWR14uZoQVabaVwjHVrI4EXV/fHof+VeCu9hqZ1yrUiPDN2dXFsTez\nbIuedbNhDysHeC6AznOcMgIKgIxJnUbC3l+UsZOIeFP1NqxcZ/T1K2jnPIgu\nVUQdrrQ863okaMKjdeiD/xwdW66a6TAS/rOhFK8JnYlxy9VoJVvgpLxZju6b\nNpxgHMdsLXJwINrBJZpU04NJlrqa9pqJ2XgEJtQ1plnX+tih5g0h1VYgK3Ca\n+zA/5LTaZah62Ljl8qrc40AH9DKaCNwPcC0DOBB07i9GAnFuD1sGicKRhEjF\nmuL9AxLFlyOTbUMRgCgbq3iJ/DV/lN1iCt9tqVfjmQgdp9MQp5ydapCuwyDa\nOHDRduMO7DqZutZKOUwptTyIuBdFmFSfZT9tu+5fhOt9G0zNnfJRCJ/ljgOZ\nkijdOgVy3bWUMzgw9zTpj6rq4mfw3OdPnmDSakcgdFOkgNXE6XmuL01mDTg1\n4uVSR5hvhLq0OzTaQxEXmJq9KxvH+x3elSglJEt+h5jLw2nyQkaG4zpTkOBe\nvAfuLibqjh9wu+O3tDn353ZFVi5NbJlpSnAp+oJ4kXKcR0LGAdgFWuskq5cX\nGH9s\r\n=Opfr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAiSrgP/o2efqi3D0fXbAovpKcPoXs/8TYs7O0copZ1PAiAMzFv9/DVVQ4lUvUlOrpB3GJKAsZpgacDo5Q7jwVfQHw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.2-fa4b5df.0_1551367514124_0.4029102473875614"},"_hasShrinkwrap":false},"0.1.2-be70053.0":{"name":"graphql-toolkit","version":"0.1.2-be70053.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"be700531f8cb8b0cc00c70d4ddbad6fcc962c33a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.2-be70053.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-/x0bGwkg59OawBmGP4LYuYv6s3FLKd08WFxqab1olkHJAaVNedKWmvUVEXUGMLk3iu+ri3kBw08Kkto1yeRTEw==","shasum":"f993c46db76a844495737b4bb9fac8adddb41bbe","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.2-be70053.0.tgz","fileCount":245,"unpackedSize":248234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceAGuCRA9TVsSAnZWagAA00kP/3SBrBno/kRSBim6+LCQ\nUy9hy9FDAeldxpv5a2j7+DiqKA16HzyBwYsPNkkr2ulj15eSlyuzdhcH5Xay\nCBN5MjRMp2Kf0mgvk8/zDd4xyaUUnf5JDYZwW1okZiVB70Xh7BdJRctobxtb\naGJF+6BYdHe5i2uh6sFUeU/2JaPrvUlDeqO6IoXn80VuRm5pY7kn6s82HVGP\nmvLlP7lO/FU79KFDNnE0141APT4PmuFJIqBPaVTPcR6GN1bznbHJak+ZTON7\nkyBVdfH1ijuwKuPAeIUaxMZ1ZJL18O1q7SUfPF7R/gZGEpRHNmSotmtPdlC+\nkqqaCV7y+XN+256ewUmfWGVDb2Ig1HgBomLRrYRkPv/tPuM3tkriOEaGui+s\nFvptYCunss12QmSdQf2iOXUA6ZgRZZjzfnGjULfop6z3DoZdnA85tRc1LINH\nR8nrLdhtXi3GF8TkFihqgC2tvGHfiNP7hZQ+IgJ0bsS0rxzgul0Pbb7t2xgd\n+odIaHzHroQ/BBlqL8ExIPQanOKYzdgQ2D0HiIZ5evFCzGxqwfFKPKj/31W3\niXigqZYNvMRE7pH3Z9+bgcCoS92qrb0NnIq8uwNrOfCAsYhGinXwWrMIxZfl\noQQGfdUc99yLY+8wvRrSOQYxDUU1rxOEgRrzIqfYvM9K2AJIZ40hMDPZXzb8\n1SEn\r\n=e4/Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHclxsWpD0Us1q31+m1sKwrAQExIhmyIhevjZij8I9l2AiA+OF/PXOmdPudZy91tSshIs2LEwAikrZVDUtVEaEs/5g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.2-be70053.0_1551368621766_0.6605053473058287"},"_hasShrinkwrap":false},"0.1.2-cf77c5b.0":{"name":"graphql-toolkit","version":"0.1.2-cf77c5b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"cf77c5b9fcb7beac3d8dafee435dabec9f4c24f4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.2-cf77c5b.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-MJAhtrL/rrUR8DZ6tya3U/hiVRHaINn74xJAJhv9YyLjcy5PXEgz5DGxR2AspA2KU0C2EWMctbOt+IDTWy4eXA==","shasum":"b2fa3cac21bb674a074c63a1f069ce775ab15851","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.2-cf77c5b.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceBFuCRA9TVsSAnZWagAAefIP/AxSi4PPdqoKiHqeTr1G\nyOD45Iu7jjOYh6q3WqP+ciJaZbn+S/3DY6E1p2jbmsD/3rwOXYiXjGkxRIbI\n5Y5ITJUHApyljGHqltxba8aW1nrXb63UBZu5mx/GL4l7IE8yVKYhPLgx84OQ\nr2LhBmOwTtRspwm77r+l5w4R+ZyrOZzJzbRwJp4lHSDs46m4af+h14GoW4UB\nNHjTp/WTGWjqPcJNbhVDCSI5YJGRb72Pd9lPts9OhcIs86ZH7GNiq2++1buf\nH1q+DNvgHeGJhoa/ce7l4NqctfFrm4r3r0/jCOUrNsefeNWdYkAGMRlAo2ID\n6lnoGGnWFAh7ki6+nvVWoqtAQ9BWeKD3rlt6xTVdsuDU0FMQ6bdYufa0ajgU\nRrryzTqdyrCqOdzMl9PekfVYRHV6qHfjqqYEEHx3kGNcwU2PqHI3EbVQkzTB\nM21RLKFh8jAZNo27bNxSXzZ9Li5izNfW5as0ycclayjExgZDHEFISvdAhWUn\nhparLJ5HIGnj3BwAKEScSa0k8Ijg7ydWjWxPcEY8h03dC/JcjpX0E7equArr\n3GTW85Dmzb5Wk+zpr5fgdR9ZgcimhXBM5ndWBqWRsTCZHs4ZdWvQXIfW6OEx\nqmS4CuMR+m/aaq/yfptteMNyRNUBwQV3Ro9wpu3M7QrFNee79tBthO6Wh4Fp\nbczp\r\n=m9+Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrAYAmSTktyiylJmfvxVcwjHwSL+nYM7zX++fpy+e74AIhAKHlhCeRAys9uQpmCs63jKxtO23qwil/8eaHtmfh1a82"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.2-cf77c5b.0_1551372654016_0.7218228530902393"},"_hasShrinkwrap":false},"0.1.2-f27d265.0":{"name":"graphql-toolkit","version":"0.1.2-f27d265.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f27d2652f915b3fb69a22f34bb3a470b37a412b3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.2-f27d265.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-v92iGxBq9p+/lpAe+7po81c8MsO8N8hh34yLBybuiCP/vC2vNfsNUYjkWPkXufWKinALcQKRvd6U+9ZZLbNTXA==","shasum":"6d6c509f4775460826c9a3a7882ede18f6818e07","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.2-f27d265.0.tgz","fileCount":245,"unpackedSize":243940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceBORCRA9TVsSAnZWagAAhrUQAJw43vH92rihn8TWJWVS\naloqs4OPmeNDgVX9JZ5TRxbVKKYeGhUBdA3LVIOluaBYA/Wu+dvpNbmfV8Uq\nxjWqh3bNMA97Q7na6FxSuiqIULm35AVA7w9+Iz1HYcMg4MtOFGf2x1zkv9Tf\nEzSbCXS9scA7psT+dJwMHqC8vcrccL3DjJ1Fos/d74ywx+6dgdrpftqta+er\nh1BzscVuglUr7VyMWxZXvyHwsHjFTlYHERpJSlBpOySKMNC23bJvSzhVPbWl\nLElb9kklTQL39tMaZ3WxelPotb7UE4nSqP1irRESaXuE6zwm73I5Ucp0whi2\nvAy/z2vgcUIP1f7YT1MI+iB4CnPzYJPlvnGmnfVLQSXMPpKxmkMYHKKcoK5Q\nODO9R7i96uTJWE78RkNAwSf2PbcfXkDPdR4tLBo+G+Mq4L3Xx+2Ezp1xdVPL\ni+GDRvwPf/vDaQCwvX7e7hmjj8V6Am/1KjfyhqTYKXE34/5Bf3G62WYDXSQ3\nMNHoHDS9Q7DoDEe5bipbh6pDDUtCmflsTjiWdM2IqvzA+pLO5X1JnkXdUp1n\nu/RRrMonPOfezyRqdN5c9ZexqGPbWaaeoIWpmualNNvlf3D8QJ6o8hvkdZuJ\nVHcSSyeEQhzs28P3tGhv+XN++Tpthtf2vxjOvOI8In+2cpRClfSkaylgaqO2\nR84R\r\n=QSuq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHv+qaZ5WBDB8Gcsat0KlRBuc+6KBCuoCtpSC0E6RF8KAiAvJ/0/n0AzAFRnUGp2v2ESm3KFL3uyx2RlsjTGJh63Jw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.2-f27d265.0_1551373200937_0.530854951572838"},"_hasShrinkwrap":false},"0.1.2-59e4909.0":{"name":"graphql-toolkit","version":"0.1.2-59e4909.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"59e4909815769b63f08f44e40c5f5efebf19f526","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.2-59e4909.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-IGihCAkpH/eGk3Oz8XLZ+szhc7qgk2NvG1GZhLVo7KzgKxGVx8tlx2c0z9KjRgn+WxeyyU/ZjTkbtAiZ+iFm8Q==","shasum":"17816dade1be5594ac835631cc3ea5c4a58a1fdf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.2-59e4909.0.tgz","fileCount":245,"unpackedSize":243940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceJDTCRA9TVsSAnZWagAAPP4QAJ/hUdRB96pY7DGdu0Zy\nqmV+RD7wYpLEqmb72aT8eR2vQgtTf4Yo/0zVdawxurDJ8rzq1Io65aGkk/it\no1k+xmjpmbF9qQi1QgMkrGW3k150k345MMnIgfP9CdAv+6YGhuEu3cgX0fE8\nvZKldFWdtIUwrPwpT/JRnq/44GaAc44Ko6y0l90A5sFNWsRPnpbBXNfWIjMk\nPUmiLVNP4BRRPHAmGZD9iuFYClmkmTkZfd4Dh4EhDf3WnVtnpy4AU452PoHn\n63uAhyGvnKGLfGhGy4HSCUD0TGZFS+f9C17+UFbMmCX89Qv3IFbqSY2uoPkU\nMpdOtVOUZix2fks30+2H4EPuSB7GjAcA+m44fxAz+Kil97BLz/6/A2shKVCO\nxYKlNoqKFaK18ajb1gM3Hw6vAufLUzsu5XT/FWPu6V0JrswQDgq688Ln51Br\nGgRPTz92blwRI932S9godPTTyxAjSqHFo0AVvgPdo6ShWZoTDAOgIItCU+xT\n/qBfau2ntnTch8tZyPhMoy9qJedR7w5rH0hHVYDLmBIrkAIvqpCTBp6jUhOC\nJ7vAP/e+jwGRuUQzBDySEWonJLU3V9IrXvhLwE/ub8bl5C0d6i0JDTkPdaDl\noYkfHWbgUIoKCxp4VCKL0a0Lghdg4cuapTEYHqdPROgFQSJ3GXd4f5dTT82C\n8txZ\r\n=2vrG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCpWwMJY+xLSsXXVs1ymBfZDiJm2vmDS5fjNKrM+DqhQIgcpsovOhuUv9n5TrOAkhKmIWsUl8+FGqbchNNvC6+EH0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.2-59e4909.0_1551405266584_0.3183662619373058"},"_hasShrinkwrap":false},"0.1.2-03b0711.0":{"name":"graphql-toolkit","version":"0.1.2-03b0711.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"03b0711457f76d6dd1ddb39686f327b9e5d88cf5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.2-03b0711.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-WnyC+zDJ6jyoDkJRVkBNp06C8fmKN2+TDd/NMnDb3RR49Tc03oA1U5+m2wzrUf0AQPNqhmZZH23KKq0ZmRM3IQ==","shasum":"0767aa1d6abf5c5c0c80a1079acdad6aeb2e1686","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.2-03b0711.0.tgz","fileCount":245,"unpackedSize":243940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceQIJCRA9TVsSAnZWagAAj+oP/RboXwy45wZMvd3P/Sim\ne9R2z+uSjhQ4yP5/VNNRPZoZniAL4ajCMIG05vmzdqs0TDLVJJq5J1Dgt5T8\npR64sqFcwJ1Tjb5pr3j2GBWkCZg2LucU47/cCw4rbssB4FJLTIDObEWEN617\nmhKx5TmlptY+qqkfHv/GkS769udASlbtH0ACKZzhcn0xzEXNAJR/FpoNL1Q6\nknUImfYi+pX8gfO1udYze4ypRZc4Qv+wy+3czO/gkL9X824cw4nN+rseXn6v\no7yUqYxbMHtk5Y+7FVs4/b8uL/zXt0o8d3sr1Znx+1hoZxIhfbN9tDJNaMWS\nU6ivZ/jqE3GOiHv9LZL0XgS0ZRnXdKw+AjKyldmEQmpr9RWHgBhucEdtTH86\nlqklC4y5eLhT4Wi7/R214626MAvXlGxdLbx5jtrXF2rnxxkttuOtADy5M2A+\n9nfcIBqtEuegmx3JRaUfs98RB51cTnjDzUxDTYNp8U1Znr7imW6V2M/f3Y0v\n9MJ1AFrAIEYas+hpbmCEN87qNWe0wwCP40kOInpbzXje1pBkYdVUMhcrM1jg\njUk/+uSkBI2pyGLfYUrht4cIkFPY5AUhOWVJ9TbG9rXvjA+CWHNmViVkfr0I\n04jgqfniIS4G9lEZMxmNKozLVQVJdEjpPGpWeJ/0bRcUvnjRyD02t7vgTjLr\n8UQl\r\n=6ic9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHFxYUB4X17m34mIWY6C5WLmvJ+NFeomIhksSEgSnPn2AiEAjiOirCRpoaKt8QzluPsDmY7h8JlTBUmC7UMO1n167lI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.2-03b0711.0_1551434248746_0.7693625990750061"},"_hasShrinkwrap":false},"0.1.2-d854f3f.0":{"name":"graphql-toolkit","version":"0.1.2-d854f3f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d854f3fd121c7d4a600757901abaa69476c33d4e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.2-d854f3f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-U4/47qdeHyvJJQMsQbsUp+oK584t9gmfaLPvyiYySYIhX84O3rmJ/8pGawCgu8yK4y+uL83WlhBe8bwivhCP4A==","shasum":"d9e6db0aad309f6f407450eb91a4f607a507ad42","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.2-d854f3f.0.tgz","fileCount":245,"unpackedSize":243940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceQIkCRA9TVsSAnZWagAAyuQP/jHHAoVofUc+pb8YcwU3\nf09Zw9NgUtPCXThDgdbdPlnfoh8llISJZ8EjduSnf/6ANfrMyruPm6ZVoU5S\n3GnBmMvmkl5iFy6hcaZi4k8dJpTDQoB73c/T3SJ2YTR4UUifH7zbY2oAmkvK\nf28Dd7xM2aNyz+GFjTzhseMRlJmVKjueLWx3T78v9ZGaTwVCn5L1SyTMZf/G\n+DE4n1vjLVRuj6WZxAJRpZy30qx0QByu+zXWMEzJDIuznyS4pHn9bmQR5ASA\nYlbF/yfLsRNL2HSsdNTBMrPFCwdQDEVNhCK3lbtw3rA73iFZHTVQStDBTXjv\n8Zo+g2EVfZdIGdt4/XjK8cOZZLCx4CguG8f07ZVbeB5lHqDDephqjd72GGfo\n6eNFB4Sg9VCmDeu91t14DPHLUFyo8pwjk2169BGUkT4FCWy3A1uzoGgB1a5s\nMDOv+82qocVHOk2JtD+x+KLy0GT5wQAEcWzpZiB5+QlczA41X3I8A3NDNQ2n\nIKRg+Rww5oncoPSROHR/jFwTnz+DMeoUs8ZL3RM+p5fNFp8f3knp4qDMhz5h\nU7i8BTKJcv7+qIBP859k4s1acMNEwLJnclIDW0c9U+FlLTkVhQhviXas83n4\ngQtx6t4enOqdd6l3u3TjIiybZBPq6AdXh57KX/0UkM5EPt8Y1EtZg5OA+5Ak\np6eu\r\n=kDLl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3HSRG4EFHg4Cazznxxbm5vbQhQyWdc4K/XqVqTjsRuwIgPnWY8XVgQ848zDQQkPnOzx5kccVRVaR2Oqq1Dj2LyhE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.2-d854f3f.0_1551434275859_0.25382940880001015"},"_hasShrinkwrap":false},"0.1.2-1bbe32b.0":{"name":"graphql-toolkit","version":"0.1.2-1bbe32b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1bbe32b4e8ce8baf1d96e6cd47d9da6d36cb3206","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.1.2-1bbe32b.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Gj3QW458cuq+d1044G/wGkEbBeAa/BS70IhVwx7s+/6K08pzpm4BGVDOfSOAR8GdrsayNwST3O5oSXlDY9vcEg==","shasum":"64de5f51d678f8ccc7c63864dbfdd0f61756e8bd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.1.2-1bbe32b.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceQI0CRA9TVsSAnZWagAAB5YP/2Two+Jrwgjfr5iLvR8z\nejSIcojm5yGgu3Tk/7PRfOQioEpLr0Wi2QHcTdjMreRwbttCdRPeTrxCppB5\ntj2nuYt+r4ePITPXYcdDG0CfmcKGj9N31moS4Sk8IpQLqrK1NP+N5wKfdSMh\n2nnYtFn0JhdNE85urXeibrXAZn7eTxtFvBgX1psyou6u4wDhuK2bgL+QyXTo\n7or7MsNmbMuZQTlj2yV7/FEZjmP8QkKcHGJfIKu6VGHpkl5+bCxTtK0nIhN3\nNbV7tAWImQLNg5Las4FTYdRC65KH4pkNJ2GxfRCi6pbfqqS8dnU38QJaDCAM\n4xw6KeSVsQtumy5ydEFuomNxhPSFxM3GOewlcTzJNzF1rrmZEWNYqzNzQ6Ju\nT9l5Gwn/6+Jx4j18+3yLb7KCVJ7BmKve32cJEQHAZnVF/pkMDMhQLnpwGHTP\n5Q7XGy/JPtUCQhH/jW7BFssxNt6RVoBaiEbMit0lS3YX5VsWwimeC3EIbHLa\niNPvTQfPROCEIXo11fsDiBMGySRZ07s+PqtRSH/IxTCqPjqjvK5sVDyZWhGA\nCr+6akT2gxKn9bhj2y/MQ1rYGKCGhPpRa3/TqHjKtdHN9s9lskuJ6DrbJQQp\nXeFVkpveR17HcKhExS8IXNlPWffjXjuv9KItXmn6AlQPMBTVwKlNpvJohyUI\nagsu\r\n=xSE3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDcpOe2toPFpH//JsrxFnvbrts6sG/fgB7/yH+81FxloAiEAm/BWI/ZkaJ24M4P8hiKmRTeII9OCYLLOLlZTJawko5s="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.1.2-1bbe32b.0_1551434292342_0.7723973883357382"},"_hasShrinkwrap":false},"0.2.0":{"name":"graphql-toolkit","version":"0.2.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"1bbe32b4e8ce8baf1d96e6cd47d9da6d36cb3206","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.0","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-dMwb+V2u6vwJF70tWuqSxgNal9fK1xcB8JtmCJUStVUh+PjfNrlKH1X5e17vJlN+lRPz1hatr8jH+Q6lTW0jLw==","shasum":"91364b69911d51bc915269a37963f4ea2d5f335c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.0.tgz","fileCount":284,"unpackedSize":295598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceQJSCRA9TVsSAnZWagAA9msQAKNCeMe0hsU0yIvdp7pI\nZuGtlqg4yR1VRvhy3pwygTeEs594kxF5IJ5GRSLIgPQ9RQ3jgh2YzItx9lT7\nHlTNO2cST+F8t189NPfJ6LVFzjn+b+HG0nwnNrbtANLueIRjvVV5aijM5plV\nvmBvFuQzj7dOqBkrI0JWx6YVQcrw2DQpIHpQgF9qWg+UfbxIXbBhpGwBNer1\n5ypPOxt94uq6M5qRUlmtx83qZC+wE9M1ADhKPzsndJ9gldkzsqqt07mD8vnA\nD0IhcM3y5F7G+l4RcRm+xwRZv9IF1hZ/EaURLKhAy0/Sbor9mgiPmgG8nyWE\nJN0je7+35S5SwORar1tQdJ2lzwfWkKaRSS/cEZJAqw94a7jEpmbrwYZdPKrq\n8Ito8nPPkDkR4/PL0an2AoZ614gRlcvvrP0UdfRTMU90Mzbh0X3C1/ET/fJ4\n7Ag1+CtxsyJh1bCdo0ePqPJgsW1eIBOQI59bAn8KONNufUdTS99eAsUppeH8\nLjzatFvyAs3n6EaMbq4XCybXg+hwgSo0h0D5kvsNJ6bvDaUAlvRFGfaXwDn6\n27LHcRn6guaURfnleWAVC7T19EGWH63oe7oK0sZJjwpWYiA2Gi32X3V/EAg1\neqLqx+lN5LgO+aPsm2HVvNaxkBxW9wjbw3JSLjT3lfZXbYtXfzZLSIM4/vvT\npQa1\r\n=YHVk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCag3kKiyyApRKbsOIavoWT1R7Orm30W/Y67FkjvSh1UwIhAOMiXfJuUai7doqIn/JFTJ3XiIX1zCy02S7Y1M8sehSr"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.0_1551434321372_0.7744917099767834"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.1-5ecd0ac.0":{"name":"graphql-toolkit","version":"0.2.1-5ecd0ac.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.27","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5ecd0acb1d6e4da2890997b215e9243e55586175","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-5ecd0ac.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-DprVy3KIS7Tl00bE5nBV7dC4tiDdS6wdV0u3IblU8Sm3aJN44Y1WpS5tf2YlE1Tssd5wVdHCw+taYN5b6kF9Lg==","shasum":"76be7ab46b37b402a84353fddfabd79084a9d5bb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-5ecd0ac.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceQKSCRA9TVsSAnZWagAAEVMP+QEyY3FDl8w3itclKSUb\nHrTVhOOGt2uhlVN/zmbtj+OVuId2oDL0ddmrMb3KgsbKABOn04DUHk9miCMR\n20b//olRym4AzQBs9Ra86mtT9zCW4efPJGuOZ5t35nqVBCP9q3xT84cm8Vc0\nz4ij2/dpimG9QVM3QK1YB/q0zGTHgHLCDuefP8Dq3/kPLvxUJhQ+G2ZY6G+N\nrU1iwF6SzKTAKMHsYEWdbvSOF/2yACa0/cQvWsK2VWtqs9pT0oohFUbyWV6v\nq1b6DFsetQ7o0buQKzfR9sIrQBCwoqCRxNbwpe+XWjrJv6F4aLDBYjVa7cBb\nvF6yMJL0WeO335C4MNVIb6tVl5hcGLUfFTOdQLq4K69thkOiUhytK2XePuQQ\nrNA+GVZmzHxq1De5lxIlc1bMifCtS7IVNIjIGYVgYzMKKCeTL8Hc5USabSlY\ndpTRwL5YGdbL1QJZIYrmECx5l5sk+PjmDS6mV1uiCUUjsIcCTBuQvrmSpTZK\nDxVLvh2FBbrKzAUxo6cyHu882E9TKtKj/D72wOGdOmQHYHFzivFwebByEF7x\nzJD5zRvnqFnZlx4lIedfuq/f8W2xgVi1E1/9X4/mNUnlVfI0ans8gaAHiVwn\n2ygIurSEBy6jILClswqxlUSDs/YK+UoSbdgN6nJeLa9x7irfNF4CmjDLeUjl\nWSEt\r\n=iSHK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDQBA7tTqEvk6DONjw1ZiHFaHC14eqacC6OYvqLATT2nAiAT7xeonCTGdY5uVozikr+iJVRQntBQvdDzI/r/ERlY7A=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-5ecd0ac.0_1551434385600_0.7505346947976717"},"_hasShrinkwrap":false},"0.2.1-b043b45.0":{"name":"graphql-toolkit","version":"0.2.1-b043b45.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.28","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b043b458c7f7cbd3353d786ae914d68f5eb6d7e9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-b043b45.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-f7GjhzLviy7gLNfbtqe3hEWmK5Wnx14hW8PgPYsX3OQv5SKJzUJ2WaqoKaDiLjOgtXYsavRlaFSlALLgwX9ETg==","shasum":"22dbaa9dbe38a4e164f0068f4547335e727fd669","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-b043b45.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJced08CRA9TVsSAnZWagAAv1EP/1tJuEkZGnzamIhfxtuy\noIPjG/hzfv/fg1aDf9vo7/2ifQkaPZ6fq4DSLAIT5+JJVEFVa7xTI4v+qk66\nHpcYXUwBLxuYAz/hGOTPGT2fI0rEiK/BG6S2Ossu6AkDyFZzHH84FB5nq/Ou\ndk3lUEE38wfrmI0uZOWnAnKPgZDOJ+/cP0DNR9oZrTIDouKgxcK8erErB8GU\ncXnVZjlRsuEYGaxkzT/eNU1DZi3NbmnN16nGKI1zF8f9UNCgjI7VOrzMzED1\nBJh9kOPJVdOzP2RR9+7GwpaSzpnTzIRTw31fXey5wT+Hv9utZtiNDaS/ucE0\nGrI7V+yz64ggX0K0jIm9zrFDrURyUHRsgBzZOyn7l/8OSJKRdk1+e/MHsi9H\nF5aEPHFk6UCHQu0WLfagJjDDCIOL2VL3xkuiBhG5Vn4lLABB4bSZUPurAX6x\n6CsdzGHU6fGnhBqrG6ggY7f8WloYxlPzoS1pTyduH3Z12zjgS/JjqpU3i8b8\nCKsH9JLu0MLWl00Q4kmI/Zw6n9Q6CDpFoFChBpbUQSzJgI7v0o9KqwhmSW3q\nZjtawjtSSP6miM0cdwS6riTPMdFBBLfArc7vqzvHURbQ4K/3IyUoXtyDzEKa\noH/Df9w+xyMks8XlA4eDvw2m8euTe1rfDVNd4N/iySVDCechVvzihWvugdIy\nsBNu\r\n=9pZL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGEggcJ5g2tsre7xxD9DnvdkN0DDri/1axP6v8lMbBpAIgCeo0St588XMkAdkbjHiQFLu0kwuPp0BxgwiEibsP7OM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-b043b45.0_1551490364209_0.7450443360372792"},"_hasShrinkwrap":false},"0.2.1-4162e18.0":{"name":"graphql-toolkit","version":"0.2.1-4162e18.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4162e1839ed796449df0e0e643eb3513ef4b9a23","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-4162e18.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-pYC96CHonX4ghV6nNaXipI5KVugpK0jXG4eJzkK3jO/XyVzt+8ZzBKEm1k5RPOVr+NK4LXjZWqAsUic2PnDfUg==","shasum":"ae7f3a961eecb75462f2ab3090f39a13419109fe","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-4162e18.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceeixCRA9TVsSAnZWagAA0aoP/3iSBqgEyGE/rVorkv1W\ncTV2G2x5j9EVe8bDfSqGV93qrNaiCez05D8o5gngm67A8kUiKk2xw3Z5Wuyw\nd16Z5YuxqPYlksIAw7MoDzbBEbnz2CSBh9cOa6HrerbP1oMKrttPCyRVpXkD\nKuehRhXEeyidh0kF5uCeCn04jGJZz4cvRxQPmXeCPLEkYKtMH5WpwqHGjh6L\ndyoSvL2K95kbkCCWw0rf0d8lLHeHIEaIhzddgGRBGjBxygMoYPP+xO5GUHWc\n31HfGJN0K9vfLJ7wB94+QgDp+LLz3Oqk/ztPedjXqwTgucs3vCCQdI0acB1a\nUrd+ltkQtCX6cc+ixyjxH9WQIjwj3gZWYHG9TNFWAl6w6OfpgLFzuK788gbP\nad0cqfbAzkQRIfM017iFtq7X4g5kbx9Ryx+zFJWCIYuzPVLDXXSaNAkcFnoK\noDA4WnHs5G4cmFduEOe4UGS51nuoZj8h440my1Azh7TVyMqxk7/otWZceD05\nsc6RcXeX05dv306E3yH430z6Quo7A7SPMYHiK7bCz6VjL6T37kLIKIEWOaxR\nFj1VgY2F6uNP0hIqQ9liz07pBVMq4Z5exXf4xQwqChgVOT80UrRai4mdc5B2\nEE3aAPdXbhlnJoG3D0n1bYCAbE8Uu3f2iy+DzmTmzNZrJ8cnt2+2ehHjmyCh\nZ/Rp\r\n=1xsm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC36OExdYyNrwS1T+Ey8ascCcSLi9Xi+Dj9eCH4DF3JYwIgU1wimsVVC/nGtuOKTf4+huSeLiHzUOzovE+vRnN9pMw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-4162e18.0_1551493297129_0.17293016537596695"},"_hasShrinkwrap":false},"0.2.1-4d0b208.0":{"name":"graphql-toolkit","version":"0.2.1-4d0b208.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4d0b2085d24b06747f2dc357f72f51a7ab64c952","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-4d0b208.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-g3L43Pxy9ieLuI8GyeshPrE+u5XhC2AN3D70snXGafNm8LTl9emndIKtU/54Gk4gEoIRrnLaDKwahJpshESbTw==","shasum":"5baf6786396184b376d9171fc2a8d39a63cf0844","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-4d0b208.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcenH7CRA9TVsSAnZWagAAWVIP/ig3ZblUPqYd7x/RzmhH\nDDFlL/0HKrE5ilMLef1eVS5vhC7KFD/P4q2uhykjoJ4g2ix3yWVJUPObB5mI\n/7MH+KoG1HPuF4zZdk1I3CXRWA5gZxuR0lj1tkcJp4T8l71eYT04RLPUMAct\n93CHhORHlmYwFiyacfV+zFSuYj6nY956Hn3sndvtzDyEgykgSC9JVUe9WUFy\n57K19P8L6AvvYPO1NIFU7CdSGJlHE8yN86nDQ1wjMpKu9pIg/yLAZlV9o0u+\nhM0OtGig+UbfK9vvqXh+Is7+6D2HxcUJ+WTByQp1HJBp4dOyyPjyLuQwDglT\npNUoK0u/8QaHiSBJ1mouy5mnvvJ6te4hwj8h6ue71FkCBUTPhxbjRJgv+onS\n6Bhc7lKa//BLLSixNRwAzm9GgaUwnO9WkZdvweSDSkIWuGh2wJYBzqBSFZ6v\nsaZQgsQuMorynqjhSZpQsHJxXiGgdxt4qjoMfOehC8GFeF0b/1QG8LSCKpPr\nNw0OcKgGQEG0WAOOFpH4H2/4BDzYz8a0kmf4VGUTJURZPuw3GyegLusudmOL\nhtp6akuuVcHSfrKfnE5B2JTb4j/EXldiJ1yRx/taaMvimUnlWXy6AWWyyV+l\neOqGSijXvj9sWbQv3F5+7hRKctVj/tMO/XAIy/6BYOBEmA6RPT5GGZdSp9Qd\nyCOk\r\n=pr6X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnUE84N+vQ+5FM/695EnHyzMIPYFHKNHuX4V6/VY56JAIgHpoflLPsRsv08Z/Xm9QDK0GsAKPwzT5K1MiDtLxpzYU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-4d0b208.0_1551528442942_0.8909193273271849"},"_hasShrinkwrap":false},"0.2.1-35a5ca0.0":{"name":"graphql-toolkit","version":"0.2.1-35a5ca0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"35a5ca032e8b3e7f91d0d258d28b8a4c5e381d26","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-35a5ca0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-RRUQi/Su5MmkE3O3nWFm0nbAXlfjNU1xRF4tEvhVfMHFCVxw2I5U0WvTnKNzYY6lWrsm3fiPVF+NychAswwEhg==","shasum":"ef9a18002649a4f112e093d5f2a3974f9ba0621b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-35a5ca0.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcenImCRA9TVsSAnZWagAAfagQAJtP7ymE/Bhh3YcVL5qj\n7WwPWGZ/Jaat+6PsToCV3TMeM9Bxu+ApP7GQzvpfcdCWrlGJEEwiSbUwrLUI\nkKUbMK1o6rgvVvHxkrwqWgjes57dlv9CiqHxuGjp6BfcI7Bv8J6XzH5D0BLJ\neeAzNY7rKit6TDZoEqiaZ81GFX6Zy3krFRdvaGETwIawX3bPeR4R856ZF0Vc\n9KE9UcV8IVtu6cNa6+GnMExrr3/ORLAyTVCF+1Cs25kcRDG8psVCaWKE9MgJ\n+zCocOoaaHPovvYaOoOybYk/246052meQGsSSdbEtqqAQ21adKb0qsiztx8B\nwduTOAQFJ2bZLhB7J6QoAxrJNcEUX7fMLC7rroJV+lSDpS3ZccNHhAJfSnC9\nWmaxcW42zPF3ybE4xcE1hAlM42iykhP78QmS6OGRDkDNIy6N2kk97qDHpI/X\nhm4yqbHM2cx7k+DOgwfEoKtqVKpikV/sl1FclagSAf3i3GbmZYnlvMNy/lIE\n5swe06Ak1yoKsgjBJ3Twj63kfkRD5HYROM6j5nHg0uJulNU9roGvG3nuS7dw\ngzSudKpgpFMRxmVQ0gCDkOb7kfZrxUQF8d+UUnNAeMVFHCUktIknMXMe+5zg\n0ZvUyNdGfTGfxhOoq7ZMDcTf9cuYuQFZaobYVNWh3X9/rwdxNvjMGTAs1fqJ\nRPjX\r\n=O9Mq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvhIE7m+RffvOXpAGYGIzyhbeBtTDrUN9Fc1xjaEHOUwIhAJHN5cHbodl75d3wWHb7fDcvcvFsOw46XLILHBF5Lm9g"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-35a5ca0.0_1551528486107_0.4586226630346142"},"_hasShrinkwrap":false},"0.2.1-bb175c1.0":{"name":"graphql-toolkit","version":"0.2.1-bb175c1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"bb175c1a27bd932e3fcf1ff7b24b6f684c4796e7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-bb175c1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-76htlOd5SAqc79uf4r040X4vwV+SRIW9QFde5vuEE4NiFAyAGzjB7ziRhznIygljgVAIPLOZGwYYBW9S//NJPw==","shasum":"ef5d0229cee504689f24ffb1c7741e9a2e7a2c65","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-bb175c1.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJce7uFCRA9TVsSAnZWagAA7P0P/1aF7JJANafSlLVJFEq9\nWJkOTwanW9KiSYjJKnREE1BIZPTfqIpL+im2wIC8J9yTOdFAEur3fDgNNygM\nELCPP87urdozzfbgl3WeWZbDf9RZLvmXJzp8uHM1QOcyQgufxpID5cZlWE7M\nrGotUR3kYHxyQ9xqZdVii39HjwNM46h+KDGMEk+aRxF/IZaFvzUZRbcnX5r5\nfFijFkukXLpUikS0Vn7LdAcKKbbn15CoT/QUa1E7SdV2xePVKSjDR+MWSz6U\nqMEc/DU9lUmXuGvwbKWPigG+V4DiBG4bOI+28uPCEOwJfqj6k4c5wZjaRTVV\nAvcHb4sFJow7T6PDWQBiMd1HNlKNucOOR8SMgTzwmpRu5dEtRYIPFLN2eA1C\neDXxdoHS667psYeyDOfsUYNbkSdm2Rufc85NdjLV/lkUOyywCTD5KBoucNp9\nueARPGq3k04ReRe0arVM3X+IffM+I7BtMMZqEW5jQhMC0569ajfmWBveKxGs\nVqrgX5tgmJi+DoZFNHlHFtEuUziY3kZ/JG9W1LO1t8Pn33ANdWFK/bIj/Vtf\nhNV50LGga0oDdGzGCTODVGsM9fyuDePAOWL4EH7UEa9yJKdEjpvYzNMXl0fu\nbpofC16jZvhpwOQZLjluwgn8MUgFPoCugIa9VJseEGxKYhYsrmrxLgPpZ8Kc\ng6pH\r\n=clIp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfWoYznboMP1bkaJ66w/8NMtbdHOrTYPiekzVOpob4DQIhAME8dck1AT2V1GGtHuqoelGjL4bBXbyn9FLM0lWmEM23"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-bb175c1.0_1551612805148_0.7853524812149382"},"_hasShrinkwrap":false},"0.0.6-61b862f.0":{"name":"graphql-toolkit","version":"0.0.6-61b862f.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"61b862feb8fc6a45694309ab0364ef5dfdb21260","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-61b862f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-2lZ5ElKx/juCj4UowapKwD/y4463V3BOVPI9nGYQBQKIDgyOvXQ1tD2qZO/ABdGZhqICB3FKFt5aJOY/KdAqfA==","shasum":"431b750008d3d6df28124e0a385d4f917966434f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-61b862f.0.tgz","fileCount":127,"unpackedSize":153374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfR33CRA9TVsSAnZWagAAvR0P/j+dbEfFu7xkWEUrseY1\nMUmWgz48xsjifYhzj5qcct0smpWh4SBa+U2G8HN+Kk/c9zdzaPQu9dTysGeQ\nD5l5WGN8i/ane+8HqRItOWIOkKB2pchgscLGkJI7s5D7RWYm8xpOCsj0Pr0G\ntiBsgEur5EqKkxsVvKCH+cQA59AYSh1HPmxzLjMqm9P4q+IO5LL8pxqhrXGW\n04DlK7TkHG2voCgljXJmXFPn8V1cLKWGaviLWCGRkIQm8qq6cpUxA28cx3Sq\n02WSoF3VVRms+aZERIeVNViRM3kX8gBzX4HYfQSKp9CZqmwM4IZoN38gVcwZ\nLRPcBV1TJNoI5JTelq7HbfhwcZzADb630kA5gyc5LsH2Cd6heGdbPTS6bX3a\nY6Ln8mvuN9Png90XSbGqbZ46PzlxENamjn+oDcxLaPQ43XG6YSdMDxWEy7xV\nmobdCrhMAM8DeBVPk7nO9qM5MiVppuQz/DS16XV+qgm/w4LpSyLSYaJCSMDl\nUFtYgLpjY/l3RNOX/EqIlbQoqRLTFVaHLFY6UBbDkU96rurq6F9yiQs8cKyf\nlP9w6EjXzL7opVejSLqjV6/0u58UPLVRpWd2Qc8OI6D8g7OChYLLW9+LXxDl\noMZOEs/07zU1prmAbd8w0vuB86xNv31OPHUoENxWCmnIhNe7WlD2wE78XG8m\n3jIb\r\n=GeXg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChaOUdYS6KWtETygI4hbdO+O635bUNJxlLynUz5QOBJwIhAI0pgmmM7Nq9WOmWuedRPZ74odh6bBwIIfhboV/YZvBr"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-61b862f.0_1551703542371_0.30524272167556243"},"_hasShrinkwrap":false},"0.0.6-3080cc3.0":{"name":"graphql-toolkit","version":"0.0.6-3080cc3.0","description":"A set of utils for faster development of GraphQL tools","main":"dist/index.js","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"3080cc33fe87d4b80947afdb45c8b651b44f2d77","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-3080cc3.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-VDxJdhDnpnTc6FZF2czMq0eKuTfhw8Y8I/6FMAMOqARasO2seoz2eZyAsdKyAdIPu0+3SHvV1ZEmgF3GIqgiTw==","shasum":"e14a043f7b672be96c649b68864c41a0f81c5057","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-3080cc3.0.tgz","fileCount":130,"unpackedSize":155865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfSS3CRA9TVsSAnZWagAA+x0QAJ8aVvGP/1CIcKc703de\nWwJSxv51ZKQp1m33/sDD1WRHCXbHYW9JAasSbbLgk0ywEfri3aZlPsZA3I/3\nYqKCEESc4bEKtsXnpGcPELbJwnpESN0dtXnGaVIrOnNHOoKiFrTy2cBNDgaH\nbTTBb0sRMgBr0EbTyRQGgojaa6tO7KbKqdFZMG+YldYmyYlIhytwRmufJaP+\nK1jC2VFdhjs260D8Yg4smATnFBh11QSfu6TOVT5Fvmgbo7rUE0Vj+lMzcY+v\n8dPv0SXe3O/Zecr/77B9p9qyZE4te7Bw/ujy4PJuBnN7nqmxqYse+F5MJ6tQ\n6CTqT7bKXhv48bTsx5bMWd9hyXah5gaK2377ICXkqo88wYvZOZJzAB+H9A4U\n1KeVkYx4DsYi0MH3fsjMDivzqtCViiihiHXLsAcIv8qeU/OL6weND/lyNUgG\nqlVGmI2iKnKFDDsr53pHJvYNU3JqJcEVEqYGcRUQ7eqInyxCT2E7YxP6QQwE\n80oJog8FVBE8BZp1DmGEeJKmC9zy7LrjafOkh409oLSHAPIWvEZA+wqHFobD\nt63VRLMMjwMiS2c7tbGBXcAdWfHiP1i3n2/IToHj5bT64RWSBPS0kjy4/8Pq\n6MmlTbrQ+JCGvk8cWrIJCdbm25r6cpQ0sE/FtoqkAjlLX7idAJXmW0AFkHT+\nobF3\r\n=K/UQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhtHxqW+ag/cAQNf6fz2A+D0bFSQEV8W8Y5lhOBk0SEAIhANfLg7H0En4nzHkYa30/E5+3BXZsFGcE0WQ1RqxlADdF"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-3080cc3.0_1551705271023_0.46812839714256826"},"_hasShrinkwrap":false},"0.2.1-4705e6a.0":{"name":"graphql-toolkit","version":"0.2.1-4705e6a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4705e6a4ee8f8165c6c70db911923c4fd3b9f7b9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-4705e6a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-o8ixjAVZoRT88jUIyirIbJueE1QpoNQvRuRD1NnIPEWdDhM281UMrSZDzPDLDLEZ6wo9EgZAY74F415eKNKd7Q==","shasum":"7d447f8580059841b6adfb355d3ba7b231912f33","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-4705e6a.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfasSCRA9TVsSAnZWagAAuA0P/jdEpowbhmMDVwYTTg72\ncHnbJ0k1p0YWXDNoetoSb/C50Qr/Jurh4I73u6RctdyoI7+nC4/ICWCn2Oio\n5SBKOUjcAhHH/GLMPtTfFbTT0N3yNgn+ts/i2/Vv0/WKuS8omol/lyewIWXV\nzjKs/Es4uRX07T7OPmQx5lU2RUqeTMYlAhoFXmiW70zqJFZUVxVDMYp8XV66\nj3da33v/RtDaoMxgElqocC8rf2k2k90beaRDrdtjC63tIMMNoi8WHDhfBFsE\nfGhK7IM5ZG4m35TqOkaQUStsb1pv0gSMhaJjyr/k5pcivFCTp0QvLO+iAwdV\nsayoBIuKNWIDTumJGMuh6+RL59gc+TBTHmozlwHRSt0TZhyyDLqsgaWl5X4/\nZUWqdppee1ZvTD9tNhQmdyjGthLeksAkGKGOvxx3ux6CREH7pUl862DvMQXl\n7QXv3JS9ixZEmzy7MS4INGZAeAhis8HUIL6FW1ThS0FtRCTB5djWl1uN4eQj\nOAjwlvQ4+UsegTbN58xMCM2WK0dV0x3cXtzjm9nEkosMrlGHuImXKuypSlwT\nvEJsV/EqyWUj1/zXDjOABN833Azp90bKXYAtaCj6c735jz9GBuNpS+ClbxxN\nfcmkQKVTfDijNurHPMmbDFnxE9NntVKCZZUDmyeQawYy7Ro89tB5B1QOPu9x\nuXfa\r\n=Hdiu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmvFO+TwaQEv0SWdIuOTf8DuIs3tksvmPE2ijaqWBjmwIhAI/T6yDcJwHzyUivAySAbHulEqkqvexZN11g3IyBSQ5M"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-4705e6a.0_1551739665872_0.41092989956633685"},"_hasShrinkwrap":false},"0.2.1-9753c4a.0":{"name":"graphql-toolkit","version":"0.2.1-9753c4a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9753c4a74f966710f0d649e3f663fbaf325ea810","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-9753c4a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-SlEgm2asTb1Z815uKwLAC6gz8ssGYyCn8b7X1sBpRDRSRb6DNreW3PeSH2VmoLi+8fRF9H/fTNWPQz4wlt2tzA==","shasum":"5510394282e3abdca663ff0517792029480d41cf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-9753c4a.0.tgz","fileCount":246,"unpackedSize":253592,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfla9CRA9TVsSAnZWagAAQHAP/3Q7w5n/p5mlJYIc4KiQ\nL51U9IhCFzWT6pJWgqvQeAydwrdmOYHM6lcdnGYvZsMvZzxW5dsE0wSXUZq+\n+3HVPtUyHDPy1KppbeE863ZfG1KJQBm+gdJVqPgiJAjTQfllNdTXttfibv+0\nDFQ/f5bmVvoiKFbYcC2s+WfGUOnbVTefNziq3LkokmkQNCWJFYc13lj1CJBj\nGwKnaI3u58IEKWPMuSshlv3iHUxIJqSEnRukZU8Sp0h6xNBTPecJn/MWYcSD\nvmwEadrO2NQtfeM9kLD1niABFhkrl0pHeeUIkhzcskiHfk7bRkDuEAZiI8+U\nodO3IqvYFjQvoZHnPPw7cM/uz5Yn+8lJRUEBnaSLG+A9T18YznxXUf4X1cEP\nvBwzWH7zP3tEczCq35Mb0rYY6rEstiUNaCZnkZ5DhNDGnbKD6e3gDSaWIxtR\nlmd4GpzscAM8kVsOTjWIaKYKQJ+aCUmAWEUrgZNuG7u7EwWnXc7irIeH3f+u\nhnbqsAHZmwTfevBZ0d5XHqSGuQU/Z3BMHTlI5f3A8iQcz8wdvZ9tHw91Aw2o\n8L8+quHwRm9WlIIx37D3VQnqhC9LNGGrus4Jlrst/IZDiYPogBR2cxMZ9le4\n+4loarr49s4f2wcRW0MjJYxJaIS6mu0jAHsDSPhgdviZNPrYGM/sU/yFbncc\n5noJ\r\n=Rh3Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfiLi4lWM4Ck6UuFr8CJ9F8Apg1VQLZJm1gcgFT5vjhAiAirpJ9A73zLMVjKY77HgynsvaiZbYZ8nx6oTzjNWmfyA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-9753c4a.0_1551783612436_0.20479708744421332"},"_hasShrinkwrap":false},"0.2.1-36519c5.0":{"name":"graphql-toolkit","version":"0.2.1-36519c5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"36519c51c320b5be89fef5405743425f834b09ce","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-36519c5.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-45x1q7actv5KJhfeR30Rj5QITMTcWbtP6FeHF/Q30mQOJ1oGYaluKNG1HD3Q3mqHUI0YAV/e8lPqgLqtzkFAyQ==","shasum":"82b457ddf8ab6c3d878c2e08cc815f276774be45","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-36519c5.0.tgz","fileCount":245,"unpackedSize":248452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfldsCRA9TVsSAnZWagAAgZ8QAKBlaaybckShkRjDbHlC\noPDrKe1X9IZnI/7BTHLc5xka9+pc86RF+CwOLxpsYGD5H+VKFagdNNQkQkXF\nGI6xbDuqIDmbNJxDW219cRcC44YLHYJosYjJYyJbsgvZfNPm6fHhHUsgs6kG\nW+cdJIrohxDy2uLWiVgXjOcL+dYJmmUsqhqMvACHH4uCyS7EKrJBBeqyWd0v\nwcIgvXmJYZWUPNUQr79wzZQedscqTtuHrIfUmxNJC/yJBT70UDBhc/MuI/sF\n5HuxLfaLkYbnoeHp5F8Pam/YLoN4RhSd0IfFmW/N+JL39sRMU0D8+9adWyQy\nBI0aJ3q8VwvVSObBk/wB4QS9O/+1FSNb3P/Ke9om/5l1d9Ko0Mutay9LAZJh\nS10zLyuF6G6FTKZqnBe1FZgBq2RulWwxxapx8ub/OOe9fvoAIdiPhgD59ZEn\n+GxPJOLZFjXGhaCc0AuIqAzc3DDahAppOoBPRaKbBKeYUzXhiZowoUcBXbEh\nRXG8ijqCxQil3lOXXe73AYmMPQb1rKrGwSXdqHKc+M49t2TMobV8LzN8EF4+\nZ+ULJxGkZ1oGf2FbqJB+K1Dl+f/NTReICDw/x+Z534HLQrRLinlE8Y6F0oq/\npIwvoQrPPXJIk1WlzDiXcOO0ePNtQ7mmwhzq454QwuH517Lhi0U7sHuC2G+M\ngXsa\r\n=ru0J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCGTFznSYETYL7dk4tsR9UPau0rrILiOezlcv4PWRPawIgfm6YHWBWsNmUUOHcgFvvQLfn63/brJKJo+fEAHdvzGw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-36519c5.0_1551783788204_0.7510034856777201"},"_hasShrinkwrap":false},"0.2.1-7d2f919.0":{"name":"graphql-toolkit","version":"0.2.1-7d2f919.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7d2f919d55025c0835bc3710cb73a29cbc8ab0ce","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-7d2f919.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-tADU/4kmDFZuuiekGBzjS2j/101psXWLE/fWQR1NFXMj7z8m1Z49iBy5X6qgMr7H9MEKe41QRxi6cxapUgNzUg==","shasum":"14d516d96a0c49e6478125b0f84ab2dddb647edb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-7d2f919.0.tgz","fileCount":245,"unpackedSize":249203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcfobzCRA9TVsSAnZWagAApzoP/09A9gbeO3k3fE62YAYf\nStmhdQwzOY/8wrKHDOH1d30+KuLfOqXumEUd5CkebZB4vMcXNy/7LlPa/mec\nFbMuvMCNAIuEFSDkMMDkC6NQAPMynBzucOYM5k3UAaeiPtnpWRBgGtRYiZWx\nP5ZPY8QJf8LsMiGfMRHWeiHT911HSs3svJp7g2nX6UHPRjjiyHbcar4UEepq\nTORRq6K+4gxnkwdVFdTOvNvIdN0ai5iMmZ0l4qyZ0VfGRShfaqWAWsptQp7T\nnivt69O6T/llojjQug3LwoUutjcoR0M+G8eguwom+wb5KeGcbA51WaU2vRxP\n17BCf/ep5uq+WotsyzrN3fTTc/2B7ICXNlJ7PV6SSPXEvOMWs7iGWUi5utT+\njcLaJvnxjZtu2HNuCKy2gj5ykLik66VyC3bK0lJ7bMEDR8waEKx7QaHqh1Z+\n8zOWYV7AWRVDh3oyozdxCLdADjkUP+61NHKQ9pB9mcgbRpGeLO5L4gcuUqqC\nH5+rI8pyUYKtAlpAff+3XoRTJgC/bi+1tG9c1XYK4aZDNUEaCGimxjpR7Gtb\nIwIiMPioLbmODMmUI3C/KrIBM3YPunGmEBgF42ZnzYVszr25SMpCldCNIj0d\nG3KnH4UDK3SdEH++AZtrxJ01W0mQHfO3MJ9ycrNParpGPGregD6iuzsDzvvt\nr6am\r\n=wiib\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEB2l58gGwlxyupfgOdn2+IXcX60Hn3J4LhyjG2RAyHOAiB/ZK7gdE9caDpoM7PyCmnrgC5/sh6MZoKkR6Zw5lOHQw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-7d2f919.0_1551795954807_0.23054209488400823"},"_hasShrinkwrap":false},"0.2.1-0e6d66e.0":{"name":"graphql-toolkit","version":"0.2.1-0e6d66e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.6.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0e6d66e5a0f401790197d2e87a277d6616db5af0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-0e6d66e.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-bSl/wswTjsuDsHmCUhMEBuIY39ej7nmWfxunRX/P48CE+MczCvYHa9T5TGrDOH1CFAbeurjKemsa8OpI/+wfpw==","shasum":"1cd7ddda9d2c8b9b9000c9ec65a57028ef243159","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-0e6d66e.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgCpTCRA9TVsSAnZWagAAFvkP/2uGVybl17j0tn/E96cG\nmorS/lNHUGjSuvzM+TY/WWguYO/ZWsyZcgKvup7gIV0/IeK9uTl7IDEmAUTs\nEvw/RxQqEqcJmZFCQQdMrAhmYzqxr5mxzOI3eETS51gBJdyVmyJ0k4Pl8EZK\nXsUVUdiC5yLuUMoadyAxwlIA0YMeh9Mxn2KQlS6glG4HZ6y+h0WqtLdSmC2D\ncMDFosP/TOaMXcfv7t1pfMDTcOiHUWpdwVVS0XOBVXH6WQexztINBgG2CeLF\nLWITirAuxJl2erCnn8pN8e/RosDagBsedXi5G/cqrNTBV8J6mUBwi2FiB3Ru\ncjZA2PGV5hi+FWHzXUTBdJ65cup+USixxIWzOvKwVOgy0Zfn/K6iZOcDPt18\nsjYrXdKfmJjjyoQV+JU1AsRf4TKVQwuVTRIXB8TePCmA/gnvN3fpBtGDkabD\nHTsryq+Rj29v/RzJRI/9Cca9OJgkWNDVNb97Pj4RPUIwGqGgsPxS1RZPRIGE\n9K26dNVlP4Hg7l+1QLcurBGwObUfjm2LvbJOmqbpctVQS0zS/IBENFI2pxCm\nXkcuQld/RcPnMe1SYD9Up4EHCnd1EqEYb1BjhCWtXq/Y8yLMBcS7w20jyWr2\nuwERDUnDMq05BzV6gvkdsa78nuSmtppuT6q7uDpuJRe2aGG41NvLhcGAA/3r\njWgo\r\n=uJdC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCylWD7BbSAunW4UxEvX07bS4QRKiznMMKgq0varJK/GwIgPEnjqvd3HcKJEPcUdC5BWNkAIMcBH7T0wmz47nF2mFs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-0e6d66e.0_1551903314440_0.3251098962064569"},"_hasShrinkwrap":false},"0.2.1-fb168fd.0":{"name":"graphql-toolkit","version":"0.2.1-fb168fd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fb168fdc6ee463bd2dd130a30be2ad0327b51515","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-fb168fd.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-pR/Xuf1ZRxD2uK1cSXIO4NkNXVCK1I8dGn5rOuFA6rKj8CCggsNXEASGCl+J5AKdetl/zCTFaNycEYxsmP2JUQ==","shasum":"e1b5a006ef2567d5f0909f09291ff4c4979b7719","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-fb168fd.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgJ+OCRA9TVsSAnZWagAAI3IP/jtmlyfPDFLLRcXbytHg\n+QgNwGz1UZhh84ToGR6eDlq0BtEqT6EEiw1ygKrO8LdFDKq11ROoyTB4DbiP\n2f8DdVDSvf5WbU8/O3JQXxeCK/PFIzl6EXZbHRDTuGtOxZTlxKsQW06z+sar\nLQL3SxL/rzEQttTLin7Fz1Wenvt4oFBR3zFKAXSJtvqUkcB5cKhh8KXYPI67\nc7nEkjUhdjBFhNB8xRP6KsFOlnDlB5p3otU7YFc7BJ70YY0TgSshgkB9780R\nTDANzgSmhYGpwUeQRB2oQAM0WQs1/dn4CMAxJeih4dzeYKCduuUMDCSM2q2j\n787YRhdo1hxkSaQa0PuU94OKDjzj76rXriudvnHMfaIN1lpRbI2lpKDg6lRY\ntjfG9M9KkflXKxIvq4MEaD2+WlwnjqD0xDL60e6nhA8KVWYJviaGrCoWEBta\nbpxBR6Etau1LnQc6hmdwFUJiNeUOMJm5c8YZT2VM+vcLsaxEY5yQrRylyEsE\n7WpAQlMRSsppXoweQtlRlBob12KpeH8KFbSrCyIfATbhtGZEps0jGTcXoQyo\nTd6Txk5cmSfyHOGZ1VXDvKIOwU3yrZlmUa3wiLP014uoK5EifFG8I3mkbHBs\nGNIHqo85YeMsPyOC+mklaDZIBKt/HUAvQgt7zpsxb3EonPWtQ6G3eVGhNPgA\nrtGI\r\n=TXll\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnhTA/yFw1ftrHd9UhlQLfa+dIU6CwgWjJHe5fWWEw0gIgVPxSQ0LPtNHsRct3rn2Z6DC1Rq7OYapNaZ92c46FedI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-fb168fd.0_1551933326384_0.8638861186779296"},"_hasShrinkwrap":false},"0.2.1-7eec867.0":{"name":"graphql-toolkit","version":"0.2.1-7eec867.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7eec86755fb6e9fc4895567149e362908242f3f7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-7eec867.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3koF3Ma7+id/PygIAn4aP2gAleSoGK4FRWdWQ5jtRmAzlW3j/twlODUU26XPu35jh8kf9vM8ERpU+E/LBeJx+w==","shasum":"a35307ac23d1795a681518454f7334041dfca5b7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-7eec867.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgNxECRA9TVsSAnZWagAAFd4P/AipJZL+sBXNok7SEGjJ\n8yVnhRYY6K0rtY/lrDmKJQgpg7sKCkVumiyb0WcFh9kSjTBJ5QXPR95cxXmV\nWH0sBMzIfVYrzVAJ5LB01ILQHmfJIKzRzfNlvsH2KT75LlaHpeeZ1RK8Sa+n\n/oJtCYBL4AX+Vobm8OQy84IiYaSahmoNelplfbVZdlmVi8ea4rCaXd44YR6g\nOdINknNmrsVxAklfg4AuEYmJI+5nLDVDMu7LUgrJwZNeqqHQBO+DrTJ5CcCs\nb3BpC4EuIoHCcqyliTwwhoJYGpXvkC/xDVpv3tN+VNCh/l+4RTdlXPfbOOBm\nzQ/wBKlMYB/ZsKn3kAF+NPWZU89FTrPlYHHjLWsXGwUTLKb0ksRWquPDU94l\nLJxcIUgsUbceGmgXsuw06OssjVEcPVaje4069SBqLtxJF0hcYx3iHNuKPWEV\nUKrYF2nTVyi7OgwPXif4/3jRexxKlN9LMgWqTnG6jBESsfzQyjW0u3CJPjGu\nEZ2StL+3+JKEJEFGWcnfBhrUziXLbUGdF2XipI0OT9bWSfaRD9muCqu5NEln\nwlkdgvUE5j46bsfGwYtUyKM2b8i8c+mTSYzagg5ditp+OUR3ioWacF5NApMP\n/mG17qPeXhTlevqfKOgy5b6IlfTlnKYQFPnRFxKgyagZmEmnA/iUzhUVK/Ut\nJ9ZU\r\n=tBQC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIExPIWz3RXcra3rczMWHT4gYuMiSyJwHQdz4zbQt23NTAiA6C0qww54swuXmDu+Ho9Nt+Pa2gMLTK+ZiMmFsWOyGiQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-7eec867.0_1551948868207_0.29730445752695966"},"_hasShrinkwrap":false},"0.2.1-19afe8a.0":{"name":"graphql-toolkit","version":"0.2.1-19afe8a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"19afe8aa30f286d21ec28a406ef92843f8efb8a2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-19afe8a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-6WW2a6BKeAF9btUlC11o+Cl1sKHauKMse1d6kZn1hVXubpAzAeVTdT9Vx+6jdiM+Wo13A3kTu5KV1P5UaQ42tQ==","shasum":"8fc9065e5712c17cedaf901fae8a260e93b0033f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-19afe8a.0.tgz","fileCount":245,"unpackedSize":248422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgNxKCRA9TVsSAnZWagAAx2YP/2Sjd52+m41RMoYjGM9X\nVV5HbOccwM8zBrE+0UpRhJ09skW/wiT3LzIh9HaY8yw1e+1UGtF1zvqPqtCI\ntpMfOOPNHnm3XLE8aGKTaTh6owntkbaJDxUmk9Lqo16swVbn7L7PObx3m8JJ\nwT5ZGDo/Z50Fu7+Jgv2d5MeNY9H8iHcq5qu557I0tsWZGJsJf/5RMHeniv4Z\npHdjYOZJXnv/dCL7994O4KJVoDZ1jthgpzfobO8Nj8bfZTThRU1OM7W+r2qX\nr5i2nfEODRHIuzQWpFP6eQgNSyjAK7tHrm1R+mMv2sBbwuvgw637rrv2p3X9\nCE6LIM7QFbzTkehRDpXT9CAMdJvVWWx2x1BsQtzIY740/px9FQ04Zd6B4BPj\n7YGEMCtWpfTMvFNe2YMq29v3RvY1lMs7SeCdAgN7J1hYbUg3g3iZzBuRUvX2\nOHId0rIxAe3v/rKG5Dw1llAwk8FQFicbtdYgBbY+EBUxRyYglVYJN/yui0+A\nmaQNliK224Ct5wUZNZ1PHSVG9ycY/bs6Hp06stwrXYyDHPLyAlgau76Bjaw5\nsPWrkhHCSpYCxJETIOlBjZfyBNghTHihvpfH9GZQ/fZW5nCsq+xhc6q5CF8C\ny6a2pnlfUkkXcV7JkY2LPTK0dJgWzNFaNqcJ8rVzXrGS8GKAe0bk+H3wya8R\njbge\r\n=ERxv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnSG1R2jytMvq2rA7n78Ppvq0qJjCupp7UJpuLaXD38QIhAKDBEYtC/nP82ZFOyoTW1fiHRt2zqXIHtkS9CVNCMuy6"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-19afe8a.0_1551948873402_0.43553330031991133"},"_hasShrinkwrap":false},"0.2.1-5082b1b.0":{"name":"graphql-toolkit","version":"0.2.1-5082b1b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5082b1b7d931753f6e6a8116de9ce3fbc7c264f1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-5082b1b.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-7ebM13oQ7+DFj6EcaJGfO6wmMJ/mfXMtYG9RLqGS4OE7NbP1OkYJOnZlMkuyLEbG/jGB1s7nYf90SnpMfLQCwA==","shasum":"42f53bbf69db40b0cfafc41f885ca8dfb28fafba","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-5082b1b.0.tgz","fileCount":245,"unpackedSize":248452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgNxVCRA9TVsSAnZWagAAlNcP+gNtd63dLwHAeLwm9UUO\nQmK+QlIsClfo876Sc8dmXz9OpzYqQaQDArp26dnGGcIzD/o076cGfGZylo7h\nPOFfdzwSBu/9ZupssXg+lyt26/dzaoGPCJO+MsJJ4Pyu1j7s0ZRkUrkO1w9i\nP6T9dureZDpSf3ECr3sEIJj8vyUyc7iaMkzxLIzPjvVvrfwSs/q5rVSdml9m\na/2BjBYwD4OfWbeqmDBma7iq1sygrj3eBrl6nu8/aEgMBdWwCtuyCva4sz0B\nqjpiKRkNRQEMv+C6aCPCu7avju2ua0F7fI2GK4KrRHEWhvsCqjIwquvPxeNy\nyQzbuWUoTSNtkz1QZLTh4HE7AFBObOCZ+mM1E9z2Gvsv+iDyGuA2Kf75bEvo\n4nJoOZIivFVKFV+J+5frNp587H1QHH9IFmNgMdA5mxfUkfpNY4XvqFJSKNQe\nyhc/UiYwrjGsA2tt57t9LFu1cB8PAZuM3EnczlrEiMm6PBvp1x/zb99bLtL7\nJExoGMG6CINBv8JgnQuERokFFQQXSIRPVdvkTYjSnPqGIsiCMX2qLT/Hm6jj\nMOTR5jykD61cvq/hd2N5Z5qFhLHkZrY316f1TCcqQMFt6LC4kzoci+Z7A14N\nQ/tjJ+IQQsq9iksZgWp3YP9wnaKivO41aLWVhJaf2A7SW0COBafsuxG90IRp\nf9ko\r\n=bJtx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHcz44WVNCl1KI7ozxkyhU4KNw74FADv8sTMBIsFqwAJAiAk/TEnhO1kAlqXzNeXXXAwZC/bTeQ924lFgpb1lqEpWQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-5082b1b.0_1551948884354_0.16748687059019085"},"_hasShrinkwrap":false},"0.2.1-825d49f.0":{"name":"graphql-toolkit","version":"0.2.1-825d49f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"825d49f3ec4d4ea62fa9c9a133d000503234740c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-825d49f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ee3t+Gnd0sHRQoNnIvW5G6eqX9txMCxarPsFHIJSginqwApbSBIbTM7jXY3SfvAII0Ib7tW+t076Au5Qrep7aw==","shasum":"5aaf2480c18826ebfeaa78898b7a67ac40276be3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-825d49f.0.tgz","fileCount":245,"unpackedSize":248452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgNx9CRA9TVsSAnZWagAAiVgP/j8BJt/Fwl5HhSzL7COz\nQTLDknEbTCE7oWEnbDqf9KKAZ5+bXFdqa7jnj2ZGE/w4BQ4zGXdEVzMuJbe5\nXFbvxZ0alaiPFZ1DTXs+erfOkt27B0Ejw1elL0vEEXCUny4lF58mc33QxW0V\nHIEnwRsqYj6BphDR8WU6ee4AOtOWZdIeZxAHKM1WXKFY8iXax62o3QyozgNC\nG39pXt/QpRNw2Na8vFGLvb6Crxe9uXpV/WC/Emem03gVKauXkrK6ML51IE7L\n4vgFwdv8Mst9enYVptvkDDu5gCAN0ewMl49vEXMVfQELtbtcrJUMyF0lqykB\nfoYLFqE7Taq1x1V2G7eei6LqmaDJXPDWHpX9sPCkwvgmFJXC2J88kaeTLRdh\nm4vJeHAl2bWRBr6xfqPu7ueQha9Cc/IBWbPQCFImk+pDpGgTt2Xe5pDfz2LJ\nPFdTpiA75/EZnWEB1CB2bzDfCn8/R5cVMuzcOH71s5Bh6DLAN1T5IanNJ3A0\nPI/1u3ct5HDAEDuILSMF6P9gZ7n7z05yPE8lvSFVK69gOULZeMIlL2dalQbe\nMfC3eTCZDdLPRy/b80rZ9GVIFt/qPp6H2f7gd4aPvKnhqv5oSYsZOzcVL1Uo\n0ELyoWazmW7HWp0CqpEdvQzCwZVaCm2XPYF+2B9umxHuH7L3rTdJpUfTnuYW\nx4cN\r\n=ai2L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3WRMHTDOY8gI/XsYwg86x4AS/Jajq2kbvFg1MfBSNUAiB+JGZRc2XFobQb9zdTHLA+0WDVjEkRCPMEl851l30ksQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-825d49f.0_1551948924965_0.4276933795274638"},"_hasShrinkwrap":false},"0.2.1-19d419e.0":{"name":"graphql-toolkit","version":"0.2.1-19d419e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"19d419eb511f594897fe2b8c5f3584295964cd05","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1-19d419e.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3Xrr0dOBEAbo7mQFpBfpTe3bUWUKQZIy4875sxd/Z7hx6iwua0QJNTVpGF3LFpCtFGYJYNizti8prORuHJeWPA==","shasum":"4bf07e907ae75faa3edbc104dfe93b425ed6c447","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1-19d419e.0.tgz","fileCount":245,"unpackedSize":248452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgNyLCRA9TVsSAnZWagAA2EsP/ReZ8re+bFjz25lvGM6r\nSfKm3MrXN/lgSMr32901q+gYgPYigCoz8YjV1MqRiVJMRDSaWu9prMkVEblY\nyfba1tNBY258Oxgid9NmA36DQeyaY7FMS3YGzXUgcEs7lvIDip0YXt6JAeDP\nr1/joFtHT3QMHUFivIcxjF+pokfr7gXcXrFLEK7YJZElRd3Jt3HC7vwym5GL\no0UyIkNe+Auk43gZMTK9GoezMPvwoFBq0VORhp6ZAKdrDPrQOxSZWalI2Iws\nMnbzlrIAdTChNjIFDMB5OGZL9MJuIHQwtJaXPN7oOxiocpbjQ1hii0BlkwGz\n7kt1S7uG46QDGDF7V36CdZYEoyMAdAHt2VoWGg8XeJkPx00gKSyz31/tcDCz\neKQjExUIKMw+mIxwU/m069lC65TiQ/rMqhJwFV/upQegpbMfhwA0X4GAnrIO\nidmB/cCZWpqRtna+B88s6DyzfPVUg15S79u06C5qtTYa8rGtWrzg0nbSLcwP\nn6nucnJQtL9I4PxTeY2xUYK6fuhxSEQa8LafsOYVQW4RYhK7K/2GPkQoptLk\nfuMT153iONO6TAUvdWdiBjdZUamE3xFl0e9BIJbY8uTP1wgcVWAD7OU8fg79\nM265tmeNtcN/q3DG+C82gJ8GIvA/o+6F16EiEEZ1ebphMTOmbB4nSbw1s194\nJPMO\r\n=H6w/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTJnaGJFBu6vxQI6dSivPBPJlIpkhTyNkYA+2839h+HAIgQ+umf7J4FVtM3VXmzNudEVxv0sbtjC+pj5Gue03px0E="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1-19d419e.0_1551948938860_0.14303363639232147"},"_hasShrinkwrap":false},"0.2.2-57fc1e4.0":{"name":"graphql-toolkit","version":"0.2.2-57fc1e4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.29","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.1.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"57fc1e4549d993028d4bc0d751b06aca35e6a4c1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.2-57fc1e4.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-GKzrmuS6XQgKFa9MdABSZmreQj0P9r9lg4H7Vo3SG/JuNMubAIMCuc7XSmwH6RM0KWOVXSd3AGnH0QZoEtGKcQ==","shasum":"10c158d6058abbb5eea0fac545098fae1ef8a2d5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.2-57fc1e4.0.tgz","fileCount":245,"unpackedSize":249203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgN6gCRA9TVsSAnZWagAAUlEP/3s3DSrOhxUpoC9INBIX\noWWgucxAf4Kqu4Xyq1CkbFPC6uthERSlqDqn8x0Ri6gYvaKjZsnlRrIfRaUU\nYDBJ6ckCkw3QQwmwSbMhKW+CrCw8WgiRW/NeXptiT/ickKfnr/SVCdVksAvo\nPtyBOHPZT6c45KcNfASQQ0gZ7tOtDazY0metL0T/T9qQ7M3NR3pv0Z/5aT8o\ndHwngct0ifQz/q5nCPQI+Lipeb+HTfuAVCZ1+DAp2aZAPZ7ltEVXP6ZYNM/y\nMXik79oh4UcVXMqR7Fe0LOnSDHUj9N80l6efqpYQsJbKEYYQbmV+Gv9BUV92\nKs8fWATAfnJTo8b8z9Ed4Ivk3DGh8hjS1ZjfcYK2VeK5GGPKtPj6PPop5Epp\nA2kkIC50x1a/Mfxw5/qanW2xqT8nVY+JEpWLd4bD78+1CAG1T1u4uPChiOom\nPrJLXg1GS7yB3u238Tnq0cNqn++i2DVFQYP+hjVqTJTY/7KvuhQzxDdu9JY3\ny9Tjw07/8ZrYFFNOCZIv5UadAkaY14ojFcx2mg8TujbJruAA3U0uSURszRm9\n53ILPi3dyekIgW90ElkEPuFA2wrfmozV/x3vNaQPkJNYXIEqUkMJnh2TOdbV\nNeemTcuE9bRVZceoGGk38hHKPSothqFL+RDFjZhMN9IRycIXntUVnUgG1VoW\nsWyG\r\n=QrfY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAr2BwMKYPdQ0aJudsqzN9b0O6zsxKMw6xYg3WUdjZWfAiBjkFx8l4xLSZxI1ZUjUzt/fxvYpY7OZV7gz0fquAMfoQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.2-57fc1e4.0_1551949472282_0.6578250487285286"},"_hasShrinkwrap":false},"0.2.2-e312052.0":{"name":"graphql-toolkit","version":"0.2.2-e312052.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e312052174567681c13c7e9856d75c066afa2d72","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.2-e312052.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ZJwLdq6P4ouOng1MchjVqbPiTnDfJDwbftcULsC3thf/XZku2f2JXb17uM6Ex1UqV8h3JmHiiK4C6vcBTmLjaw==","shasum":"61634b66e0d332a6a1cb37dd706c02f15eb9bbdc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.2-e312052.0.tgz","fileCount":245,"unpackedSize":249233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgN8BCRA9TVsSAnZWagAAfrQP/A89pYtZmeeqE44UA9zX\ngckKLgMUmK1S1M9lEpxQXdSJwaPOxKCDBcyOKJyViORqu7QU4vaLESnahNCX\nSPqKlA0GRkhdshJcJm+asx3oBT2NV2YQQJItWE399oOA9gMvL4afZzTPUvVh\n1RVUxzDjkIHPd+1Ji6p1X+3BR1TgGNC09NkyppyI/qjvNg3QHHdnoeOo0cLU\nCJTzpY7qziHTBzbIIyhXe6/4IH9gtjk6x77dfV7l0ajvQL0ny5tY6xswywuQ\nIcpbkQ78RHijURiyU/W3bNhQubEMlpCPeLdt9OiZfwLZ08Cj5cp9iyYE9Tbc\nXwKPy8Ppx7Qmjv/q8S0B5ElDzuqK10QQ2nyl2jbLjMf4Ge0efs1qDxFf8vo0\nGXbqtgOirKdxiV7Q5a3XpJiMYkqT37SAzX68dAJ/mf2txF8QFmQ9YUtfExsz\ntTZxhDIsFTyla83KdtNeLxTlzRFkXD/2UaAdWkv6YRAXL/337VaucrAB3g3Z\njRM2I8/uuL3UcWoq6S6AGbglNNSye/ZVhyDRHrNsCkTx/LWZZFa4ttJEDBBu\nj8vMRen6cRvVoUqt9PCVR1JncZ2FY04VooA7wXWEWPsf/SOijbYPyI7V1SWS\nc6XLR5ZqRtUpoAY+IuUj1gPHZvL39ojy1BsNv+wZAveD7QSUOxz73IkigNWi\nVnx4\r\n=FDvt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJmrd4XI2Q+shpE0A5hLM3eftsFCgfElGX1LyVBO1aWQIhAJ91ox6Qa7ApxpmRegpktG5yuyjBwDJ9hm7GJPKd1xEF"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.2-e312052.0_1551949568902_0.026932237455081554"},"_hasShrinkwrap":false},"0.2.1":{"name":"graphql-toolkit","version":"0.2.1","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"e312052174567681c13c7e9856d75c066afa2d72","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.1","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-RcRxZww84qDIGjXQ6QA8QUhvMGSqmgECbwe9YpLyOtrw9yFHkpQtArp1lF7or3f0WOAhYK9gZzFvrbkGlKpqgA==","shasum":"692b810f94ce16bdee23ac967aaed8df516fdd59","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.1.tgz","fileCount":284,"unpackedSize":296409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgN8GCRA9TVsSAnZWagAAIIMP/icCh6l3uh+JEdB+Fz1X\nQMBtCMuIUuhtk00a5VXNL16+/aiGEfwCDYmVGKAYgmC9qzrncqS/0nPDu4mE\nVlCvLh8rApoKUp7h4B6T5BEXdr7ga7TVzo5Ul0rsU/FEg8dM5e1Hfj0f9jLS\nJiCa8/hx2TIZB3l/e/m5Wpd4D6D4rBVL2vw/Sze2+i+7wGVHY5yJA5WX2hN9\nR9DW56f6eYDzbCaDMR9/uXJ8d9bmdzgA74UuyRn34amwP6UAZTJxni5gJKNo\nE5kk3eyBpQyzccwz2vHkYMua2EA1iQifBSoHuEoSR9gzb6pJkmjNbOdIt06I\nSX7zfbga4rapz3ByCDV9m+2jLlERWzWYg2AUY/MbeT4meF5IzU5C0uiLGL0q\nRejMx2DN/HPmDRaJpn7n5t42crDo8Z0iyJBZClqNr5i1lecQx9oT5ImyeI7A\n00aV8aWIGDaB8VWcorDRFuooxQgSBOAbZUMMixlpDb00LVj6E/UzofPq275U\nspDgxDMBTFygJMvLBHxacNsnTPPzAVn+/Lolzx9M5ZJ3IaOfsYVcDF5xcFKH\n6Dk0QZwnEQmnW8bgWltj8cXTbcFm07tBIFkI/tLUYZN3oY5uajY/H0ByqCPD\nJAi+7DNjW8768Gszd01odnGqYSVWmeMFz4WaZ8V78/LZKDpiYd4IMdvHCXWf\nyfIT\r\n=nPoc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJjEtBH/08RUoTPjCwuwczLI2EKunzubA3YOCiPsILMAiA5kCZP+NBzMt0GOBf6Dyc5B/Ga9E3usmK2X++haRI/+A=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.1_1551949574114_0.0845700960992577"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.2":{"name":"graphql-toolkit","version":"0.2.2","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"0a97166cca4cbcf96b1f9b307ff2efabe1593330","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.2","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-9eHPKCfn77nIGueKAEabLmU77tcVzA4D1aJkf1Dz5DiPSrSanFqmXiEzpwhGw6thRQaxFj2ACQlCB301gCwFFw==","shasum":"9285907988375cba4e6407a0b93357f2c9ee8248","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.2.tgz","fileCount":290,"unpackedSize":298474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgOFlCRA9TVsSAnZWagAALAgQAIOPPEJ6Fq5Fe72wkYmW\neX2yHYmeqflWWYyToj8sNba4lsBxnrMnqGeX3tn22A4WruDkof1eOyTk2TTL\nedpGcaThopGDtwoGyQ6XmPk1EnQUjUy7lhw+cjsgdaNOKzSiy2l+H0zkI4MU\nE8KsTlmnLXOFCDoLf+p+oC9HDHSUONawkVj7zWSa4z3+MKs9KPOcl932mH7M\nbkTkwfa5p6LLLuwkHJO/OiYMSpCJpaE+yb5D6W+KJxdMy4ZmnNiRxGnSDtgO\n2hUBJ/YwmRh86eYdDz4Md/2PjDtA4aAc8F+9YpGI1gVKbWE8+4ZGGh3red7+\nsA3N5mFk67BbL4njz5w2IJUYVgAy9hkqsIE1AX9Acfsaa/TBrLjoDXhHq4mB\nlwCFW+7rexYq25jwkDjTzyPzjSULjhbkPKvOqVdOPAw/0oWGhdHNnlRH7cOu\n77yBEHgAWfCttqvCIztGbGs08ptdS3YIeXe95kVAm36vbfqTuVMnDcGOVzNo\nxw0JSBNEGhZt6ZZg4+aDX9qp07MSdFiJrpTUILEl94GcQW3xhh/nJ1HVXcHu\na6Hetsm78UCUK1JojG67JaxBbV+I9I5igY+5z+h9cMHz+mrYDPz0yGfpWUyb\nwUSe4cxERuynaUN/xpyS4zJ511ElbW+Zb697l4DsesjGbopaWuGgxdGC3r6n\ny7oy\r\n=xp/U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDT8vDGml6zeX3ewPacTkwJR3K6D3CQYCS7teEAnfrFPwIhANhOcNigwrf84zE2y42NGvNprg64cLDhOeGCuwWwMRhz"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.2_1551950180629_0.13708647086421388"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.3":{"name":"graphql-toolkit","version":"0.2.3","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"8f179b58cae4d0b61e368e40057eae9b04f33a27","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.3","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-M6ISdxrJapEswxt5gZJOpc9Ck+fn4xyUGNxPlEoQCCLSAL+dNWEDzN0Ob31abjuK5BHJdwy8NMxapkr/YzJdrw==","shasum":"c160a5a54157fae06837c75a4f58ada415168417","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.3.tgz","fileCount":290,"unpackedSize":298728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgOGaCRA9TVsSAnZWagAA/90QAI4wI1tWWRBmLUYYK60G\nYsVUT5n8UuSevs9IlMbVcFSJ0h6EQku7T+Jl0rWt32G4Cn6MnW55WQnhsZis\n/HMkHadpiL1QL3K55ab1bA/WQA6kOduAVzjzuv2yMnMzhjNho2pvsfzyPl5x\nZ3nqFN/3ppgTZlNT2wbWB3BKVCq7mJzEwJT/R0GmFcxOjekInAi+0301XlKr\nUI+DIxV3q0JANLof6BrHBj7VrSCMmELDxPpijS1LiS5xSi/s3AsGljI0xiWI\nPFVG81kBFSOMjqIITQEY01qhpN5i1NUrVWgAzk5YLiesFPXg0X6vC/MpT1O2\nj8qKPCnXdoHLjVL4bS/nT5+/ZX3vaNoycuVI5+00YjAyJy5s0iqCRiYXwiqB\nkALbjzlQFCGScUi0bxe4fWPAuVHudxFjZ4DdGoUk0AknIAVXqPTvZVAkllJ9\nEqynUFkw1vQeoUJGI7Tl1CsMLXn0qc6ieVyk3YdrWENoT5NaTvhwXHcrlOkQ\nOVWSYxhHR2visesEzMKfnj9tnU5aqun5VDFJgVCBIj1X6iIwsbYgkc1McpOt\n3DtzCi3Ei2nhzIWR4YXtBiKpvwXj+jj+sW1D95LyXjINTPNujYA8SuG25Yxc\nAxmicQn5Bz7QgPHXSLXfSpiWLJFz/zoiInD+0jzcVgxHqGAjO0vE3t2BIFDg\nNfCL\r\n=dscJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWdSIL/nHcSQswk/6mYtjoA/oNqUTY0Op9BkkGFkldUgIgNYGJ7ISqZe0ixePenTA0QjDGwF2TmdRm3FQWxUbFGwg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.3_1551950234188_0.3308983110901831"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.3-8f179b5.0":{"name":"graphql-toolkit","version":"0.2.3-8f179b5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8f179b58cae4d0b61e368e40057eae9b04f33a27","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.3-8f179b5.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-rsRoG+KK21udYmuOAkYXth4FQVo014KVTcuo79gTFfvPZKIDlDgzOGv4hEACrwpxsveLGDFR44MrG3pYcObqfA==","shasum":"11fca65a7dc27e8e7484f77c0f761ba78ea47682","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.3-8f179b5.0.tgz","fileCount":251,"unpackedSize":251298,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgOGgCRA9TVsSAnZWagAAlaAQAJwtxQBWJ4gFwrM3qs4v\neHnrm84V/W/5pCiGjiPqwYmcwuW88usewziA8cQ3cdggjiXzsnkzy7YBqKkO\n3zoe6HpQkjNV1BuadZqdXM6s9BNbQNtRn8O/Kgu/SKD42W5AH5NGe3sqMLHS\nE5+/dHsUgXlmD/UACtjz6awHui6c6OAAtJhQtSXEg/+o33bXczCuQlR6dnNI\n+d3XXk3cvOn7eeJBmAPC+w889OneN5GtardieOcE47qYTTOozzTH6MLhhZLz\n3uhxVm8nYYejdlXfmpibYkik/jTzJOfuPHnBvIuiO+IoZR+xg/ouzjbN99YK\n0sg7VfBcevHZlkAnz1+LHK09DisaBPwQkJRbne7lKYnvOOhKxiZintzVQ9yA\nwVQ8Y35E9+gAhmKZjdo3hT5S67yyCFjapSExdpbNnDdf2PdEC3lM0WljufWx\nA4zploLyw5wcKKWrKET4RCMFkHqRhE2J0Du+Yb4fsDEWE//bZGtGd5yuM2HJ\nirQlG6yMEaRZScz/8p5S4xbElsp58lhR//9iD641esyZOohYni1B8D8JQ4pq\nrMKECY0QtdcmVXqsOTOm9sot1Jgwclb9/NfnKE1yXgh4SmB2+iApK3765LiQ\nTAczNvVJU4S9DJE1Aa8wCC+AgexaA4BcE3jn/Ja4Ur908HIhIimdxu8I0MSu\nDBGA\r\n=jeDl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5Oe5btoEqIXVoPjtndU6nOcmj7wV9Oo/U65JOyJPuUwIhAKhmmhWOx8tj7YBpuBWO5L7v7PF7GWRZ+5xF5q77h4/n"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.3-8f179b5.0_1551950240296_0.5250600590649124"},"_hasShrinkwrap":false},"0.2.4-8654103.0":{"name":"graphql-toolkit","version":"0.2.4-8654103.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"86541032592db9489724fdecb7fa9778613c297e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.4-8654103.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-u2e1nTn9auB9KDL0GYKm8yfB3ya3crqlyKQBmzJoEX2m80aApI9r8tGzu1VkDgGmUYElmocM9tw9GtswzlVtpw==","shasum":"9534f530e424525ff408e2e803ccfdfc4bc21019","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.4-8654103.0.tgz","fileCount":251,"unpackedSize":251552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgOHTCRA9TVsSAnZWagAA0yUP/i1lELtFKihMYvFZAGn/\nALsW35BVkmPWkobdkUbNK6WxuA30utv6+9RK/yCIZwEquMQjJL7lEDBzAroy\nJSxu4AlZwvZ9GPRRa14o+TIgguNPh/J+ZE/+UEeHpjnITZbogIgdkFLLl1bx\ndDd/xwSh8nGXreY0qiGiMKv5t1WLBDNxa4tQl51YIwaUNoZkbfznS9N1JKT3\nJJgtMxCJAxXVziX/W9p0xXXme3K5BVodid6QcMZTYL54d7w2Y2oBWreA8Upr\nGEF/vEj2J2lXrtWwtP/h2iyOTSD55RCpSpkUqHqWTP/RNWD2bn2o3Og0r5Ox\nkPuf5M4tDOJfpL8mr8TE32djUtET21Trl2aQtYNH9ZXcTYnlBIZE35lhM8tB\nUSIv7uhF1yyuBy+vH2+lg0KeRATSJSSOnDnekxOMFoCHGIyo1oLNE75EpPS5\nWHNYxvgKZ+1bIeO22qrprRbzw7hXADmrERmWckmC6YzqSwbmVcsTUGTxVoz8\nVvf71Cxtx99sSY/6PLYh3Y5x4Qj1uFBjTOu0ZGLv9hIgvSxxhyQc6Ve/Zx4V\nwedi35L+zINRCF0hcTWZZE0B7b7IvtADzpGB+ZeyPifYicEcA53TXqogo61I\n0IJcp102sVGE+udzdW7be3l79RMnxUSQ/V8CVIYdJ4r71N4HAdrFYX1/h33R\nL4BJ\r\n=OnE1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeRjyo7UVyJexve654S82YB1dO68Kf7hUuZDS6LSn1qwIgSta2eitdLICS35qG/VEcxlRyCycCx0meMbFbmaN9ojQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.4-8654103.0_1551950290702_0.763690968566914"},"_hasShrinkwrap":false},"0.2.4-b5fcb39.0":{"name":"graphql-toolkit","version":"0.2.4-b5fcb39.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.9","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b5fcb39ef755ca192aaf7fc4b85f014645e6f0e8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.4-b5fcb39.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-b5svFASnQkhcGBAo1AYBLP2mPh1GsGiz18UrpgPvcOmeohfSNMvU5Pc4iUPymjjzXQDAygSoG6PYaCzwEb152A==","shasum":"014bfc632b1c880c41ba179e5abc2f2f3927e412","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.4-b5fcb39.0.tgz","fileCount":251,"unpackedSize":251552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgRTHCRA9TVsSAnZWagAAVaIP/RwIQlNChYGsVIFonlN5\n8VW+PkYOuykEVK6cQXLsl0IJGDf7WQft5FqyrzwkAkcqvB2mol4x8av4pioh\npyxS1fGBptEmb9L/gihCzUvX2ScesW6uX8V4lyGyOn2aC4H/SZ0aUMlkM1Qj\nFHWA2rqmzJYeIeRcGfnPaRCBW9m29s+ZqpnnUhrAIxJbwAy/COCqaz6DSYFX\nh3QuR4CL7uPvvEoX9jVJ2R1vQgpPo8UtOM//RT+gk1YSVmV+/bCc1hPCYvYY\n2+LG9wcYJOWhdIaQ9EhpAAK6J32AQau7WdMy8Dmxi8C2p8Wlz5vT/kQWKcJO\nDd9Kx0gqf0T+UfkmbKcwMw0z6Q1BcttmMj585YfDoTdtxAfMg9WSA0AuE3gZ\noPkOSYXosnLVgT1ygjOnWlFbb1k2lbQoeLznJBOPj32pwyQXc4nQOtOYiHHJ\n8EqTr3GQbUDJqrK2ZY/GQA/EX+sHP5tWoX3BG3kVAAbN7vYlRZMVy8VRcVh1\nDHy6Yow5o78+wTYsvdP+/gqHnCsWrqiSO+DFHHmPyNJ2AaX+7+9aPe2/Xb8E\nxRVJXQ9FXKAGfL5CQEv7YSyZuPEpqsqWuMulZhY8VqsJMjBJ2AF3NrBzFDe/\n6fEdY5QvvjlCOkuRJSJf2EVBhv84B0fEXRIgAKUdnL8NyuTm5g2agQVjqRd1\ntERF\r\n=eQmm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9h40lTnneHRb8Xiq5P/NLzYJl36MiNjXzcaBlRfBsSQIhAOvlNk+mgfsmVOSu9KvI8O307ZxMj+zoLm9CbmaqPKL8"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.4-b5fcb39.0_1551963334720_0.1443797231629187"},"_hasShrinkwrap":false},"0.2.4-c4625e4.0":{"name":"graphql-toolkit","version":"0.2.4-c4625e4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c4625e4f8a0b09c4b477d6a93d39979e10bb9c79","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.4-c4625e4.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-jGueUyjwEVWEUNaUKLrCiBJbTDxuvn+EUVTb6/EY2/nioFyXhhXlBSpSgFTqfMDySOkHHkT81Z3Wl2qn31astQ==","shasum":"4b9d9c88cb6e2829fa17b4519e5f3bc46cdcd38c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.4-c4625e4.0.tgz","fileCount":251,"unpackedSize":251552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgR7NCRA9TVsSAnZWagAAPqkP/3ZutDTImN26mYHM74LX\nYfs44IkTb3ZXJ3P09XfmFGk1YLju4bIJ/wVvy7bq0OmfbEEqDxUxmckx3u3c\ng8igT7Ui24fY3slw+dMsdhB2SDQjL2vm1LprFg3vuIfioE0hDc4I8VWoCsGF\n2p+/DbzD3YjqobPyS073LxsY676QbqZ1aqSQSrWd0xlvyXExZnonbGd/nNFu\nUd0HIeW6IEDxFWJQH+zuT76nDRcH/D9l4MwfMoqYqsY8IoYEw/I57yOsoOk/\nbUGHpDzPKNKnb52lkxAnnByHy2/a5Tin9I6sSnKuJeqLuQMqZqZXlJib4/V3\nex/Tgw1jYs8l1XnWVVWHLKzGHMJtfeKO/54VaryiF+QwHAifXFI7m78F+sjF\np3fG6GXoQCObcYeFjXzDI7ZForKPkcGA+Ie+ANsky1fenK50p/GJZWqtIPFz\nX1u4Y4c0p4DRu8SsL/cjWoy5ZXQnhwWx9UuLU120Hu44VOcpvMEwa+tOF66S\ntHJtIywnhh2IXIw7s9BuXMoLDQ/ruWU/Ar7ZBQSFppnWIxgWwN6EdOj04let\nT8A+TXSREkWyiVyniC9oQhHkJBSQ8qFEcMTJwNAHevGc6iBThSRWOjgbxKp/\nL5BnQMqUYInrzjtOPQFqd/hZKyQRifn8Gu3HPKijDuBeJYCTphOaNipgUJV3\n/AFx\r\n=vB/u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7ofVgexwfPHWsdEupdupHL22MYcJhpt9pwhHqFetQogIgZuaNa9tjvN0PONWaulBmcBYFaCx4rz8WADeVTWNDk9s="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.4-c4625e4.0_1551965900479_0.02054045461517995"},"_hasShrinkwrap":false},"0.2.4-89463f8.0":{"name":"graphql-toolkit","version":"0.2.4-89463f8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"89463f820c31a6ce0b7a098b68579b44d59c67b0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.4-89463f8.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-2yT/2U4xQpsOeduU7P4VujwpLedPVEGklO/eByDhThJ9/bWZ4irswZ2cQ5BpPgZAHo+t0wrqAh1c7qhPpKRaDA==","shasum":"99224557663f02a3b5d474805b52b97c78892fe5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.4-89463f8.0.tgz","fileCount":251,"unpackedSize":251552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgarPCRA9TVsSAnZWagAAax4P/RNbZzIj/+VqjZsls/fM\ntdvaf4ZATkr7EsgvfxyeUVhaOrb28GDVVvwWjKcAqP7kS7tndSdBV+nIhIqq\nvFcL1zSBcYjdV8Ln8wnEPuNFFDnd096J7Al/PYEQxJIBlW0ZYP6Xw/EM3VG/\nCdTUphJyfm9G2JpUbTpufwtyzQG+qM4qYaMcz188UJthYw9onumD30tcp32z\n+r9+hQAAxKbY8Zq03aFWynoxWWUReyoGdcJ9h/0/8m1mEuiMpcCRyCJ/J8X5\nFRYf3FFkFVZzUhSC9KGRpywWnCneV6s8b1Cadq/6xWWm/dgSfHgYFOfdznCS\n5Um1yEgKJCz3nJaScTvYMScXgRvNw9c61VCrPeRUJTmYKiD4No3r3ViDfjsZ\n115o96K6+Qxa71wGarA53IPJdEAonCc+2Drf7P5BzxiHuOOQ3HQn7CRddmxy\nor9YSi1+pbAJjOdWUwUNanGd/49l2gjvhjm6h4QBSqEr7ABSviHIql4m6bR4\n/9adEbFyCOvcVzhUSHqIAneHh2ZWRYR/W2+/GU1+1nwxaio87i4o7cm4UD1n\n1Lf5w2ER3WHCPsFRE+9SP1/5zvj2AP71wWGnatT7RnzLAkHlFqtL6tP6Hy0M\nlOpByvO8akE8MBKjwG1RFBZI5N+POFrz89/eOYW1P9JmJTqplIdOfs0/7uTQ\nsyoH\r\n=o3GG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRCjDBZ5jtfbAjeKkCNrjt89tUDdpCW18grFmkZGmHogIgGx4BzGQRJQjWQQyoRzFDuxwX+fdarCx7OXHlu/1hVpY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.4-89463f8.0_1552001742587_0.8240954701771688"},"_hasShrinkwrap":false},"0.2.4-2ed7c47.0":{"name":"graphql-toolkit","version":"0.2.4-2ed7c47.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.10","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2ed7c47c1b7b0051fb62fe30d2f9783c8cd478e5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.4-2ed7c47.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-6JsNDoievWp/n6xOJ+dFTZ5j6bPwPBsSvZFdOkmPcMPYXcy5hK5AcXGWK+DNlizg+Mkfx6P7xcqPB7mnsMBXlg==","shasum":"9c6527c1626941d22d243a86f0ad9f8dd5bb8778","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.4-2ed7c47.0.tgz","fileCount":251,"unpackedSize":251553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgrrUCRA9TVsSAnZWagAAjEEP/1hTze1Y2uN/fVw6EgBb\njtswEBCe8dZOyJETNHPqjpkt4mhkJbmX1lPj1VsKlhnD3C5lcu+qt2tWsOMW\nWJld9H1WM8tE9wnr3HiKdrhytzlrZawqG4D7UfDqJFYzSdVL1aDu1+Vfbqho\nl0Jjq1J30wErFcS42E3tnmCrKZIAIlYzPRhKCTwMZpsW6G85fAOhcQ5WUWzL\njWlfmdFEZLG03WRzBCMtfohwCNoVKbHiZTzyw5rvxwZnYZNtGe+YHrENYB3M\nvc1sjb79kfcu8oL0CgMBvho4BWPiMb5tyncRvTXUOtSd67yrojcxpbV3GfZL\nCfV0yV5mKT/MBlDt+4mT2I46PdgJ1h17fZmMAHsCC88ZSXJAQWzvjiKVrzMu\ncy0JA/1cq5ndl9ETZkJtwv1lF1Y6vZH8U56SwKzMgXdasu7SqJrTGXPJic1r\nF/YFikyRbFsflicTJUlcACiltY7i5gq2UqcIYYrGUBJiq6RnOkQhEstk+r2I\ndOtl3tFlD2/Kx66zg641XT+10pfPHHPdMH0bJRRYDVILougBiZ0YU0CZZ7yG\n1s6gl4OsxS1h7npOuNaDOw1cbzlnadZd1U+JYoAVuPfmaB2WLo1d7vkT4vt4\nyCrXf/MvUsOC3fSumj2FxpOXtwVyQ9/dCA/FPe4MRkWvwMOnJx0dHS3KxQt2\nYzDx\r\n=bqR4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICfQECd69bBy7R/PdvNNctd4E4CCaR8arqwWYYET2pmMAiEA+sBNSlN+lFGHnO64ZIVsQ3O+8yl//tCeDckv1x4pfPI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.4-2ed7c47.0_1552071379869_0.5168115384716585"},"_hasShrinkwrap":false},"0.2.4-b3a132f.0":{"name":"graphql-toolkit","version":"0.2.4-b3a132f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b3a132f0af52e663fc4d3bd50d8f8893d02fed97","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.4-b3a132f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-TR3Z0K7CcViNdqc0a5u/f8QbMeIUlogsG2bQhsR32GZYzPH2+N+xIOq7ksJOv+pv5g4K2duZ1ICy665P4W6Udg==","shasum":"7001d04d31a05276a3d6b1a6a7377f878564a2d3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.4-b3a132f.0.tgz","fileCount":251,"unpackedSize":251553,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgwkQCRA9TVsSAnZWagAApYoP/3RIIgn9qzWT7LGKke4y\nZRBAhjMpGTjY4qZX3DTZyZRfpcnSDEsHq4MoQb1yJJWkrqSqYOb2lDg2tdLE\nTAokGGiuEIr+yrBOtpZKFAfEifuRYp/6DP+3LJ5dCFtO2JQjaycXabDqmSLc\nOBexBP/iQEcirsgorj3NApqRexmZAqVoaHwaM3w59PFn4tsp/dLHjMfE2h7U\nXXBQ7Hjw+8dPsgz2Tzxxyw47bNSwXb99H7RH5MGY/YGWq2KPtCHf1TZHUaKD\nRG6Ofqx3rNFZR/PC8Yk4eRuOYWFkSdjrK/L0RjMhvo4ug6r3LtvXtXjGjbyX\n99nz1sTTZMDFlwxYzl+a1RU5GiWTlo6B56pRjruUfte7/QJllhgzhf+nyILo\nZOQEyPRG6W6jR5g0vzVrl16Tn4G6dgpcc4APFfinfXWRnG9T/qwmVbwJjKa2\nvU0Z0Y4WIltCy27RG7v2Evpa+h51t6HrPJRVBXEhvjnMjX8a2fAKdApgzYk2\nCO7JJh6ymzrBzazLGImSJBcq7r3PHPxjtGcZdgTak1ypQg8/WKlpr4zD3CNT\nnG/kNldjzfOAHUk7rsLMSLfzz4fWaPcm4sASmlfio/3U5hSMeBmyXHtJXoYg\nkOIaKeUbUYquNp5Oy6XJ+dsXjLrdl5uIMewk9KW4yl8clpAAPsvMVyh8czuj\nf0JF\r\n=2vHf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnAizYggiMTEShiDu/DzIXLcVWDqy+PtPO0aYxfQQHVwIgZHcILYSvdithDtQHr6cEa2z0UznIMU01/aO1CheZTBA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.4-b3a132f.0_1552091407153_0.826385348737178"},"_hasShrinkwrap":false},"0.2.5-05a161c.0":{"name":"graphql-toolkit","version":"0.2.5-05a161c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"05a161c399c0f405b7103e3b62406795c6df01fa","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.5-05a161c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-t+slxU7mvwXB5s+khn0CYKe3SDf9nqslLRWWwEevFHUUy0taKr2FNo699y7/1WXfmss400IJGweDj/wIzG70zA==","shasum":"9b18f4c2037e0e9804992c2fdae305f89e299ed0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.5-05a161c.0.tgz","fileCount":251,"unpackedSize":252065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchggUCRA9TVsSAnZWagAAkv0P/1YWGWrOW1ylDkaSyU27\nTSNLPSkT44p9AW5r87Ml+JJ1h1Ro/i1kik8LRYL2Uh/kbUWVTVzqa+bqaRpb\nCp0fsftFvK+PkAGd7xaa4c7KiQL8Bpv83VZ8WATls+8Rn+kEFRXtWixAa+xy\nG82ifOZwo5IB4r9cvWeMvaG3NOXMsgD2fo39jnttUX3miXXXYD0F6jaKXWY5\naUxM8QjQKH6pczcNq0hgeWYSx4oWfYtw4WOMUp2BsTQQLv+GYM8Bq+60s+VV\ndkSZe/6IuPyGWZpbt0A/HeXiixS1eFmCrTs7W+uvBwzd5x0ZvjnzUkRnS1pB\n12Iqtyb6bc2ArLMVeh91/tniK0Mqkd1nHIPJVZEhiG14ZvtSUZkfsbZTQZ82\nbY9cDyzI0HHLwynRx15H/+7TndlIL/Agk6Ap9O2KoK/wBO/Cskcl5IJ4BecF\nA+2tjoTiveb3rwkK+/gMUZjTgHfhUCRug+KjkdDo5f7CE5sEEbMO6D3g1OKv\njFHOvqE+6jgwwA4wnOffgxakykX2FuLweqIf0/jxVgzb4nYGTbnvAYv0pNCv\nsSMbi+/zz/IjQ13D0yfRydYCZmX2w0sHRR31c48IVx91mKPEQrMhlI+5PMP3\nFSed46ClCNPu5WPXVPjGbHygkfo5qph5koprTECXqfJOdpG+HPI9JhqDqM0f\neRin\r\n=EqjD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEEVQFUN7FQ+9pvkdZ9XcHY1GwnQDxdynGaTvbg2ixizAiBFDC5QOeOn8PZFVnzHEQOKxSCpyOA7SDUsRYWMr5ZdFQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.5-05a161c.0_1552287764279_0.8953567925311041"},"_hasShrinkwrap":false},"0.2.5-aa66588.0":{"name":"graphql-toolkit","version":"0.2.5-aa66588.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"aa66588a97dbccf0b1334a6510813165f36ac8cd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.5-aa66588.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-iPsdNAqj5uCD5pDt7d8TwVfwDB4oIQ8Y8J0B9NCeeSEXTjj8bIgu3E/4jsiDaF4THkBRUZ/ayytKnQ8GTamUbQ==","shasum":"913cc980e6dd693c961a6b9c356bc7c0cdb6fbfd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.5-aa66588.0.tgz","fileCount":251,"unpackedSize":252065,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchggiCRA9TVsSAnZWagAASeAQAINI6hV22DZRtYbFTWsq\n7Vps0j1mxz5/JdDS50FiIBI4iPl8Ds7paczSVuBnvC5rLEQ9CX7G63asrZD/\netY5AdHIExGGR3PIg9hai2HIXk1i1pAP8gDL6any8oaQr2opTcPtRiezFFcq\nlzfEwDv5ygulb26Tj1fLLh0ZnUS4gCVquAIvtvGfA05HTbffusUDtP3RWRpv\nbdMwqtx1n3xjXMZG/m31lkhf1Eo8c+Ree8oWtj+zAvVro5SQbWEkcWdzNSx2\n/2sJSGJsdmAzQRQJ4Rkv2ZQf7Gp7J4cjghREFcqLWIGzTiGrLiHVu/1+1Qy4\nATCoDtgBANTT/DVpi+cFm/inlDcuISgxNCZ7Dr2NuBBH57yNuK1/BSOssLrZ\nw4tHrDJw0cK7YhGpw3kUqGnHUzALupvykLglFzDEeY+O1GnzW+AjCoRarJN+\nZ6Kxn8tKhPhA7exGYXmEpygJEMihKpvM5hDCt5dwySA1/StdAagUo4GSYuBx\n3/US4TEgU/VjpaEKAOZoVbRlCabsad/g9PVpSzKURSya7XTpRLJxJmD1fyeF\najIfriHajRiH51u0JhFzgWltooxvZtbAOa9p/UGXd+8ShdNKRHd3l7M+DDhg\nVo+tSVzf4qp3tJU9e2vWjq8sGIFFHJGqxKc1aywcwAvx18k+9SIVDhD5+SeQ\nCw1r\r\n=lJVy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEaMKlcqPLyTd0ZTv2lptxQdpKX1ybAhr1uwJG8x7AYjAiA9GW7doLLLgcyfz6icUnm5p0le2Oz1KGfkBxmZmoIWVA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.5-aa66588.0_1552287778186_0.18904755289427255"},"_hasShrinkwrap":false},"0.2.5-b89ebcd.0":{"name":"graphql-toolkit","version":"0.2.5-b89ebcd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b89ebcdaac3fc5e6827bdc1b5b2aa4cd9884f054","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.5-b89ebcd.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ALRm4Zcx0d6seg1c5qc6J1fFmPzhhlUj51/i3A+3HFKBHXIYCrpadu0z6yuicg/hYhkbj0mFZUV1CEC2cFcAmg==","shasum":"53e0b8b135a9846a529b139db6e5eae9ed091e49","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.5-b89ebcd.0.tgz","fileCount":251,"unpackedSize":252066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchggyCRA9TVsSAnZWagAAnLoP/1W1TiYQpafaRvti5TfX\nmeqIvh+oqkJfjM6TbNP05ovkrTqfidOnJzP3URqV2BM3aVcrIWtn5xl0JTVV\n/aAsBH1NYkKCzkLvXuELAfzFCfu5eeG/67S1qnWhoRWc3qYRWo7dvTNNPN/4\ndTfQU+2WaH3akTuvYqeRsj/QMUgDcA4BLIJDGJMhwJoYSPDdMQX1nC7HUMOm\nhIVbaeGMosrt4NmNbM7pDtoRPaAUqKJ7cGf86Kq8GuF8HVZSWN9+dHzAtfA+\nXLOu43cA/O8Zh+28q6b8ytr36f/yDEGrXkh0cz4LdNCjn7diisvjBc4F9CLg\n3ct2xEq6JkAQhTIF99Hx4lgoS/bTvaoC2RFnI+tUyrfXp4+/zrB3FZKU+F+6\nkIDCmxCRrok7tHQQj+uwi1WD3YOMe/BTi871/CXXl9DeWwTwb5N+/Lw1xYaj\nkWFaHy29kf+BYBDJx0TzHxBoBSWTL1Y/xmpJ8V1R6CaieTS7elYoEbjjtcFf\n+xQCMhmBjhxv0AWgQFZ05PGEfqh4hIacuVM1WtbvVn6+odFUM8ob5jFRR00c\nOd/CjwqoesqUw7Tpkq9KQPXwUvTW82c+tcaLcBzeqOb0INYYniz6Kuf2I4XJ\nQD5R2itKVdP1BAKp7KFkxLGzMhpXF+U5RHW3ARGFTOqRvBQKv4TOaFpy9Fks\nwFR0\r\n=LcJI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfUgLwYVeW1Jm0A8LnBc5clkXCaTnwSPaEam5NUJNEpQIhAP3GZtW5aD4pCtNyREwOHCK86A6GP5v6aNlYJSIFqnhI"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.5-b89ebcd.0_1552287793996_0.2912717768233901"},"_hasShrinkwrap":false},"0.2.5-41e4c2c.0":{"name":"graphql-toolkit","version":"0.2.5-41e4c2c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"41e4c2c8dc8651f12c64248355be05c38c77b405","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.5-41e4c2c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-hvi0k6bA9H44Toh6KJEXMkA1BPB9SOUZYS3VMEY8KzcbX+vNEW5MJELzWO+6/OL0F8dmd/RZFnDrG2Z0zavoVg==","shasum":"7aacd179a6648cc0369785c612954e522d89cdf4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.5-41e4c2c.0.tgz","fileCount":251,"unpackedSize":252066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchghbCRA9TVsSAnZWagAAVEEP/3fBB6jdGZzli1ANsE8t\nyV6feasbUB8/svQHTiNMIcBZAh0jKS01bL3z525gJ9zIlw4SJxyFSZSJGt9B\naROji9rOGpmT6ZJ4ZNTkuwuBxasQ/undQ2pkrFuONHNsSvIuT9GVG+uy77Hd\nCvemaUHHQkgjts7Bx4KZlsyFxPfGtgdZ7kbG/rI6ZzDyAh39pRDIThBxTDcr\nmVWgPJhHWsagsl2WmuaIFXsODdItRINVNGeNgW6xkkzR75pikub4fdzgXGzO\nmdwVmebdukRGPHcC6SjkjvOb1ckBXlYH5JAKNZ3LetpWzFGs9cPGHu0kI7G8\n0XnKPhQlfzWL3HTm0KSHpmaTjbsy8WA/+C+Q9VNP4RG3XKm3QF8pbQFNsgCG\nRutlHs+NFc7tIK0XeUM70JLK6CfmYoykMiFFFG23TQkv+izset014iJeu6nL\nfSIWqWjncqXXNbqBL9zbHvUaNjr/7Wqb+dgHM4PW1EcvxdVqdJc++DJr1HNv\ncMsI52/9hecvNPuCeBlLf7ufN5frfkH8ZYsOZ5VOnX+U8abbI+HB9qVVdyE5\n3KDpeV5BqDbWsfZy+NsmgLMsUbDaid3cHYaeEQw+okXH8oCyNEwMEIyOHaQ1\nS9JqZwTVTcFK6LqtPBf1/vD8s/BpH8wfAOnrn63b7uyzX3LceUJvbLpN2rja\nDz2y\r\n=sQIQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFXR8ZfM4jgy3cVC0n0gdMjGMS1XyzOkDqQsKacECTS8AiEA9Py00ExbPnIsltUZhzR3rTxM1abzby5Ale7WXIHFEk0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.5-41e4c2c.0_1552287835203_0.857146927530356"},"_hasShrinkwrap":false},"0.2.5-edd5b0d.0":{"name":"graphql-toolkit","version":"0.2.5-edd5b0d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"edd5b0df1ec6ea63520990cd0280f129d54553f7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.5-edd5b0d.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-61cLeK6l+WDRIY4UElId3V36ilGhM/3i1jt+i/7IaNYunibOTMIaO16Wb/g2AMypDQhD8jKTIJ/WPpn4Z3kLug==","shasum":"5682cd79b64fef3258ea20a397a7695f3bbcfb2c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.5-edd5b0d.0.tgz","fileCount":251,"unpackedSize":252066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchgi1CRA9TVsSAnZWagAAnmIP/0wBL9SndMrNYwJPmyVH\nTC4fa+oH+72Z5vFhoYHJIQFT9sQRT1gmJIrVL15/a4A12sMI2roSnNbnWgEt\nrkQWhL7SZv1bANllfh1pfO4VZdg708bnrHl0apxhCKi6GNI8rkw82ngJErvc\nPnNcHfx2eiBw8+J49SpgXCWxgGHVSy8bRRV72GcWLcug5tAEeafUNxCOAqTD\nNQO9KTyfLdLZNYfW1vW64/qsAJc1zXqavhrmZ4aKk7Pd/q9fwInEq1FF+rke\nwszuo+du4CPJwzjhvMqqp28EOVRY6t29vILuW2us2lBMPvRfJR4Rgu3MqWSp\nX2npUKZ8pgaV9sW7huofxC4CA1nlESQplbYwBkSuA9NCPEIAqPViMi33ymtq\nMo2wkUKPg8TCgy3+WCKdMfSK7cV78KotHNeAKgVaO6ifNZQTSjia1hZgygMi\nuTlsaTRvRMw1q3POIYntPXzalbXlfUvHQsrLu3OKJENoHEb8OZF9jVyOH9r7\nPqAQuqiOrES0lny37Putd6H4IxpS8+0S7zZDZqQKtCXw7ZyLb5IkQT8VV4P9\nANKOkjv2LXLxie4z0ZcJIrMkbrVE2ePeempoAvhVM/4enfDRn7KWRKdR77jF\ndkVv6g3YuiEkCGpRzk0HWX25XliuMFxZElCpWgP+zRXgkkqheq65WVkADRmI\nn1wv\r\n=JQPk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPw/Rp1Yj2P5RA/NDc2NFRGMgmil5WhNQ/00q4HbvavAiBJXKMlVKCpafuloeXhyLlB2o0Z0kI92VniCW8n/4aatA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.5-edd5b0d.0_1552287925284_0.8735010070917579"},"_hasShrinkwrap":false},"0.2.4":{"name":"graphql-toolkit","version":"0.2.4","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"edd5b0df1ec6ea63520990cd0280f129d54553f7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.4","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-J0wYb7ucO86LkiJw5WPiVqcTcKw/XfZ6/GukG5XXDhLRXZWDxMzIB754zvU4s8LZM9F1So94nFmdJOKdqH2W/Q==","shasum":"64228f442fc451b68ad4eef51a475e28409a0c89","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.4.tgz","fileCount":290,"unpackedSize":299242,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchlKCCRA9TVsSAnZWagAABdYP/jpXCwPgu9hBcuKBOHxi\nj30ZPwM9AqI/2DeLI56tDu62G2k6cJ4d84taVAaUr5HorFu78GO+KJnKPjLJ\ng664FBjtZEb5wXKL8XZScLmMbfnMdAA9FC9yIz2nB9w+Q1ong1vi064QNPbH\nwT/JWdaWA1RuKNIbz/5gfkKCYSu5fJHi+ZiD6qYt8zkMo9o3bSlrnJE0cHXZ\njP9R5gt+nCHoWOKO1Mzzdjr7569sVW7b0wX5bireHHwKLx3PyWOPw7trrQVP\ndd6Oe+Yy3RlT37xrttBZBjneo7dt8U9Q4xSNaCNPVSgN8ktoQbVgfT0mvyPN\nwwncAVQO+vSE0RuPba5fB8F5q/T1fjPH46MVIrMKRFAobjD5i70Z7hkiHu97\n2+mJE+n/zUC4v0d9gPyCHERh7RPzxjAhfiXibbecP0z7wc0sRKcxYW2AFr2F\nFAmXdAnP213Vuw4ttq1vV4DfVtY/Za7UL8vZSQXLVg0TfK0Er2ee2fvE2zp0\n9WBdBnjUzwlnUDGfQnWS/OmMKZWK0/jrDeQil4c69s994EN3O5k7ijGtMd0F\nknGl7vt/ZBNXl//XCe/0cJVFiQWeF2iOZKMEZUzpraRWdHw5cRCIeg1V+7NR\nZaUZCSosku4neAZkiDzQiyw4lREQs/TpEgflKhOJ027d7D94GeYbdPh2qFTV\nvkRO\r\n=uCCr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHT0oFNYQHGLI47jkq6/Uo4pZAa7xRcy2Zx8fFwCuBXQAiA+SGhBqqYrxwWsilptI1elr5kK1fdc78eXKJZasNpsqQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.4_1552306817926_0.003628263759801742"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.5-399121c.0":{"name":"graphql-toolkit","version":"0.2.5-399121c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.4.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"399121ca55659c83f0685bebcdfb0f952767ef1d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.5-399121c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-sjGp9LNGSFsf2C01mM1DldQVb4U2hyUY336DZ6w8tyZbhFKk4Cr1jxnQBwBEl1H35/Jd4T4JoehfzyKhIQOtjQ==","shasum":"d35c8bbf0f6f1cb20cccd75dc3ee9719cd797237","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.5-399121c.0.tgz","fileCount":251,"unpackedSize":252066,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchn23CRA9TVsSAnZWagAAUIkQAJzKJ4BO1NBYcStRY+Zv\n41KXZVgX/IvGWGnnGus+LKzmQLQ6Ig4/au6gOJaKrK7dsiXXS+uFFS5IOjzd\na5hwHK3LWFi/w3tDTi91Ic8s+J6c5oRZxFNi9BKDzlnEQDIQTRJ/z1XZRGf7\ntLW7TpKgwGm3kiz0TK9xl+TnrWCaYuOXUbZ15VKz1iZnPcIKWiboRf+k+ZHd\nlQrB7rKR32M4zonvsmeKvmSUG9Prg5hX5VJFADNTQW2g29TERQwOHNTqv+Yl\nbHOxLB3SYPZypkslGxxDUSHc6tAhjzm+Frs3DXlwm4NN1Jfcp1VrdoGtEM1k\nGJ6Th3H20lrKj+vd5IloT5paZL1pd9Y+E4ri1WdbVe1RXkOpVTgBB2ZC7Q6S\noX5JOtA409eaXJZu1KTtOQH/9XBKOvMSjkOupU/WOGU8rBGaHqju6/XZJK1A\nzSHswcacOBdhTJT18PrtNjwg+Zcd52ZcYDMzxray4reYMTVJpRGeTI2R585X\nqbYYylhma39h+QcQGE7kmRTGmWR/T/tCKWojwMz2OTplGQwvFdWSpsLtrkif\nI6SnYfOB7uBHdGImoI9E++Z4dQMLBNUZ1NfFDBoNb8fWPIQNlw0jEsnebIdf\ny5BuVxQc1M1BQiEZST2hdHbz2sluUCLylyZF/YbWnEGU/St4cjW7t0ldBwUO\nY0VX\r\n=j6iv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICNpU55fI5x4rhyZKz5w7ZxaQ61QixCQFPqo6K9uoY1eAiB1AkhK4JgtC+gUaQYI5hqo85+mFiLRw7/QuqUwKx96Vg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.5-399121c.0_1552317878337_0.7478066283278135"},"_hasShrinkwrap":false},"0.2.5-e1a3b19.0":{"name":"graphql-toolkit","version":"0.2.5-e1a3b19.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e1a3b19d516b7b0db88672bd46c6784f0366b3e7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.5-e1a3b19.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Cg3rDQ5Zje7Jb7d4B7Yi90hFxwVTobez5M+khmTl5lKT7CxQv+GACqa50SlhjV9rHukurkFO/L+mJTNJwcvfxg==","shasum":"4daa09cd0942d33fcb926a077d36fe87dc5bc27f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.5-e1a3b19.0.tgz","fileCount":251,"unpackedSize":253349,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchrDCCRA9TVsSAnZWagAAZzEP/134WcJA+PYEpSRCK0AX\nEM11FnJyxTB8JXz23gVZ4SsnK/cd7uC0eLzFFrca6XHb1gDpKQik45R6pmnK\nHWhfIQ96d5hgxNqEVQg/E2t3gb9bHjc65dGpgo5mNbRbddV6wooESAVHeXe9\nzeVuHlo0AnCZNEwtnbp9wmzu6c3Q3kZMv53inVsmXtDC+anUFFvAObamMuJd\nyxRQ+3HYBSaE6Tbf58C02S29j4gsiNd8rEeSQjDCGLbfH6wbsjFu6EWdE9bZ\nDMEsqe8M3dqEoNNKnvANklYvnkgEaoAtPz2Ex7vK5Dmr2VL1CLUBcQduzuSl\nx9GnH7OMoE/zhP6DBMypS9Uf3doWe7Vg32Gekfx5H8rBG+odVKx3AhTs7EVp\nUqJSQBYYD0LglVWFoS3K6KUIyDnb4Kzp858ObkZXFrJy3ODrOOxxtYiPQ4rz\n4we6rlsnJ/Jf1JH7YZXuUAEj8KR+0hp4wS5r31fwMo/pHqVR14/ikEet0DLr\ncv/h3QXjr/6pcgVlEdMbmR7JHLunUnLeJsSdGNxpEhQcN2uiO0AFi0W8mTu/\nsbHPLG536erlAemd4CX271OQXfr/9kf2BvCtOyloAn82gyL4t7/csaCpPAzw\nj4wpmRANqydvYlUefY19/+Ntlukyk4BmsxGFmacWlr5nS9kI2Ek1ZSqKD1aa\nlXig\r\n=8Be7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCr50Bbc3u8T50zjF10LQyM4e8noPkXqyhqDnPIIDbVkwIgU7M6D9KuuDN48BeeNV8s+5X/WbOulwlI3vBvDIqSVuA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.5-e1a3b19.0_1552330945410_0.7809715870653635"},"_hasShrinkwrap":false},"0.2.5-1910023.0":{"name":"graphql-toolkit","version":"0.2.5-1910023.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1910023f2288c43263d21b4e7e87681802e452de","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.5-1910023.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-cbh/64y+I//lihSxjZLFhMMe9Dddyria6i1DB3RbDCWZ+eXlAY1cHU7pW+5jQHpz5mxpUU3cWDMy5Y+veFPQiQ==","shasum":"a1f6cfed299e42e97ce119eb754ca53c5d8a6bab","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.5-1910023.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchrLfCRA9TVsSAnZWagAAlS8P/1DAKeo2CxLzumsC7J6F\ntRA+TqZJkLknmjsDcujSY9AzZbUj5ADgEUOsJ38U7aaVJCawBJrD0wh6rkum\nSv9Yki/+FsAJYbB2W5rKh/dExr/+CX3lzhexOVO2oRBRVjbAbEcCqYi6ufa8\nAKjECp+Azc9Q3AwaCtNbWag2qe0I2LGx4+WgLPmgznnvAHzUjoku9OXrzgpB\n79DaLiZClF9bsjYCG6OrgGvJez9QL+Ldn47vqYsPSzvEHAZXLxzWHavaJ9xx\nyTLhFVbri3zc5gYnISgtu7fkuqm7rl7KRF5ela7+LdMVcmjO1vXtvJNVQEZD\nSmoDygkHTT87vXoocze/ZmU4AR7kf9kmKtYrVYgR1QwvkVm8hyRqTwYWK6n9\nPpn69jFSsj394anhajz2ilAx0qh/jIDo24v0kLDTGc18AnXVk1tnrnT4oDp6\nlwp1nwxFZlrrKl4DL4TyaKFBpl5VB9wcXgsRNQjRDigIUL73gJuHRyaJh4st\nCZ6RgkE54wyfFmoHodO4ObiU9PL36lYUwxFHprdd0+qmEJUq9OR3l2SRqvzf\nfzmGANanUPl3GjdxOhmhUDpApe433Y1l82pJccuf2fP7KV0mKUI7gTS4EAac\nD7ppL9y+uAI0/7rRJ6BCUu3QrA7Iep/hvYcP/UVWKvE1nQf3JJp7ZkNbTSwa\n+ezV\r\n=iW/K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDdUuCu3xPKjpA9+GuXb5XuZSRxDeoZdmzN2l6uCe8RAiBbGQKL/UBSR7LbNpMlIbwKmnBWNcuVSfWFayQd4aRhqA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.5-1910023.0_1552331486288_0.4766041161148644"},"_hasShrinkwrap":false},"0.2.6-a0b7d6a.0":{"name":"graphql-toolkit","version":"0.2.6-a0b7d6a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a0b7d6a62652a6c3a101d8404571891e689852f0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-a0b7d6a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-gbTjPh0p7XNyrZ7R1nlMbmlRnANBwNhnJcJaNIlKG/puHAfSCoExhfhjUxOBAqZBIj0A4qLA9s1I4loV9Y91TA==","shasum":"24e65e34e5a7e135b2f6e3d3ef2807915e975200","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-a0b7d6a.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchrM0CRA9TVsSAnZWagAA1soP/R5GC9fqdtKo7nBw4cYO\nqeKBxyI05VgA1ogZNIDonxRAJKgPS2UKCA/dLttAVCxRbKwugaCZnWOWrpAi\njxZ156yaoT18t25uh5z2z/LtOiHSQ792jt7nLdJyG7uMJrRB/iThKtH0r8ek\nlcJRuPsZpvsn5UA82LOhFNLO3FqOPdF51oWhHd98C31Dx0vYAtGFzrLiK0vG\nhbVNvjjz149qVz4/FtAgSzobEsiWCzA7mOtVF9FpNxFgMXDN/iPkP4jFsa84\nMlpdupqOtMWtXcu7D2br/UIrdISm6KKa4UmhPheRXwWDDhhZMf9Q1+T7j9xv\nWJ1wA51pjH/TmYpLGUx/rZ6HynvdGG0n8XxEXd8rBOu7oiPrMtrgYABy7WIG\nKoz/1HRodqOOO/T0BfBFQxFzmLhuxtDzovmq9XVxiZdrX82HDNR1IbKw4TIE\nYYdpNdypEpJul6ByeDJDUAtxE9uxcUx4O5ZmEAMNMiDaoHzN+dtS7CYnnrI5\n9intVyGRY2VkbQJ36uRGsnYtqKRC7krXcLtY8/JttpCc5G+oCBO8a/LhyjT4\nzSToSGUcaht6wumS0EdK3TrMsi/cZPNYznsHnRFJUhw3pNXkUvi9nCkgIeVV\nkC6iMapM4UikCMM2jlwOHYdFXukxBe78fy+F0D6CM7/kDIlycA8/iAprn00U\npnSX\r\n=n2EX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDo18Fj2uD++q2ChCCSEksAoZz7KL3z+fyBm9niXELznAIhAJYvMPIU8Ul8greYb3RtSVhKTz4cuRNH+AZmi3QFhQMu"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-a0b7d6a.0_1552331572073_0.22318115563207308"},"_hasShrinkwrap":false},"0.2.6-98ecf55.0":{"name":"graphql-toolkit","version":"0.2.6-98ecf55.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"98ecf5593c40d053d3ac7289a67dfdadd176f965","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-98ecf55.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-YUsXbZKRbWmeLTtDcVOLPhBiYENeg4dHipQexDwbkKY1ssSUzaWypIfBl4Ph5hyn3uQQAeOS4f3vZ5u4ZvW7Dg==","shasum":"9286d91ae561bdc4c3dff03b642e053682f42e33","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-98ecf55.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchrVKCRA9TVsSAnZWagAA01EP/17dXwpE5SxSEjH/Cjjr\nJVhkmpZdy9OwzvFsv/Dd3y1EQOWk8RVd2guyoDowAC1XR3vobHOOEuWqKluc\nI7i+jOfw0STPpDRg71IutOnRPqCcSBsx+SmUTL4KXkxx5NfCqYKHW15lIGNH\neTn0GuLFzjgx04q/nyoyTA0qIfOASD0t8z9mze5vihKSbiP8NzxHSO63SYvy\nH3a9827M/Oaqe2dQtfGLxq7hAakz5kx5QXjSwUP7hLTHtY39PAUaspP6jH3A\n6nLRmpSYc79dSiBXDnqRp5wIGuYq5zh3+v26JCq/YnnHhtTsZaDBcF4E4TPE\nAStsoPY1IAMhwb/FBhJtChKxTcSBTmKwrOLYL3JiGwhTz+Qesda5IG9Y3Qs9\nM6A3aW6tKw8cPWh8hj+QGwpcGinqpOi5IR8I+RzCV7OdL+7kvZz9yYaWemxN\nYouYkXT54DKO3hklWXZ4jdk78H7ZLnIvYfgsz+xgWdbTAmhXcvVKPRwrnPUf\nWLSbsEif2eqBqXCaKpdqFYk24y/ZbQF5UhqrCX4zEFe6DEHAslFxiVJBmQ93\nnTMvF7wKQqjAOJ1EkLpp/xIA2mE3TnEHygYXUv/0oiaenIECOHqks2YqsGrj\nPefXigLQCixG9H8GTrRtfJzhfTolGlQq4A0VwI1sPwvQyJCsnli43WGOgSKj\n0QLk\r\n=tbFZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJfw64VDl753xOwAHlp5VhFPbgALyTQ0SlEU3pWqGs2gIhAMQ4tPXpJpP+a6qg23NtUSwGYQGoEf4rwr1+VEkL4tpy"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-98ecf55.0_1552332106239_0.713736363501088"},"_hasShrinkwrap":false},"0.2.6-ccb181f.0":{"name":"graphql-toolkit","version":"0.2.6-ccb181f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.122","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ccb181f9d6395e85d868abe24a66dd16a072a516","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-ccb181f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-/H179UzZa3uctXtTatMQY8l8SvofW30DPcDSDY3Wkxge5/8KEgjSCbVKCSN3UpJ4952P5j849kDIE+kTN+zI4g==","shasum":"1abc591cdb9421e15a19cc2f9509310cad4664e6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-ccb181f.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchtHECRA9TVsSAnZWagAAn5YP/RiCr5PpicNe0P2KBPCz\ndiyyVQkgH4lGebOmKFDyYTXQjO1snH3aQK3ZCT7nMAS1Ay5UuVJ2bdiDWSRd\nwxrJkT9F6tVW++KZAjmKbdG80Ppk6nLybc41XsVOdP4l+RkwfMVpOr4VnTfW\nep4xV62ns2rkrheCtFkQtP4DbNqPHH7CApkyplssxesllTwHpz/Rua7W4Nc0\nswBhKgpfU9OdSsLQswHcx5ZGccpFioEz/jbd1BWnpNTVInUKEovM2Oy0YP0V\n4goB1rSgGqW1sr4tRBGEw6xWfuoYiU7O3x/l/cvlyR7AEdNJal7L4Jcb8P6M\n4PBUuCd02EJLYhlX0O/MNubk/mDKDsAFtGrgcW2Q9sAEawzT8TWUTRwf+hpd\n20qoLmH3vCRyVa9NZ8t4d20xA/hA+CS6ah9nuH5WaEZkTJoETSRGU759d/ti\nc7CVHwUXo/sLZcU5ND3Onl3UC4wocAqVlAdPa+ZarEmxqzfmRZtyy1qGwefM\nOpEN0vu2S9KqyqFOiZrUPDf+4eD4cP5Dc4YZ6FkNjcwG2rgi+AWZW08bt1/F\nH3Ni5rikAlmb7amugjreUe9FlgiPVQQX6Mk5Vz3zP/+63diEL8HCKxAYzOE2\nfRdXzapk6YzeF5/niol4suc6DGPewthMGuyRQuehybF/Axelm3Msihd16E01\ntEk2\r\n=LTPg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCY+sNuAMHxsKsotys88TvobYtrk/K03ehLB4whaaZDqQIhAOl1lOda8ATIyjJMujIF9XA/LwCnRKPg/VsFZNLdFKEv"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-ccb181f.0_1552339396175_0.5976135228668056"},"_hasShrinkwrap":false},"0.2.6-2f43b7c.0":{"name":"graphql-toolkit","version":"0.2.6-2f43b7c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2f43b7cf6ba975eda354d68d4a5cf3dabde27462","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-2f43b7c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-V49WDfNVwT03OZH438UOFMdWP+nzj7mwSG5tB5NHTTEUIKoKOjFRvktud3NbBpGlWXX86cvpeuE4R1FMOg0kRg==","shasum":"620b08f4f3412c988314c744aab1bd9efe4fa30c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-2f43b7c.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJchuPaCRA9TVsSAnZWagAAK/oP/ijxUXbg8M6hkIkvcXmE\nDxPPRX4BXjdakAAErKQLSYb6pKWaZ9FXJPAy8x1b/Pu652zdQfB6+0qHS4Km\n7EE7c9UYzI0ZyotQLb8WserN7Wf860mmJQkbT41WUjnf2Nl3X7aNcja8pySK\nCGWebf7/A+lLcrVi72xMOXUoAG+DyCZNQw4VmBFxW1USZi6Ir1jK/NFfcIjT\nwm3rorCvobvtj23DbFurciY9O8xBMpgrnoZPLZbM/fqyK9AWtugswibOtXDJ\nGtVte9eo71X6L0G3SEAuuCGBHvRRBor5imw/zNN4gq7ayEpsVX9FFX7RYG11\nsfl0+HTVL2iyjfZoGreRZZeO4xvwFj80GhakaG4BV18BjNV/d/8XzG0Nt5KG\niX/vUNFBABDxPS6856N8Znjp2L4Ix6yFLHWYqQ/+JmdsS1O0CFzIrLgmKpgs\nShm2vH9WV1Pgfi5wWd/PkjwMwk8f9dvLPd3Jxa6mY0IiBYVNXTHnGIVhX4Am\nZmME6JGvLc/jJJabl36Ckv7ihlxr6ldeQzL6ZA1pwUaj/86ailz/Kjfh+I7t\nKHjWrgmspszZ5ccsC7s7hVo7yI7uCDBOq2ULm2ySEB/92uf8dyBzsdGRaSXS\nru7CHDBbFzg/XrK4hJkLueEPkBCfjKS+4WKigK+9316Pw9MMQRBcKacRO5FM\nLhEa\r\n=Y/JG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDC3SpXLwW3wdaLbA4F7jAQ7xTTMgG3YsnrnVDHacOBCQIhANsg/xhQ+SaEZIf4AdPLBfeZEy2G3oUcB6N2Evi4Hz+k"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-2f43b7c.0_1552344025564_0.1872214632090683"},"_hasShrinkwrap":false},"0.2.6-11e5c25.0":{"name":"graphql-toolkit","version":"0.2.6-11e5c25.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"11e5c254b41745e55ee9ee1e5e5d8ce329bffb2c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-11e5c25.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-O3J/2O2cKVVUXAUKQUbzKoWWcPtO7W1NDQ5RbIG/gsaU1Tpv4+qVneeyURzaKD9oirFgoqfStgWft64nQFRSjQ==","shasum":"cf000f3388b72ecd832076042ac789b3e40fcfca","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-11e5c25.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch03zCRA9TVsSAnZWagAA5vIP/2G8/yjc+zXMhUa0ZNSe\nrtB1P6AfV5tV6Cz5uwnOlbVYEDFphOoT7PBXjdHYNIzJueTkRAsRt3IDUKEV\nSZkh+sWercD4U67Hxx0PGbmt2kXdbz+x+XSi8ze5bjmBRsfDIhtUbWLJZhS1\n+yPc2ovNYb9NKMn1BkQm29bEbx57dUIYpVULhU4uf2xbDfWI2fGEGTLr4mWL\nrytwCZMQm32Cdklt3BNAzSSkGdQwi58KC6jHStk4RMcIftxhGfR3q+Wjdr4j\ngqeEBOIkp6xeObKBu2cQn+O6sKZsYEYljtqnW0ibRMAkS2zork5f4NtXyw7i\ni+pWwJVFC7K6ilCd86H5c0vqOzVmoEIslwZHl+xFjPYMDinFwOkpXRNpePcf\nIrZX2883l1d6uM454JLaOY3j4voRRgPINdevV5brJFJBjjlxqLAVxqCQrtcJ\nOe/w1YfCN8avxa1jYLzaYUqtJufM1JhC05Q1fgZ+5unKL4oCJCXzre544v3v\ngzr1HTw55WwiAQPleOEXaxgbGv7lP2jrkT4vAD64xd9hXPt4xta0nNtadyQc\nOpdvz2al52PsYi8FiLzktx/JSpeKFKgfvmfJAFy4oAsfsL8w4R2jXaSB4P6r\nnZY+DKWQzQGk0AqV4VzUmu7oAjCkM9tcpQTzJo1x4u12GEd0tIBowGs1Mtw5\n71H7\r\n=1PD+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICSBnTMgLfPiWNrR780UsEvWFpGNPlIfUeTvz97oFmvAAiAtNcY3VYw7QL3s+NHeTh5S+Y2apYJqS+lMN3ASj5tGyA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-11e5c25.0_1552371186919_0.34041268079947895"},"_hasShrinkwrap":false},"0.2.6-668ca1d.0":{"name":"graphql-toolkit","version":"0.2.6-668ca1d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.4.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"668ca1db2a9b50aad17db232aab21d982a6bbd22","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-668ca1d.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-pl9dYuhrH2tcHfEu35IDli/CoA37BajPRJxXiXbt5nnEAB/7MGlMLLACi4RtNg69HXjYIkRUh7Q+CvESO8UiWQ==","shasum":"8f119681adcdc20b7ca915aad42b641fe324cfdb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-668ca1d.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch04ICRA9TVsSAnZWagAAlGwP/2LcpXjuu9heUnCcHjkL\nsLy6xdPdQOAF4v7+cYOPbSPUITnD7aofAtnMAPDX6VAW7OvNhmlRpJcETpHN\nrc/PEe5n5ZDBarM8GNkuLfJ1Zrlym3PvkTz1WCkhSgVGGUqnVpK7mvq66/eG\nne+ei2rCBEPg6Q2Lo9l+MKOtuoRUJhrab5WcK7Gvb01YPXMtHXZ8QxFx898B\nrppul9l3VKvxwxrRWLErLfcNCsYkeUYJW36w1BCbmM26z0jhlTPPFsmCWDWc\nw0aZYJnFxXksdwgVa3nPoR6hBiaHg9R8wbcf2wkUMMyw95rPVsmuJS8Ie4Oh\nNm4CmMSc2jqzhhS5kn+Ytl7TM7NUxwgxboYJoZhF7n4iZZEmRb4gZjqWw8+0\nwFHUl/vphDqcLIx5C4qXfzMw+VQeQ3E/7JaoEs9JWlKKI6VMjwDXLX8ukM/Q\nYZjqBBfOg3J3QtiVfJP12NO9+8Wbr36yVD6Ya6nREOtec0mOobkt6LjphbtP\ntfvjk8j25n21d9ob17AyfFIde6RkpHBR2Qjs/1M6lmXZ2AwufPYBbmfmXvEq\ny81iFP7x3M2qarcjlPATDdIuHUlMSiPptklEhVWPUvqQUiJ8+WNiEJ4CeUXa\nAENYTCTl8JNSPeSXxYGyvXrfpghsb+cJaKdy9EH43TpPFntqlZm4Dupf8xSW\nxZiN\r\n=DlNJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGUtFd1SO8LiPxeKwWWeoQT88mh5Afvpe3YCsrfFHwkwIhAIos4WDQvcftJMEKSiroBnGIoR+Iwm0NEAQr6YLf19vf"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-668ca1d.0_1552371208097_0.25190886020535186"},"_hasShrinkwrap":false},"0.2.6-64ea6a7.0":{"name":"graphql-toolkit","version":"0.2.6-64ea6a7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.3.1","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"64ea6a71b4df874f0e3087aa357022680a4c9214","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-64ea6a7.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.2","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Xd6Iv1BXwyxqqOVpgMHZFU+Cn1pp1mYgvE+RcRXC1mUNV6ysTLv3C7oiPtsTJsalm/Q/tWuxpFOH8xw5S2991g==","shasum":"e723b39923e9f36c6734af0122987951157fd23d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-64ea6a7.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch05SCRA9TVsSAnZWagAA98UP/Azc7nt1WX9Xt5YBiukr\nC9+34FxnjgwigoAZS3Vyc8xCqfBIX7tclbzHdN2KI4ZSM3O2LgEYld0PIFom\nctNrg7xW5kz+V+9gK777y4d3ilFJLMq8q4F8O4cbWwH3zM3d5luJbJQwSI8F\n9f/WzH7Mw0b04H73yM1HFIEyFP1LGMoXQc1ZNdJyFqWczqAxeZi3YjOvaucz\nYo9SyvaaBEmuN58jg+ZIuyHrMQ9N0ZJcVfH9pnf/X3hKmON3YTSKFrcStV34\n/GT6A9DptjZ5a0ltP1nLdvcAFr8ZmZjoFvf8k9W+mjkL8M0n+y2waqlNg2Mf\nthr4yntXljDZZJzOI7WrQvWzfTiSSJiugP2P/w7EcPlNMkFxAOccVTNPaS2y\np144p6G4msktNQoOPCmqVE5D7B1Mqtjrlqm1pjqFVEhNm/aBdO8JpUjTBs95\nTTTLVlyhdhsZpzIkiH+X413pNoyJ78iCz5NxHnf980ANNvu4Ocr626jNroC9\nkQFSBafmUjNi6O1GAastniymWOW0vuiq6I+ntfq2iJZOpC5UxVacsZM3G6dc\n6w8dyHRziK6I/pYNgm2OVVI5VTusScBE2EekU0AsxwAVJ50ClPiFgUttIkHE\nsa2txzc63qJa0H3nVPkOcAGWsfgzd0Es1joUPlAncaD2yiEfxQPNZDX6Yqkm\nHRJO\r\n=MSs6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw8/IAMChvtLbcEK4JbnpRUenw+FEYVwdF7crnafgD7wIhANepu8rK65BYYAIfk6sDhRGpbqjjk9uopxfR4r3DBeQV"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-64ea6a7.0_1552371281537_0.6105799082126155"},"_hasShrinkwrap":false},"0.2.5":{"name":"graphql-toolkit","version":"0.2.5","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.4.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"9554d1c23fb2105edc64ba046de19021cab5f9ac","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.5","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-CSmIx4nxXDc+XX4y4U6SuIj5abxo9ge66YAveWelo8h6kpGTlxsYiyS7L0r3KxJE7irbGHbJbbzZzjx3C9a2Qw==","shasum":"b824095ed84c97c33e89a8c7ebef2242f89dd1f2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.5.tgz","fileCount":290,"unpackedSize":299805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch2lpCRA9TVsSAnZWagAATXQP/0yhq8/zZtvReZhoA3Yt\nvdjxIQO/D48JylInCTuKjuSofnHzmMXkIg7WQgD+xHcrZMC8tQZbUUSzYr4h\nE0gqpUzh5Z0cSQ6Moj5pSPq+2MCuFZCqwvupoh5hIBrsonQs4k92J4C1aNkb\nGftCSIh6sqGqTn+sjkiLv1BXvbNb+S1QPwnrBKCBr6eyfO+y4KESzyeAu4NS\n6FAjMdvz6majaNaOvs5kH4hjH5KkE5apEJyQuncqc4DD5l9INLz/j+fR89UD\npkwTIu2RbNz1vFLOdWSi6Zq6NdVE3OVEO8BNZCnduJJMDn/BbYCEyR22rkAr\nyG3QY0GLgVStXJdKgCkb7q2oaUA9/pFx0MAOTcDMXine4tTwpAxrdWLXPXl6\niQiEesb+IMZ7VGIr5x7V6C4ZrLfdVwm9qh78gpDjP+pX1NDr8d4iqFEdD9nD\n1HWtxssn4NZA1smdJU8ax1yFfBMfLfQXxwXw9SA4dfZgmd+IkU/20KwiLXwT\nitLYkXFo03B7cPi2tPH5WUnE05emt5bdHBnAZ/LoVqnFSb7zoE/tfy05SEXx\nS7OlmL9fzKnrTWurZDLQm+ltzNrj3Op0GUMlMnssDtsn+IhDvcoD6/Kc8qgo\nJhuaBAnugLxCmG9JK399nqEiVAIPLjwk/ZPp6bi64uTXJ2Q/It2VVM1QezPQ\nmybl\r\n=taIo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFGlNOmqZcOkh7QOl4BuYQ+ydsZVKWnaeHj5SdHpIGWhAiAjY43+1c2jlekbGlp2hxOW586QQyWfVTpB6fnk5YBAsg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.5_1552378216315_0.1881516750445864"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.6-7c7d46c.0":{"name":"graphql-toolkit","version":"0.2.6-7c7d46c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7c7d46c87ee7cd7e611c123f53b207857497d8eb","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-7c7d46c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-H7YDPhMlSq3ZMhqpKhxUq2ZGcu/NY8qGH6GYebbPm1XuoqT4OAjeCyrv0jBCTcDaNGJw2StnzYbep6PdCN3CkQ==","shasum":"bf586be378e29b5ab9fd853df0c835682739541b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-7c7d46c.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch+TxCRA9TVsSAnZWagAA2IcP/3JuF75BgTGBAwECbKOJ\nmCoooIZluVmNAADSHhci5XN+Uck5A5470NEZ3V22tlO2FGsF2TYyHzTC/q+l\nZwU0nS4KXYj0nVy7Yvyhp8uaydxYIMaMYwRveKwNT9QAwhL2lCzGsoTpGazS\n8WZ2tdQdIptiyQDE9yUzz+PWRyzZCZst4kFalVseJ+BhhLBkcdBvgzNXecGF\nKAt8F2J8htj+tWQNJ9P3Be1dzRlVANAZkeuvqkkRtJCUurg+NZIbqY3wBg7E\nfsXV9gV0Is+3tIqBGAz853mcv5tyoItUKnPHzKuK1MkiXHsV1MU/OAAFON+e\nu6105ij2wQj2YFvUIWV+3ZPGsgCWHnX4nqaS8xbXjZmHL3qNpB9d641s8KH7\nVas79vAFvtkZxd1NajfUy1CO1JvjT6tfDj4cjFMzFpdEtNE+uPcgI8VGRAoe\n11SnK0uppPwBGefrZN9LR94fmEqeSN+tr1aFwalEfKmMvWKX6z+/g0G0KjzU\nP1u8JTeW06zuA3le2fl8ymqMacBKwqjWe2lsHAO4oGOLYVBfB2lj0k/gaN72\nRysEb0DURWSKhm3iSSZioFcK22J2q4T3Yjlhfodyg6/85FN8G4lUbO+sqGb2\ndTaWyN4xln/R6qzFWk35xlDKGOmqMPYnbUz9UyZ4HRxZKcb3qi/OAQ6F4is5\nsFFA\r\n=lU88\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHTXW3Y1cojY8guY+EMH2/VNOBiBlAM0a0glHhwXncF7AiEAr83QIKhSLEUOCd/GfhXAEWWjNMK+MeDeysGBoRCtPaQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-7c7d46c.0_1552409841034_0.45268898622070486"},"_hasShrinkwrap":false},"0.2.6-31d64a9.0":{"name":"graphql-toolkit","version":"0.2.6-31d64a9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.0","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.4.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"31d64a93f22201c10d544d44b3b3f2b546975242","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-31d64a9.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-6zwCiYsZZ1vCXTiri9l1NXIxvMk3W5DFoMnWPySHgV0ot5Jt3iHTt7toxEonBDfxPlVCwzVodSVzBM86MpbeDg==","shasum":"6d2a0cad3c3495fe9e9be3169d033d92ad53774c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-31d64a9.0.tgz","fileCount":251,"unpackedSize":252628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch/sxCRA9TVsSAnZWagAAhP8QAJ6mgoCXsZvlwx0W7aJr\nkIzCn8Ic1/UeV46GbDhyyYqeTg0KuwTLT1CK5q6dOPPV1YpQGVycSkafafoH\ndwVV6JZtpdBMLIFLuBrO8sOZOrrRHqtND12RycVWEqjXc7jbpGw5wSKGPd3R\nRbvy8c5cCQ8rc7sqXWV7DPP40R/U6V6ulPRrRIs664KqKRP0vjmDBnJRNI8t\nnViPLJ8+7JBSk71BySufKWHVqp9byKQfuTKMo5ZMtWiStHq9aomiKpNMKOvB\n8y63R06ThCXAzmYOU8AkyWF+cKnCt5dr/oZ3tD/wUk2wUiiAFQTSJB8k0Lbp\nKsJYb16iB8RE6FMmjpntTuuUSgCZY3CLqHnZRmWU0emO0O1E5fdZh0aKLBc3\nsYR7saRzf6tblyoTFprA493qQPXIWRPldEwGngTzpV7Khnidmo9kwvauFJco\naJJT3QfOrcy3GhW6Rb0TKxjrOjIFSPwZxL86UgrBlHKJp11zBt/IbltBRp+m\n1Jevm1LHIRegIPezawhRcY5Jx2/bDnn33nQElpwz49SAkgkf4hBVtOkSr7yk\na02iU6I9VMmfGgKGlT8qU0aVQupYfd+h5Tvd3Ep1UVuyP2B7p/d61F7wJPRf\nYXyqb1kGyMyOsQWCJIYg+lcLBiCgcZh0BhoT5Eef2hlLHp0fYfDs8fMXULyZ\nfQa4\r\n=KjRW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCH7OkgAwG1gOKu/T627dosn7E7+kthZWFPD2G7niS7YAIhAN9WjLPsF6FU71sPcSZv42kHPfyNaanD1SZ7zO5XDR6Y"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-31d64a9.0_1552415536996_0.5848794615890427"},"_hasShrinkwrap":false},"0.0.6-6b2276f.0":{"name":"graphql-toolkit","version":"0.0.6-6b2276f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"cjs/index.js","module":"dist/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.1","@types/lodash":"4.14.121","@types/node":"10.12.26","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.1.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3"},"dependencies":{"deepmerge":"3.2.0","esm":"^3.2.16","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.5.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6b2276f68675a0b96c8a09fe8c9722be878891f5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.0.6-6b2276f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Sjf1HAadPFPQBbzj8fMObEr3Irvg2KNlCR8WQhqw0kFDp98VXESwH26lsJVHalx0g/XWBmzZiANQ/58C0GcYMA==","shasum":"ea6a12c897dc9becc0657cfda0f6fc4bf4482e87","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.0.6-6b2276f.0.tgz","fileCount":125,"unpackedSize":123370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciBqcCRA9TVsSAnZWagAAlRIP/iNCxaSGXV0/R7gZNSHp\nalkgXulOHfw04kPeTOHUuzYUytLAVudprbN/MwkKMAnVw+CLz6uEfGnVlPLd\nNW7GLhFerkzh3zl8hCnE3PMrjIi7UyFrZpfrPKaaqWi+PghSXj25pfqUP+rh\nIoj12V+P2+wL0umvmFkMRGOCPdoAOKaLLUSzJH5txu2rjnEpF2Hjmnr9XAlc\n4RFE/0p0dInDuA9G+8LDcRNIpahLHTJ94xeUA4AezUPKCQ11UEzmvkxaH2Ny\noNOt111kCSiDXdKngtMRbTIifQ7ymDCpTmuUnytTCBx+2OhR+r24+Nk+cuax\nA6BvINTZFIePnKeH9qDXi87JmHuj4fAyMLxYg0EV0W+aSD5sbCrE3ec/89aX\nMetGjL8HTCwwYcg5nJKKDWucTCaH5DUOe6w1oG+h7EEaOyHGERf7w0w4kV/1\nqEdZ0Q16IFU7OCcvgx8fiHdBjgjvn37ueqA2sY6YT6o04xpnGJDdi/cXrLsy\nFBtdNhnalQfdqp+9s5W9czdrB0NLKGK1sYCeStwOHrv2qjAqVorPB6acGKBq\ncbMSDtHWczp5czuoJ1FITYkbKPUS4oNebgG75qpl5trKNMvmaM3LP4BJ0KeE\njR86zuzIXKjuepBy3sbczVWieceOyL+OUBI4eFvIOzVXmz7i6eNS+xxPV6aK\ncxCE\r\n=TsK4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcVEp2EghPCJSdH3ru8EqD0OvuXR4JEgXdJEX5APCdJAiEAkSuhV+Rowe2R9oXMJhtuYyG85qsdpIxQ6OOzjJY2+x4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.0.6-6b2276f.0_1552423580259_0.9357449973853418"},"_hasShrinkwrap":false},"0.2.6-d5a7a31.0":{"name":"graphql-toolkit","version":"0.2.6-d5a7a31.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.4.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d5a7a31b53786d4e6e88a0362b86a92f6411cbcb","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-d5a7a31.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-qsVizqfWkSe3Jq74iY9B16ObQksi47GDurRSsgfFgD8zfwu4FEt7MZpmjOaYGD3c8fq45Ntu5ZQxn6rHs96ECw==","shasum":"528560300b341768b191568f223eef38b4c32b92","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-d5a7a31.0.tgz","fileCount":251,"unpackedSize":252628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciEUACRA9TVsSAnZWagAAc30P/R+qzfN99aCxPLs0fWCu\nd4+DyH29zpdXcu2M6YJb6siuRAIVPjAD8mg8bA2yJ9xPH7aVJSAjnD0ZvdU+\n+tJ/cKfKxUStM3RTd0boazuz3ynCdR0kuCDvMfKH6tMl75Puxxvcpuinbw36\nc45Kxju5EdzUFaK2w7eOsWtIoII+tpDQGQ89gqS+pXJxi32zzEVTuyQJt3oX\nrqwekWIK7mwsgzWTBQuoYNv7d+p6FtyUP7x4r1bZ8hOWAkJv8W3LnKN8li1b\nZ5cohrjVtswXK4DjTQTgDRtaA6qIJh40PDH7oaduhkqJVcWXIziLdrZaca8P\nmLU1wZyW2FQeWP2ekp6Ii77F2mn/N/qbg6mhUHqayVGCnOmk0C9q3M431PYb\nR7xXNS+SlL6GRSzi7ltFBDNAAZh3/C6Ippa7WOTaoWKKpWMRoVcSPb+Mx67x\nW9T4ockfAD7/9w/If3NCh/PaU/ZZ+BY32xwyMxRDeM8jD6Esa54s/vDeg2Ne\nfOGoTSahj+AF09RB3N1PwG5EX+2YCCCjN1ZgPNHlVAl/dtlWunNvEhN33CeG\nvBOdok8jYhOjOgUBqMyS2L/QjYx0f+ueZlRbzGXsTnKLnSnZL0/9XNA8vhGA\nM+tR/If59HTyq4fgvMFHw10+xZQWf+1C0ckXiY13o9OZeCsZOUonffX7PlDI\nOfUR\r\n=K540\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwjJCTntGdW8e4tH33z0PeiuKC4IcOkPb7zBM0l5coKQIgO89m96sH57s7w462jEeqVGzTYCOMs7l+nbvoTlFA62M="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-d5a7a31.0_1552434431767_0.5313624475054317"},"_hasShrinkwrap":false},"0.2.6-962a0e9.0":{"name":"graphql-toolkit","version":"0.2.6-962a0e9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"962a0e9318853068828d861065289f6724e9895f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-962a0e9.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-VKCBlRPrtKTB96u565FjYV60zJVY7WlgC3k2bTSeqTiqUigj8EEHv+MJAZClFQgwMXxldd5qAAs/xMHo9KvE5g==","shasum":"8952fcae66c177e193319c215dc1c52bae17c4b6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-962a0e9.0.tgz","fileCount":251,"unpackedSize":252628,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciLC0CRA9TVsSAnZWagAAnH4QAImr30bPZzQBWVmHPlNA\n0/wveK6VqEgeEhF2zgl7kBy/+KwetDr0Zx8guXCJV2aVbf2E3r+KsGNCtWeI\nNWh2JelbKLCqrpL1jhn8LqXTH0kE0ZmQk6OwXH6ymIUy6AGiDu6Xs/QZX2EB\noH9Nlkrf+EH/HlukwmPP3KdpU0X1ZL6hAYvRuJHRMzRXrAsYX6IMuwMnXlZ7\nficE1dj/KMwb1Awq6agGL6HNuxKR2TB79h03RSbPWwDnUUxThoQn6akzb5lO\n+Hq7G9eHD0n7ioR8raTT2U/GF/Ef7O8xE14zyTddTBXUlTTG/lr8Id1Do+/W\nry/h10zFhDbCU5lWY+UvOE0CAkYBDws99zPI1nmrQ+y0b0UgOekgcOyC6D+y\nJo3eit6gbvtQvpBUs04iL7B4UtNMCmOsee/OKvUrMVun7LY/oN3tTeYkYN5e\nkpNi5Rw4dUWH4gy24C4CTiOffzVEMh6mDqOE2P+LLecQXWuXkpv7Cf97RriD\nKqwkdn+jWFwgeMWFDciKeS9BULv1ze5q/u2hYuYjG7IYpxtEnDvixTutLOMI\nbtarycwUnEqvLZ4VaB12PSIDPVbCVrIgQG6XoWJHkkqrd0z1kgvYDPChHjTe\n7SfqALmujl1gSostFK6FZ5I0qZq7OpNj3zS4e9i9GxBwDy1gCvv48qpJNWoj\n8AMR\r\n=2SOE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiKp3t0UqtCJEy9GrfoY4PPWfuD4On91fpRRbpwKT6mgIgf5DC6sub0McnVKCGrFN7Tcrrh3ogUG8s7HjNzoPY4DE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-962a0e9.0_1552462003992_0.5764165256037879"},"_hasShrinkwrap":false},"0.2.6-0507b94.0":{"name":"graphql-toolkit","version":"0.2.6-0507b94.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"build":"tsc && tsc -p tsconfig.es2015.json","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/index.js","module":"dist/es2015/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0507b94eefbfee0c5183040cb2d0749b84b07cfa","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-0507b94.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Ec9imI3fx+Hv+oaFO/bto8jmkiyImjBpqB1UrJSv/Trz+3JAUyYrishuoIa579TMPcHjOLUu4xwAuMOYO3ETnA==","shasum":"3e730d5da0ae473c02249e01b7e596fdcd080816","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-0507b94.0.tgz","fileCount":251,"unpackedSize":252629,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciLC7CRA9TVsSAnZWagAAoWEP/3kmpbEJTOkpQt0sU/kw\nadTPYxYadQmEstj4I3D8Q/5XlyBIUGsttAy7Y8i7iM7lU7jU0UGxOX1Zv8oY\n58sAAbi3HwWo3USaZ6W24i0A5krmEB4JqtGM0s1E8tAUyqT/4FeBUOiam4T2\n8bB9vKSYztAssmiwecPwQ27w7jsFPCDeNx8NUBxZiTaIO8YjLf/Q5Vp0rVQ7\nY2tHsZXMH/eVg8ZEohVSmhT21OXkF6uiWVqKfPBjO3l9uD+0GQSnCxhGK3tB\nihCq8DYzXgjWInmIzAaK3puEnxIhOoqaxSBnQnsf8z4Ui/uio4ZhWtdqeD/H\ntrSOl61AOvlhKCq5ziuoKCtzxnzk4RVmaE6Rne2ucjAeQIJaCepmbchtnova\n56ejV8j5VEfYFz5/sBFlNwmLvgcTnCxDCnPWQdEnJ+ieMed4um4Auk3j/9I/\n1hf3BML61kKvz0FIW3IsXXoX7FYGLwjrJJVbDyJFcqSQrKIm6j4zZuHlCMO8\neVNOnsov7jFSS5UkFL5+zEoV76XIOaKRW7F//Pg701EYMbp56jx5U37v5Pns\nfjnxfb7Uy5Gm33+zI0fvKHDTqBRcz74HH9C9+X5g7szMeTBzux3DHMzKsen7\nSx5V54zUSOrWF2mmxQB/DH+ewhTElnxjbz19rQDncDTcu7ZDuwNK6XdWEJaJ\niohO\r\n=xuRt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBMIq8zMb7o1nSHJsoqILWvg67Xt0K5Uz1flGbeI7BgTAiEAhFOKoozGE3Asm0UPQR7VQm0FrylgeZ4+QQTKUmNxgGI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-0507b94.0_1552462010254_0.43007376771029726"},"_hasShrinkwrap":false},"0.2.6-cb6e569.0":{"name":"graphql-toolkit","version":"0.2.6-cb6e569.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"cjs/index.js","module":"dist/index.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.4.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","esm":"^3.2.16","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"cb6e56963f9542ef339f038b8a1d9b03a4ec0e52","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-cb6e569.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-KwfQGQk47uvJje8gDi2x66V8HvuqaLsz66NIwwe83erIKzlPoGc77JaryRqwXqdxyHufTTAitM//gYzwPag/9w==","shasum":"da9eb769441d65fc58b45825ddc8050825a4af47","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-cb6e569.0.tgz","fileCount":128,"unpackedSize":128989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciXN9CRA9TVsSAnZWagAAj5UP/3GsvHEfslSyhLA5VS/8\nSa8C1ejgyDSHpR8ePi4hxnco3D+AxLyjnKyyftXA+jKnwJgc704lHJ4KSDCY\n0eZ9/IpzPiudP2wsxJxfuxbRA03vdmrQd0aQWC+vYiVkeNQ+gfY8Jkx8CHd9\ng6ZDL3ikHb2gt6xww2yQSUf8GMMR9dXUAbHfQcL+sv50ieao7LphpPGcZ2OD\nrwvfh6cEuzXXx1sdgwXtK4+Tm19snfiWP1Nimijva4wq3JYL+04iDIFU30Dn\now/OPrZy54DDxt7m5jySgffxm8xATZzDdxk0r6oagJc0WGqlDMy5daIoJn92\n39aKjGHLjKNR9o9FxLZLLp4+v5sgvmk2NQ+k52pvfXY1+oQZwBtsudmfTdxe\nZFI2G7W22f6IcrKfjoHAGmFUWsKkLINq+l7R06tyXfMuvC0stop1sHRRCmfJ\ndEeoulJZWOXBJOX6he120x+eldyZrEVo1SCe++gh4PBnDMgRnk7b8fgRHANu\n2TUzkar0tBXxJEvoVOZwOUCDW+7fmvFCmDjydvzzg9ynKXwQ/IVIg1yjp5w7\nyQtij6QXp3X9onVlRUL7Y3vZvZMFvmWxbdzYXXYwF3fsgJHnG0MBtos0E/Lp\nqDIVLGlGGaMn1s4dESDM4EkWv3htbQY8TN7hYwjAcBnA+6gZWKDcfHBbWgl1\nDLf+\r\n=VXGY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAVBhvuHftbAT8aDQ5cSj21tmkU1sYjWIxKVi3o34H+jAiEA8Qw9YY+GUxQKQJ6IDZpt0YEd0MbAwMYjD+Tj8nzuXUg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-cb6e569.0_1552511869136_0.9776109680972467"},"_hasShrinkwrap":false},"0.2.6-243fc55.0":{"name":"graphql-toolkit","version":"0.2.6-243fc55.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.4.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"243fc55946debbc1ad1e831a62a8853fc0878ac4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-243fc55.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-g1n1aOguxgURE8m/Y0oM/amkK1lT1gn7m1uR4ctk/MCK3731zO+BLN1MoMVs7I5p40Z5MwEh9TLwT2FTNumlsw==","shasum":"16592892947790f2a08150778a8a1792acfc88d5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-243fc55.0.tgz","fileCount":250,"unpackedSize":253889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciXh2CRA9TVsSAnZWagAAvBUP/1BtssMHlqwpf/hCgVl+\nnT1tKrPfophQYp6CjXZwQDIkk19DmPp3l7yPPEzcS+3/IQp5ZaTlxvi9PcxA\ni694J25+/ShwIdw8sGcUA50Sp2S22EOFc3Rq5ta6I8BAHH4yDV0FWTV6MWt3\nucSgEylVjS/U4JPNPepKoHqg7Mgu0799CFmB5mUE8PcGZ6K7nsVOAqrBRIpU\nGLeaIu43rYpGO1N7Bdrym0AiaelXRUSLf3QB+82bwgk4rQYW1y9hksm9+hsY\n+eFr/WURJ1vtjIRJw+UZp7QxfW/eYE/vWOm8DNZUfOUDM6nQvYdrubC1TMB+\nXvL8ykUDRZ4Evl9dgEewAn8OBHrxH38n5uxMy//zFh1SGkTi4tFfAJSHZC0A\nyn42T1ZaOa9CwALB7MXzTNkdO8EO2og6/B6P9HZKDsYZVYGS28t3zWAs4n89\nN0qiUBw6vFxdTKZ2oxap0M+xKoKGya+fBJx9wqgOM7F8/axk/v4DOWK8JHUV\nV7SFDFxolUd5cK5DpQwe2Ca6324BvjkzVaAvvnVTEcQkTm/S8Xyl6ltCZmw/\nyb86MKIeHKoGVJty44VEe8rxR+mooGKKuinAfD1VAO7rVMSNPVy74E36YDJc\neS9smWDRez03EclGsX9KY+/sERDmjAi8hJHa/sS0OU2Z0kVfJTErAWMff2HF\nELls\r\n=uE8B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPxpa0JU0hTKLaP36MafV7WxTdwW56Lu43hmqbq9YX2AIhAJPPAFV0Au3LFlxlJSEEYxwJARAyTMqBq9Dh3QNFlzZf"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-243fc55.0_1552513141306_0.35617535487864127"},"_hasShrinkwrap":false},"0.2.6-907be90.0":{"name":"graphql-toolkit","version":"0.2.6-907be90.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.12.30","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.4.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"907be9082324a9c78d3ff6b2435fced388b18a87","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-907be90.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3JaUBo8swAmSIGETmWuMXv5s4LW4yper3is48/38glqLXz/00WQp6ZMIcosXuW6PSsOqkVXiDnn1PoxZSoTY7g==","shasum":"0d73ff128aa4b7c8b513dd093589138af3b2fbd9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-907be90.0.tgz","fileCount":250,"unpackedSize":253840,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJciX2nCRA9TVsSAnZWagAAGGkP/1Aek3eGvgJu+f1Nu7r+\nTdVOtidmWyGN9dBu641t4INA26Va0uJXDEIrt6WiYk6VZNYzHiEej4ssyLth\nHIsHFFFkBEqfyUUv9/6e+RIDBHGHAWyoX1H/94JvB+qfeBnlziECtAohb6Gx\ntsAe7r01EH4ulHG2r7j14GFHQ376eyLhSuyVq5oDczhwSSeG8M7J6CG/anPr\nXa2AJkRfNTI7k5Oo2XHd+IPHSUh6RFKXrpQiN4JZ5R5+X7fSC8Hrb0s5Njpy\ngV9dC9RcgBRlk4KbEOtHAaBsXPWXgcp0Vpjx3vWmwfTE4VUmnWsv1ivg8zMq\npxECejVLOxenAAqVLaotv+vz0oflEmIZB/V245XfzlEeY7iGFVt3s0fgMGI4\nT4ZWNRKKheEugkA/P2miFvpSy3+NrWRxAbi2FXuYkBdaBJuOri4SsDp+vfn1\nnuvNRF+XOKXD+D83YO4yDWEJvsApfonh6oSrCF+nQDIgxWjgA7CjRzctYOzE\n77wGJTH7WQOvlusIEdRkaqmHdsUS16oqU/Kg+fGKlkxm0bZ035KzGlh3BL/5\nlB/OuPvZMoH+5j3uWwyzZ79vX4Hkno+HGRnDrR+EMxclUPPMsK+jp1+nuvvQ\nC7lhnFuMuhmqxB1jeKx+jXLL6cqOv+/Bt+h7uPGtvJh+2azPAs+ZzHsbp3ba\nAWkY\r\n=aFyh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3UMiRJBmekRcIVRCLT3QmJueZBRaAwAuDxQC49oTSKgIhAN1YIndM/jNGtSFWW8VGO66wvUJKuow790FNnC0lm23J"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-907be90.0_1552514470905_0.4706067442085351"},"_hasShrinkwrap":false},"0.2.6-a04e252.0":{"name":"graphql-toolkit","version":"0.2.6-a04e252.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a04e2521528bc27c12dd44bda36890fd0e4c350f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-a04e252.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-+lTKLz4flR3Uqwu217wSuc71csXL+3SrOK3PgrtJgIfKpWyOvvA71OBEudfPZoj0ZAiMZWg8mfvoW5LcMbeCOQ==","shasum":"a0581f7ee8443a8ab67f6cc593eebc719b1bb8dc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-a04e252.0.tgz","fileCount":250,"unpackedSize":253839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcifp0CRA9TVsSAnZWagAAB2sP/1Af85c2QOljZaq+bh+Y\nn4h9ol6yr5tLHNG8IRbkC/1q15kugMnbf/SAls8/WvdPlJXctRFHgjX0PxbH\n0P1uXQ7qFd3fORhlZCBUog5zOMiIu49F/7aWWR4F3aw/jFgcKllzGcBFccrE\nB32SocLC/1qdUXGpV+oaz0F2dvoOvXvaav/8DH/KQZWz/ceg5aL7PJ+CQnJi\nZ7eVflAjYbWyYIkD1E07HNJcIiq9RJ/k2QrL9w77j5vIvg66myc45vCqp67g\n1Io3Pxl+oVDwnQZij6lHRrEe7g9Qd3TdMyLa/57cgmUX5OUCV0pfsU84IJ/F\n6+0SzSZjGEKxwdTmAeLEAcxu6vIs5B60f1qfPdfeHORjLccVTZ2LWIm5/Ipt\nqPBx6neRPWnHEBaMASg8R6ZG3M52QnLO6hzsaOKZtubBx3irMC3VWUAXz9VU\nCyk5ZacphO7gfRXa2uAnxBUcLF6h6DKW4UkGz3FlTv92ULUxcOBWkCLBxn2Y\nrCyYcg+yy7IabuuuBNHXGBuebt/VIm/Grz/Y/5oK2scG0WrnHkkxw/txyack\nW6ViUHHf/QdHpgaXpp8LLSEV5hWg47y7G0n5mW4K7Pb0GN50MnuafL8WYU4P\nm3GRAQnxAgrP9Lkr7jbBRGdyNumKjjSdIPuXXqE4eN/4B9b+7wAoPbQH2Sed\nsinO\r\n=jB0c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEk2sUfj6Sim5Wr3gTKUnRRxlb7A7hUEWDwmIZrK+OfAiEA5a0GItb8mcXdhM9sgBxZwtE/q84Ms8fl2KEwoeI+JxM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-a04e252.0_1552546419626_0.30171640191109605"},"_hasShrinkwrap":false},"0.2.6-2f38d4d.0":{"name":"graphql-toolkit","version":"0.2.6-2f38d4d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2f38d4decfa5c9871161e116048ae863516445c6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-2f38d4d.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-H27JP5An/tx7r4o0+dVjUE8AjDln73kT0dBiQJygJ86+W29ZcVA9QEo2Rnbs98lIjlqk9s97IFI3P+2HCSjcbA==","shasum":"499462be330ed4892265031d59bca079b5b2d111","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-2f38d4d.0.tgz","fileCount":250,"unpackedSize":253863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcilPhCRA9TVsSAnZWagAAyhUP/AksvFQcvmONL6FIXUcT\nfHUzK3joqAtvAWMjfCUpSFZ4fMpYRg4cPZEOo+mYhnyu2rbo0QitgbBnlMbc\n9zJSPomc8Jl9F51CKCHov2AMPqTF20ZglJdbpvwV2mY0/IVeEnb5N2ewOlii\nfpRcPiYgGjadWh7REK9ie5vbAWqbVcPBz6+vkF2o0DEjM7TN/LM4fMpegqPj\nQMH+GzMCB1XRkiapld4aitdWjOqrQl5+Nuwed9CAw9LQEtNSymKCUhsf2y3T\nB/aIEjDctbh/psBI+W23voLFz45FpwbjV8k5YkWdSzjj3vWt1qTo/7d9MJNY\nS5wdm7y6VN1HuZEVOFx29bYnBw2vLOSUaJQPmHGZhmrhvSvR9JFCoyCWr7Tw\nA/cgk43sKU3H1YP93biYZePDbkMZlYLa8Kb3fh4VOnU32Z31W3QqFgSuwmd1\nE4oEwZM+kYupBtPtDE8XXzRxK6bN+xU/cBB82j3eLesEhXDPRKQE2pytcW87\nNf4LYHtkN8y82xGdsFShn/+xF6LT4FcnObxXbDAn/7GcCOLKtliZf7k0fYh/\nWs44n/F0Frv/9lWNgFlpUyXgRWJ3iavwy0uyxNaPORPgYlkOxBGNnEAbPqNn\nWAmckAny45vpH5D+uMthYS//zOhdklwzsZvB5K0PO6vZ5Q3FkYAWOjE13au+\ns5Gy\r\n=KI1v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID1RBUtnkPw/7vaO1OgRx/BnkLqaW7DqumczCLdMECHoAiEAm9AD4lYBrtGsihBzXcKwTAVtk+qGJs7QWJlC4Ux6V/o="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-2f38d4d.0_1552569312491_0.293608002591903"},"_hasShrinkwrap":false},"0.2.6-5d6b943.0":{"name":"graphql-toolkit","version":"0.2.6-5d6b943.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5d6b9437d4de6a67fa310c40bfddf13f7c9659c3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6-5d6b943.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-giz1/WYr25ENvpeNIzEoIv8Kp3hO8EU8xvMQDB8VZTbD6YlMfCKuWvf1iDEWOrziqjjAq0GcC2QLkNTGV9Eotw==","shasum":"66f8d93cf4c28479b7b795ea5d2850ea92e9d7ea","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6-5d6b943.0.tgz","fileCount":250,"unpackedSize":253863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcilopCRA9TVsSAnZWagAAAN8QAJBlwypVe/SIyHAJ2GWO\n10vLSqSJA4yE1+gSFMHr++N1tTdcjarI1kHH8QNKlgf4EZ/bwx6vUuDwtRgA\nVEHJf4MZah6ur85bkeBZx79jQmjHOTxnktv22pzXcwOca0/+VqBgnSFekYdh\n2zjtkqZX2GjNbTGqlpWAoECGlJAhe2XxuqpNLqOU+PYbwaxe/nZQLpuy6RuE\ntxuP9yat6GhuDVwLO78+1uLP3jVaJUgnZ9aCISIRiIp3i5EPpWnENnqamh18\nboGqebIG4mSrgxKJirc7UUB2kpRr5Ff8cgDieMskjgQvBSqCytu2eOi/k7jv\nBPmaZ29XEoISB15QiWxysix8+me7iCjNiD0QYKbhe7X7uZcAiB7l4OWH9GJv\nIJJ0WHFS2+jAPPbdqMA6+L3tRIVdtFC53bI9VMc2cdLV1CDjT5RNHQLyAjGz\nk72nFdnFmLgNLGKV53hfGarr5Ymo9MksI3Q9S3G9l90HTOFiidz6zMQbxXOG\nJi9hN9RZ0L9tcVVIiHBeaJ4gL5dhpkA3Dswf+bg/ysq2vXSIzx1YD5xXYWKZ\nQQduT9nM4MhsmCvljtKrPYLphEMvMnp14/jZdwRvSq372kzG9oQ0Ksl8rlSE\n7wTg21EDNBLx0RKU6aQYan/7TsBFk3qxp+T5a64E570rXcW++uPaQbpA7zo7\nCnzB\r\n=8JiK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWjWqRrD0znm/k1jOmKceaJEmLkoJnjvqwDnEXg9b0lAIhAMrBUqfe6UNQFkEf+yvdsIkQZDEOfjO20jf5C12Hza+D"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6-5d6b943.0_1552570920455_0.1424871254456621"},"_hasShrinkwrap":false},"0.2.6":{"name":"graphql-toolkit","version":"0.2.6","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"c6a6541a4f858eae5e5bcb01cfee8cd3fbd9eb10","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.6","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"dist":{"integrity":"sha512-VqvsKHYxKW3/qoJIaO17JH6AfClHcPvZRMN2rG/y6fsTKCyCCS7P1+7aKu6RPUwFkW+reqxxrXjEGOG2bkCcMQ==","shasum":"539f82450c85d81ecb81b5c825d0c7271b458ece","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.6.tgz","fileCount":250,"unpackedSize":253854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcimKXCRA9TVsSAnZWagAApj4P/3jRhtp6c1TwsqAIVbIo\nOhmZqwfA+27OSF3oHxpShmFWIOpnBVpgleXTn348pEUjB+P335tnyHFdkqD3\ny9bEGf1gLa5F/hNJgnpXBM/ELOpzgfT4OFxypfCsbrvesn+acsXXOe0ExwxP\nOlDhpptLUqQR8SA4LfLGObKmWqdD21sx0KVpp45YvYoqy8k+j8idFqr4+vvz\nu7EGxFSYS04Fn7u2DtTt6tBOjpetgcQCoeXo/hPv8yy/qVIOyJkdXe+3b7i+\n+G4JlWZSFdeSZmT8VW4S6IEEjka4r075cgNvr+sB9jbztG/9s6e6Iw35nYrF\nGtAqAaBntQfJGokQ6/7lpOXGdko3W0ZR5eEwTqZWDOv7woxIfa7/FoWOJAKS\nTeHITJyZywAstlCOaJUa8a7XCyWdckJBN0bVj5NCmis1Ql+t/Aso2U1PQHtB\n9WhPDHn6TiVISr9fKKEpd4ulOvUdqSGi4XIwuChU01CqjnYPRVLdtZrnXHH/\nWz6xlw4aDA+kY/9t4Nv+iUbTP9UwjcvCwlKQig3KI10V69HWsPkIIp3hMYBd\nJoNsZJAeIgyktyV7SKark4KEVppT5QWEfGYHArqhSzQLmjifhfvL5J5oMDaQ\nAnI76d/dUMUnFjftl+zjzDR4V4d77y6V1osxYBxFC+D82hr8SPizxRqLdB8T\nDlU0\r\n=98Zd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAEqvIU1YYDuq1cUYYf9IXb916VI40E5lwUxWW2eVJbRAiEAkR7cCA38RmcDzMWtZljSGzZ8rNh/IBtfoPlcA02wW/4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.6_1552573078604_0.24960088421813365"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.7-8e7836d.0":{"name":"graphql-toolkit","version":"0.2.7-8e7836d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8e7836d65c57dc74f61278f6bb3c9af74a67c786","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-8e7836d.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-v9VQT7Q2r2sbTGT3rb5bwh7uEPfwGAuFgK2rmEaeNKUBp5bCzmEqv5WNmZK+pDOHKw/gkrKgiL6IrQ3+k3i7Yg==","shasum":"a63a8b633236d463cf54d8857675047870d05f6d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-8e7836d.0.tgz","fileCount":250,"unpackedSize":253863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcimLcCRA9TVsSAnZWagAA7E8P/ijtTxN4/3wMTBRMzGNe\nSIX1oGwrsobyqECu7enYFWhtisn2HA8cRhfU3d5YkDHqLix6B0tQUTKcAkVT\nUZijGMlesv+vhNXtBY+FU8B2ekWiYU7usg3NR09NBhJwsznPnwEcC8aLs4Ts\naS6eSMbcZNO9v39AxHNTpuRoGLHVzdZ0bI14GZ99P1e52n87kSEf1RBUZNCq\nfl/DgrGg0iMis+lCIurjHfd4r+FmdowyovSJ9rjyNJ43NFvaQnL82VlX2LyN\nbOvj31Lv3ofltmJiFj+/H50coZNUj2s6vB6BQ9Tm9DuFrUdrkdWAqC6nijmn\nx5VRyIhFcFGMX8k3W3Ubm+k9pFOSgQh8N5r9oVpnyMwSi7e/J33CAi3vRgOL\nRdrTBU3LTawu90v6VQTwzi0o7BXC53lgNGm3c5lxaMYNDDZUDAKA0jAhXCSh\nokinBP/KlqZYGHPSn/3LA/AbOlRm8rZphTKOmgKrUQAeLfKSGUbli5mof95r\n8GjSX0Tx6xw+rio0ofxZDH6hX/JEg/SS2rzzZwe4im+VwJcXyDz03Zsb1C9n\nXOhoEFGeMlFlgIWNl60zPLEJ3MTqaR8INb1p2uel85eVDbRB77GOEL54ot9y\nNH+g7Q7GSLO8Hrosb4uWTi93Cu0Ui6w7fWJHWkypY4Rnn6BySuEE0n0UUpNL\nIo5D\r\n=3Ks9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpzHKcsevZU98tokOIJ1CWdpLXo29ctkl64sHwjLnIDAIhANEFWoT5ZyxfDaHSm4rC++shhHPDJU36KRCngfa3ReAQ"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-8e7836d.0_1552573147861_0.2205113357228814"},"_hasShrinkwrap":false},"0.2.7-f9a8280.0":{"name":"graphql-toolkit","version":"0.2.7-f9a8280.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f9a8280c36b959ab8c075f2b24ad39c9e9acd0c5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-f9a8280.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-be/WZD844ITbYkdhTmD3DWi647av87bC4J4SRH+nG6rSTX1K0xROd4QHIl7c2Ka995fJ89UvRZEPE/9Babcx5Q==","shasum":"33e4ee245036e5159e066246c12fe1d0fbddfdc2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-f9a8280.0.tgz","fileCount":250,"unpackedSize":253201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjOPKCRA9TVsSAnZWagAAymIP/icw0lkxde8hyeZBU3k4\nlXe+EjPG4/yzlGJweCRTHYaj6bfiyjH/jD4HQymlMzPhgODNdckCx0/xpoCY\nVLwiA/Dat2ltJQ6kIfYLBTzPUIDEwogHyETHA0i5feTELEENVQRROXasYZGc\nRO0649q01fmTDmcNBsjWWoyTSIyuN4LT8ygrpFDLjzZgZuIvLEV2uY68+dPm\ncI9jlqFAVoDgerGllC5Mh5g+eja4d0d5WgwfQJdg9is07R427P9+nnS7vchu\nUPBgQG3+qe3GrNnYB6A7azRdjbTD4HU2deD8dK8K+DHxwSrYqj3SOXbabrJD\nlUq2fLTv159aP4VK8/tUvr3CDrk/FOsHYJye41oRyNh67WueP2eeV9+d2n6p\n1lVnR3gzYOV7TcAMbPkwBx7IwL+BVWFmUeZUrLpPzyi/rDgUnyers0Qt0qld\npdGtAtrW98touNteFa/T/4sSEx5xvGAlQHlOq8/plke+DEhuuz6/KZ63rmi7\nE44Sa95LKrX8GMzdlPM+ER5yzdwz6yofJLMXoJ/HUzTzpn8EG6cWp+aXBwTD\nBDBMdm//QFnDWDHFBl/NI2mU0en0+tBVjNzCeQswYVXJDHV+IZS0YCva7ZgO\nfokUyI4X4WF4CzH0rNo1QlKwkS3JBi1xTdSD33HB1096BtvqU8YsSzOzdE+4\na2k2\r\n=BEr+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLeJiEMLslvXQq3x7kqqejJDU+7dexLHk9DZ06aWbJSAIgFYJKOTWZoMEg/2lrdViUWVjnAg66YUCXJzd6ice/xj0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-f9a8280.0_1552737225381_0.434655713444448"},"_hasShrinkwrap":false},"0.2.7-2b32362.0":{"name":"graphql-toolkit","version":"0.2.7-2b32362.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2b3236217050d6dabdcb2995f997a680bc33357c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-2b32362.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-1aJ7bAhnwlg68vYhVfVp0xkkcZWC1je/iiBBxjrKyQMLspUwn3a5namf/OGIgk9mvisFVQdQvuzkR1LOHVdNQw==","shasum":"6530e2e73fbaaaba9d03828bf5eb31179ee4ef82","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-2b32362.0.tgz","fileCount":250,"unpackedSize":253201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjPLgCRA9TVsSAnZWagAAXgAP/3SBdWCtYlSi2/rNxe/k\nTDGY7IsxyS9RbPd/6tx0OmQFQcjvAnlYOtx38kkGKDtZ6UWfwEDSbqmDz/HK\nq81Nfzyce1vfXCDPv2cgK1iiflGXPNR7G6T13vg7PjKfmEgM9H/hPOYbbGvn\njAcikGLDWo/utT5jbLBClp46HqPnj4yJBeZBsLu4bzb24hXkKRFDwEj8s9xu\n4B1YzNc3QLJj2ctRDptpBWxN/3yVfS/zfKNjx3rFQERH0f5w1Qr7iL8q3vK2\nha3Xd5CNo1HlThJeFAGCYJtFCwLiDdUOcJmKV8x5X4Yi1OA4WnU67PFniZk7\nQBWnav/usVldWXYptweNCIif6Iyh5auEsOudCBn7x6IcDhOgN0ebN947cl2u\noieJXmEXSeHDxv3PvgITmxXYF6oYZo4c8njJTMyAt5qZsmK/T7UQkxPaUpiE\n3YEBTNQ7WsZTawuKaH50ciVMVf1r5fxwagBZEqoRNjD02AxYA7anAvEOn9r8\naVypIOhrBUHockc+bZ34yKHbKMfCerKu44OzbQhmJmtV2afI8th/cyY8k/mk\ndYWRCAHEMACGbvkO+ClwHteWNMOPY1gJQRZnAM93bUk5X2ssvS8owDFLcBmN\nkA+OcWAZ2Kbh7QBQu/RviUeYyC0RX5qx2F1E6nyFYGKJZaslj1LCww39mJlJ\nkWVm\r\n=vg6x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEWR2EO0wT5BdMFWdhXeMpf9q3jDo5Bcc/VkmVOvybR/AiEA0KNInOdJe/8cvBDUnoaIzsNG1s+rYshZ+cLD9szB0vc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-2b32362.0_1552741087338_0.8774475421483039"},"_hasShrinkwrap":false},"0.2.7-683152e.0":{"name":"graphql-toolkit","version":"0.2.7-683152e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tools":"4.0.4"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","graphql-tools":"4.0.4","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"683152e589b09de5cba1b24a16aa5add039f1f1f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-683152e.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3IfAeF8QrjBbDKTIBSXI7qqeKCNiaQcejFNSo1hgpIkR+5tsxnyoTMzVLBRFyql58JKTK2+sswbYBEIwTEhE7Q==","shasum":"4e2a54be315ba9c1e64118d43214f97acc64b25e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-683152e.0.tgz","fileCount":250,"unpackedSize":256773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckIdVCRA9TVsSAnZWagAAgssP/25lIN3abqAgoKU5OSaq\njlzqEoLCEYbuwOHQTmkLRnhu69cd1tC3cdPpeBPnN9CJzaQmOaNivkSvt+hW\nMp3fs8MEYynNuUTGOtW6b0g9z/Wm0S1HXrpuog2aehvYTv2u1NWCRgA1bcwz\nL3oJLg8zmwDdPFDPgf9EXelMDTSPlNiakCtp7x0wlqep4XqroHhe/6e+/4gY\nSkwaC1PKmhVz/99GKCNkj/JtAi/j8uzk42rbtQk2TBJDR8hcXUx0gjwmVLCM\nfx7I0kMFbIJmcy9RpKgDOaRO9vcmM5dqoqdWs16okppEWGVLdtiZvRNWy8/h\nhJBW+1qRn3XZGTzY8Rga7WEAA9eC3eCYCX6mGI0LoYdL9fACirZSEwt/BFHB\nh9/ZfeedUUFpeRCl+Hg1eS5A1hAPXetIvB96PpJBLfjPQohxN02QbTgXGQB+\nU7h+RaOYzHjssJQXt9mjVAORyYG6rDbdykQMNhZuXmMdKANGGvcgqa5STuyR\nsVyhEBhiMQtxO9AVLon7WK2xxuyqcOjHr094+8upVUc8gvV7qI8OEKAKSsUv\nJqeV/ujRexD+V8Fhy9UzEs+9dTFIgFcC9ZgOpj1LIlRZ3N86D9qZGr7erGuD\n+H60IUL4pubCYWtPCYFEo5Ws2vII/k4MMI0SRKBw7gxMv25KZs4Z3QrHdy4K\nhUro\r\n=Iycm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCx5u3ixOdevxmwbqmN7CNyIBhiC61aeyFfSeSxgJ6CUwIgOEwFzpZmVVhgSkLSWgy/BBfyzqkRKkM8cQWrQZzDUMs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-683152e.0_1552975700798_0.9360860992458209"},"_hasShrinkwrap":false},"0.2.7-d6e8002.0":{"name":"graphql-toolkit","version":"0.2.7-d6e8002.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d6e800270ed781720d638353047af8c7a6b4f7a6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-d6e8002.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-cZm1VpwgyhkzLufv5tCsSEeCdAiol5EVgfGb7zs7PQhOuLWMhFu+gDWWQRKTAQgijwkHvNeuZoInZw9XTEvztg==","shasum":"7968a3249933c1992f8fbb7b60b9b7dabb33410a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-d6e8002.0.tgz","fileCount":250,"unpackedSize":256743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckIfeCRA9TVsSAnZWagAABwMP/2GPHk2movMlCOj5z1Ln\n/wnNyEMiiC0GRFlLVEEygcHmAJdkHI14jVmxylq7ePhekl0KbQX+fZ1XQddS\nk+wIwMajn40UvXFqi2h0r9FKPjHfvJtk7kUh4pTlHoknX1icYVmTSTwbpq18\nQgVuleaVNrItMiqVa/HiAST0VHUCdGPKNxaeTlV0V02ZFqvqbLGX/PQsNQ3d\nsJr0hqptNebipGkggWUVkVud4Sa2940ZC0SUnbB3HORk9uTVxI8YRADFVo1y\nVU2Q7wOcQU1BadKZuX9yUxteuw5pLgVYZwN2Sg0aR1NhW723Np5LTUtAbm87\ni8+YbQknFuON1MflzeeS7tPXf19R3db6J2OHVO0c8bbJ2AFXV71Y8eSs0pvF\npsnvWlid4ogO1TUsiZC8aEOmMWs4kqSGW8SW0PUAz9egcSVsMcBWiU/RWBlK\nvEhfoiv+8bJtMcIwyrIrw8ghZCsdkJZrR0CewbtiY71K6+peA2183Cw0f3EC\n8DUzOeyDrXOooxN7hb3ctfI+GSXtKbr/Kr22NXSKErGslWhpQIBcBqx7I6qM\nkygVJpBpHEsXCTdoDw1xZoyhHudEpjawTY6CGA3mY/7HTA4AKlTvShLpzFaG\nv8ja+9Khs12g05zQyeGBa0NifZ8ttc8F18MZgLR2arM2ijxCnoxqm9zIKPCQ\n+YFl\r\n=EbtH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyPsx6+hcZj0PlttPo2GnxVKK5iQAyAm+SGcjRJuosYQIhANSgYxOwRSqYkIz8Qa6/3IhmNWTnRRg5J1z5ns7IedCk"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-d6e8002.0_1552975837883_0.018792382290191867"},"_hasShrinkwrap":false},"0.2.7-c720d55.0":{"name":"graphql-toolkit","version":"0.2.7-c720d55.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c720d55a6e9d84dd8b0a3fa859462f646a008866","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-c720d55.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-bE1aZfmcFfH72fgZ1k8oZXBT6btB8NyZKeYU8KaR9LBLHdEC+8XaosivmBZtpoHOzltWycNuSJifYLLUlpog2g==","shasum":"69719bcaad79502775f0519ba93df451c0137e93","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-c720d55.0.tgz","fileCount":250,"unpackedSize":256899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckIkUCRA9TVsSAnZWagAACvIP/joD7+WrlImnLnBO3SKh\ncLZx/7GT2OxI7m8Dy8xybSsXotIHZceZeldCctG5mStSIgAIbBj78mpJUw8J\nIPTYr+8tusoK1osgX+gX9/YEMsZiaLnjBAxCMnn3bviAViByV46W2a1mK48N\nUhbYJJtuvtN49jNui4q/earr8h2C42oCcx7u6MY8QDzJlpzcOzKEq+VgodIW\nagL4gnEIFFuGJ5JJJabpCuACVtw0EWd1UE61L4l4gpfd3/UzKL2YpQ5mIsti\nDJjOxTDk+IRDMN/wL/RpOg5JxNYOxQn9iShzYMDwAXC/lM8rbB63yEuHVy2N\ncC2cgsmdC8rmyMt0Q86mv9MrLyHSfEX7gJq7WMBw+vWHHZ2SsG1gHIvTRo3M\nts8rmoWG1vFLT4LmcqSaGG+WC8h7jXz3Ux0qYCRih7fN4NlZ0YHAGdgyMKpy\nL9BA/fdbTXVcQmFhgbE3kMzpqBO4GcO+EU30zAVTqNzXdrz5g5/T9UVkvyVK\nfqtpbUzweeCshBiI8SO51NEQd6iHfbQUPpBaNTadmMTCbpQb/aG9FVgPw4XS\n86Eqs+OBA88QXIrEFxOwvrLG3J5LNxqqbO94Miqzbzexa6IFqr/H7j8jEety\nddrfDNMf3wYRxDOYgLHZdZGOm64vrpDu/hiJVc9QeSw4Py58fmE6IwvAGIUZ\n+rVl\r\n=s/Uq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6rB877ZM47vzoPphQ/gGKG5urSNnYcGMR4Sd9WKdGQAiB0NW7f2OMxyd7FJb1vdgi8zyJ2O5L+FdktIBbLhygwyg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-c720d55.0_1552976147376_0.24053476485612135"},"_hasShrinkwrap":false},"0.2.7-a781bbf.0":{"name":"graphql-toolkit","version":"0.2.7-a781bbf.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a781bbff3773478d651f168d92c66e82be8cc8c6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-a781bbf.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-MNxSsVMhpCa6JNDNnBLcp8/GvuCepMuIcponXKyYtwAEASnnu5uLx5qaQdhGMBHGXTBifz+k99MdKv9zs6TEJQ==","shasum":"40ec0c368cdd367fe1fe0c3cf5f71e7f96e89086","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-a781bbf.0.tgz","fileCount":250,"unpackedSize":256877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckIp6CRA9TVsSAnZWagAAmUQQAI9M7qPgfr5uUJg4yEZh\n1mVo3OFh42ouMBWHo/+/PZ2dmV/7O0108V64kW4paXrLRpOitHK+QZ5hkRfS\n350ODB8Q0zglkE3ijPsONw7V69dn7kdCJL4I/ecUOmsTKiPsty8I/voCwBy9\nmxlxdbgSpB5/XJEpz6fYDZfOjEbVg204YwU4EU9TjP6pfz11H80XHXMVmc0R\nqsBDPuPpW7yPE8AonChvwJQHTGHJ49paaGXjKZiXkud1Qc4xkZcy6YjFN1UY\nf8vU1rNipJMyW84SZNyPzqvKu181Lz9ZLsoD/q+CRwjUeiZ7K65IAtrfhvu/\nmHKPlMbxCHlPnKE/5P34ItgZrdtdSAsEfBi37lcFACq1yHZzl7OuLy6TQYgC\njhuAixAF1Gd13g/PucKrxWU4/IPr+QdVEZHcwbuLiCvoRy20gwAqZyGZ7gIQ\nWQi+JbliAAJjtz+pfTHGMQaE1ZrArjAztHIp49D5ZF2aSFhXbm5CtZej+g8Q\nftiiX8P2wf4z7RqCamIBPZFO0D5oOTiZk8bhq9MowDETyXoKGUlaZH3ENWVM\n9X7UHC/QoeXIzCrfSH2L09V++O2Ezk+BTX/q3cZ/0CtEH2VXLQJG6gaaCmVy\nNTNHA0HzN+ZtdXa6qE/me+38kf00mTZq3qA5DA/0rwpC0CaOY6g2G8OpPKZe\nVsjI\r\n=LaDu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqV+MNV1k4sSRCnBC7MP0xK1IicFkqwbMZL6lgpm1BowIgS4VLezh7LxPUCloMSToPPr1qh6D29B+hzB5WhH+mMzg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-a781bbf.0_1552976505713_0.8313986753010181"},"_hasShrinkwrap":false},"0.2.7-ac2dfc1.0":{"name":"graphql-toolkit","version":"0.2.7-ac2dfc1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ac2dfc17ba3ae85cc9cefa63cfc913193db3d61d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-ac2dfc1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-EAMDXvGU22OpkHtNc3PplwM2YOYiTccp4ADqVdYRjdx2jFKtjnT1+KKfvesKOG7xIeWDMVqbo4HIkjKT/PDYfQ==","shasum":"e8565236b4a1dc2e8b1a404260da78a5c26d10dc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-ac2dfc1.0.tgz","fileCount":250,"unpackedSize":256877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckTzDCRA9TVsSAnZWagAAjlkQAKTNjX/CxqTQEqEOcXUK\nNj8M0x91CpOCiMSf5M1xejcu52qNZF8Uw3bvXTIXLRwAeUzMCpxDOXmoEnV8\nho4Yc5LA2wOc+lxsnjLidcM6G40nzbQ5m7NW1gsf6HZfHrcQ7vC6m92Lum+L\nhep7ynUIodeEy5w/tMkNrp3+FIGSE/fBxr0yEy8q+Fjii5yNCwgPyzjFTzjt\n6sJFytCahGZsy4NF2nZaWCUsUz8E/NUtaD2kDZvdy6GhrOFzKuAGQAHLLLev\nYLbXzFk15oWQbsB+RROth2nQ3SXKVe4ouvzXCcgWzbFe+4oDMBwjZxaPAQy1\nKpjSR7QkmYkVuFb2MECTwegDYD9x3XmU/Lm4PXnFHSU9AfrNhq42lqm+RJso\ndlX3JPmr/BdijWFDPaqxVSV+R6D+9+vxseKQjRUAjZKNMVXV/8qK17U89evJ\nvxnzDlHjuYoMcENym/ryvpOl3y0pp3RlmdZvsTzwXP1Cpq3876S+Uokxz1t5\nEnf1R9oHiMprYwsvN9FBwBhvomEZxQjOa0/hkmkampXelZ0/OE0F473qrxB0\neca4S0BbC83V8ECIO+ymmKDGqc9bx1AMiPBVbwC0Ym+lMUxRrcP5ECAplva+\n/9kkOofJsXQTLDWm/tXpaPd7v0PY/otPbs5RH44HxNk3DtjSep/YeBaL0z6T\n8YNF\r\n=9z2B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBM02G/uiT+CAWbznsQYwdN7cJzZnqMzUeRWGjZ53cTxAiBqN8P1EhGjQA+e+VH3hgQ2Pz08M5t93oZj/3ebZUiLNQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-ac2dfc1.0_1553022146436_0.18466441566708225"},"_hasShrinkwrap":false},"0.2.7-79eaf67.0":{"name":"graphql-toolkit","version":"0.2.7-79eaf67.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"79eaf67ed3accbce932f745e345c06fc47f8c19e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-79eaf67.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-fWNGtry3AnyKei5aBpuOO5v16HwXqg9ahfgmsX2IkD/Uw+y7vt3JjHXeZ6e0d8KRwYni9QYjInMuiLMqY05e+g==","shasum":"b167056bfe33a939d3e1318d283944bea12179f9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-79eaf67.0.tgz","fileCount":250,"unpackedSize":255335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckT8lCRA9TVsSAnZWagAAzskQAIPD7efq+j+r9pF0I8m2\n6WDZj3rOzp9+dNHwudYUC5rvKqeCVmZvJo5Kl+jbvFZ+VSwfGdHsmY9cdFvk\nHYwq8UadLXrUHv57UZnuId/bpvDmFqXrWBfUg+9s/FOcdu90JlJdJXWqdXYw\nifu1e8AozdhG13doW34aLxH2DQt+9q4Lv4FwrwioYFEMIEH7S1Nztiuze3L+\nmmZtsi8io93Subsud99ezJK2UWPlcDoegiMtX7Sb4LQpf4FxaMaatm3IoelM\nqKbpfksraOXiq8tbplBEBhJUMWbkaVThamrVDUjSIjk9oBOQgchCnKG9kYMR\nbsJ70ylxVmQzK+be5EAE8DjTEXJHxb0Q6LOe4CeUYfENZeTNGH0mFgWv+BTd\n9FktaJ/YT5xdz6R6c95R9nkN/4EILW2mywJWwbWxj5pV2DVAWq2PE0yFF9SM\ndusKW2wY/hnNvSONVtVljik/VsVVPlW8MDs1y6/jVG7uLwPgHHG+pid0gw/I\n7z77qiJsZJxdNvcxhL1pFPyrUistL7D4rd7y+K5IRAlWnckYoUIhZn6BEO1S\nwYH+ufKM/FiE15e7p1jyNX+PNTN5xLQ0C1AXAZlrZf6TD+jyMYlw/BZHyQU7\nQdZER/dHH8oImzdf9p3HISmqcUr1z4DBZJP1QFfMIVtoP7GsXbTYtV6TI9yC\nDmXw\r\n=JJYn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGihJtZcw4GyFvsAQr+K9pUikwli1VmNQ9X5jlCkTJe5AiBQwmQYF6RLvWQxlm6Fs/A3hNKw5jL0yXWAHmL/ywRjNg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-79eaf67.0_1553022756857_0.7542038163916382"},"_hasShrinkwrap":false},"0.2.7-fc5f4c0.0":{"name":"graphql-toolkit","version":"0.2.7-fc5f4c0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fc5f4c0e349a59f38b19fc689b64a9d990571e15","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-fc5f4c0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-9O6SPnoIFUZYXCCoMaPTjWf11/7S9ipzdmTTZtbkVYBxo2Yt+FSGc5ZSrEMNwe4js3WRuuntSRNUUhBj5WGDBQ==","shasum":"9fd4e1cf45af46746c2f2af095e37fc3f2a2d924","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-fc5f4c0.0.tgz","fileCount":250,"unpackedSize":255335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckYSpCRA9TVsSAnZWagAAyhEP/22Q+TfJMRbfEgJLLCE8\nazRrnT1RXKiErLyVPzkD8vWHviuXzJnVRK8eplosqgG2trlhdaXZPFLop0XQ\nTnz320HAvvKiP7es2ueqWWqH4O6SLiO8cH9xSLFz5suC/4zm3hvKodwpNTu3\n5rvL0ogIl7NMJisu0GP37WPDnM+H53fHBz451OfltwvduTYBYJIZdX75Qk1L\n7UTQhwqjG29bXtxxvft1TySW5xp4/uFoTgazJE7eSWBK21VfUEc5ZMR5YZh+\nzo9W95HVuOzjVEmyg8gj26sCPXWACbBF2XYcMpzgSS9GKBHKBASkW2GPY6Yr\nTV0pWuatcToc5CBxr6voqcsooLrtkXFnAK+3YZsp3qCow6JQ7LkQHGKOxEzo\nKR3hSGZDmfyPeqz2phGffWxMYTY0JJZZOfxTuvAaxiT3/M2+M5iAP/XtvUtT\nizyzHe5HhYxdOraXr/pAoecitrYebwfOguLYBjT0gI59SlHgN5oLBLiz+ClP\nRdvtTxO9YQ6AGQJOSETkllRtnAFJ+gcqYglmrN6mXy85q/ftwQ2J+AwN3xLw\n29/7Hh1FBThYOj1FxKQJDSJKugrCx51h1u4nTa4tGZddMCmRfcnvKZfg6fw0\nNRMQQRf+pFsLpI+g7EZU8gJmqP0roF+m6xkdXwFSfGY+I6qUfgFKh2AOMM8i\n0azg\r\n=qChe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPjN4K0BGblYJ/99PhEmOe8iDMHzETcrr5rLDDUl7H2wIgBArtYmd0Ioy6mkZwhvFWnN//5RCwktP4wKUjCJWLzvE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-fc5f4c0.0_1553040552355_0.07331923325144918"},"_hasShrinkwrap":false},"0.2.7-8431ebe.0":{"name":"graphql-toolkit","version":"0.2.7-8431ebe.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.3333"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8431ebe4cda9053cb9a7e15f4f87acee7f5f417e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-8431ebe.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ALGvI6j7/pcoRrHmgKCrRX9jb1xR3O2AAognRWcU14HuMll9IQwnytl3Qnlx+P/xpV4ZJsJMdTTvUkICVxUclA==","shasum":"fc769f66398439236991957f435e0d9c4d82e06f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-8431ebe.0.tgz","fileCount":250,"unpackedSize":258887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckfb+CRA9TVsSAnZWagAAIcEP/AtbrejBJcTnNhxOy2Ou\nLv8ajw9nl2K1WuVomrCQXjyELdGWid6LJ/x7UcZrIRF+tkgfnRU3FOiW/TgH\npfFWSF4IotNXvdvMpPdppay3opI56QSC36BbA4daauovz4nORjzK6UsvOWlv\nRTWXVNoGP8Lw+yX5IFP8kuLLV2/A1WIFmtjq/oK+7Ppcg8lEpHhIXzq53A51\nPVKRGmBtAWT39TX80GHKW1DYeAVCVf9+Eo6NzmvTJyq2UxD2U/pQ17+MHnBk\nToUvXNogogv61SlahpE4LD7E3AGTZvkltsU1wsAQ0VfIVcHeNzPsc0JGxJ45\ndera1Xc5BjMTd4YWL5Lo09TsXvGS3S9Dbk2R3TWxH2/3VABx8hwicHOPUCDm\nuhgW4l7JbvZouFYKduPnDQCq+z8A2wx53a/pZ/Zturj7tGRtdyVFm55J1hKy\nYp9JQqmopeALZkWL3f+DsePmRAfVtWzGScrybrbhjBl0Jc9NnPAU9eOKhLvI\n1EczPkM2CxdhXATuNwPHaOAmA4bLVXR1tZ0MRYZroZgmQiouZWm9S5xgDWMf\nHpFsviYqOHbptC2VDKqT5cuMOezjcq+0elk49SCIyn2UJlLIosKNdxLPUWIZ\nIYlT1KDWO1txtbxIooP6fYF+aiYt9pN2/8RrofIdvnHjpqi5ZADqQicIpSyJ\nL+BI\r\n=8lhh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFv9cJUn81IXIOqDZJkktYcwuZVoPknhSI5+GSz6F2DTAiBv60vpdRqd2a+wNcXnKHIyUYsLpE48aDCtjKcHkO0OUw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-8431ebe.0_1553069822036_0.4257397542388077"},"_hasShrinkwrap":false},"0.2.7-6b3fdad.0":{"name":"graphql-toolkit","version":"0.2.7-6b3fdad.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6b3fdadf5da9e39715f0d97c0e156dc73073b0ca","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-6b3fdad.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-qEbqpjTfuRtWhj2Cl3EF5oXli7LK8PeWvYrHWB1Ezn8PFCTzzbdnTqOu/J3Qm+4fqV4lvKko9vRdwjMndKrItA==","shasum":"f3d24aa87be04ad70a7c72b5f7f5344fb275a073","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-6b3fdad.0.tgz","fileCount":250,"unpackedSize":255335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckfcUCRA9TVsSAnZWagAAgkkP/jauvWgRkiA0xcRH9aEl\ne/6r3XIz4umbkj62Erikrzn3vdcWNv+l0FrlMKl8viq5OD30cNCp8eY3cDX7\ns8L4HVx/4MibXVzZ8Q/vUwfGYOIAzQ2v9bqjVEzhSaWzhhiJemZL16QEqWvx\n0LFDFx3UOvrRmCQaySlXFGOBzFe2ol481LKuDda5A9vN6B+/ipIiSpHyqpc9\nA2+CTIs/+gXW9gsCLTHv/Cu1sMkddqJSZpaDtqo9MdpeCAOrzB5GEfl1ykSr\nByafIrYpdI3MxMnV8nYQI87JZPaN4NyJobu6HpP4X0CxIzcBBOFKZ2XZkvoC\n/Pl2eRmLjNW8UiII47FouqP0j/Isj8bzAstq/oRvTB6lCiY0snZEcwZFGdAw\nM9mMm07okwwwy/BGvBzX5pcJo2WYYmkS6WCRAlZZ762dgrlfN72SMi1oslM7\nn7TwNsL/dP6yO2JDRs117fUd6bnlseEI+AtHndVP6Set854kDhiFHOt1DTMT\nUDwpp9VU26IM6i1lUgzWBE8g7s/tCZ24K4EZAocr2HmaX0WDI0hFyy/3tm9N\nzUOUB45IztOJIpmxVW2ZiL4FbVoD4zEokaVFTK5tvtAyfh/KoNcTMlV/XO3G\nAM0z8wBAXOkYnve2oNGDEuki7A748IB9AvlpSspVLGrm8SRnf5ObsNqjsdy+\nlzrW\r\n=iqjb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE972xFc6+H2JJPgHBylQkKl6TBS6i7oHSQJuJAQWRq2AiEAxbot1RPuwVWqu/mh593J0+LoThTZ9K1Q2ggIrsau0Pg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-6b3fdad.0_1553069843630_0.2494870569103429"},"_hasShrinkwrap":false},"0.2.7-81e6959.0":{"name":"graphql-toolkit","version":"0.2.7-81e6959.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"81e6959db86d7637908ff862e16983dc15f785e4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7-81e6959.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-jJ6QfAXFgXOFrq1tp33Wvz1AfaJPdb2LV0Qii+uw3qThstKfIpr+whT4LmxiKjoNTrGKhe/NqKsWd5g99G8wQQ==","shasum":"3c14d4efb602d39d67ef08bf44d0d152dae0691c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7-81e6959.0.tgz","fileCount":250,"unpackedSize":258887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckfy5CRA9TVsSAnZWagAA+iUP/0FlzKvI8WKsIkkgW6TR\n3zaecG4eYxzHrxS5rZln4IthI4Lj1L/bl1WCfuyiPsmfHBcHmJ5zqOnKnfm4\nu7j2iZdxaeNNat+HZqo59zCegUSZMh+e+0m72TCc4LBwTVzAgvHUj1P0fwh3\nMYN/55fFE1lMjNvEfgiuzh2sQu4ndwnCiBYgwG96l2zZdrdAeCIx2CCyJX27\nRSEB8iIzgs+WL26OWcCjKJy5ewA1JuyB8aZ95j6LMVddC/fXMC2/ic/YiBMP\nOUzUYwPcYCuh1dLPkEkM4xavUAgoZl4tj8zSETZEKYzyWl0Q6b23iwAVpEzj\ne4+V9uNCfY+3hKoYlsjTBpUVUnk/v7GhR4Ggl8UPgLLpwOusTZYE+AywKriz\nxCberhhD2OG2bwopJQhTSyV3pKBFNWMYZpeKIyAyEyxi3NihdcGVTX68QfYx\nY/tiNIM4D6OnDqhVElz42ngzZuOwyoKCsEKzvVEPXKYnnb+D2cJMMQDL5cKR\nzNH/FjzJcj+nLJGYMtwrH+xM7xk9Qp8xhP2ezCVV27nwmDOgqw1/TUToqAIt\nFzURvyFV1sI8VcvgTZA667xfbJksiQguR1iQRMKAdOqVLvs2GICy6AmjM4Qk\ntyjMxwpKvuSzIXimqzVOh1S/U8rs9YOz/Yq4jPxxlrsGdOFsdb9nwvrLKcAG\nfxZn\r\n=jsc+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID/Y7LbBSrRiaAdEClOba30ZUFR8JulfWQ0Jp+xjOwdqAiA4LpFg5TglvSOoYdnV4XoraEFD6HDKVqTjQaOCY0SG5A=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7-81e6959.0_1553071289228_0.9746870524906499"},"_hasShrinkwrap":false},"0.2.7":{"name":"graphql-toolkit","version":"0.2.7","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"81e6959db86d7637908ff862e16983dc15f785e4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.7","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"dist":{"integrity":"sha512-76C74agj4wtiAMIgxENdcgt86rSSDoSkZuvY6pZWCvHvuoI1n4R410QKO6muzA5lVZKZuF9gOBfVjhVHL002EQ==","shasum":"fbbeee537b0ed48c9c4be4e98b08c6cdb5fd5310","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.7.tgz","fileCount":266,"unpackedSize":266364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckf1OCRA9TVsSAnZWagAAhJMP/34sGOpTomRexuWptLB5\nnZBBvpLkBa1oRvN0Qo5l6NIl7uIm4WeTAs2djHJSym9qlH0VKrTIrjF4BYb+\nvR62g9p8BQoRGbr+zK4cDy1XIhJ7V609hilWWxKrqWDRDTIpsSxRyIID9Qj2\nQyRk5wNOg1uC6OaoP6Do+Z57rB2uK9DZmUikrmZvS5c9aI+Sp4HlNsw2aBRj\nDlOJPG5cYUu80b78ylN3Fc/ZLAtWodo2HOLWJtV/HbKvoBXEDITpkkoI5TRo\nvtd07Mmuh5+trdEtCmKVflkcd/8NOIHif6AlMAg/Gx645y6fxwLJQYbxuIZd\nIfuszZQAPLjzbwDemRysFC9F4ICBlUFsgBMNoZeOr7hrzrrxKHQvvSOXcYqy\nRi838bQhmdCPaHXo77sMDrggYliyLMZbTpkl9deJEjAjy5GO3OdO5jpVyLLi\nyR3n5yRL9hhyOHRAeANWeoVAdaEJux59YYw2TYZoDgxhnnXBadkZU/TGGffu\n3qaH8Smvu+A9oF1E/K4SlrXr3JYdf8Wi1USjrUv3N7QachGv9WJB07sm5GJ0\ntW3XlF+k/74w1XHCQ5jPPltQKO4gxi1OI88uexCRr3dcXnjrajVEXWozUimj\n9FoWBC3lmz/7dtFVRXyDDed3JsOeWcm2m6TGngEc4RQn4Q2dEzcQk43OT7EM\nrKOM\r\n=E2Wq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCI2/04hc3ejywQiTa5LBw8ALK5apU4BFT/DAUZ1/F+tgIgLTJs0Ysvo+63p+qM1l1F6wZJv7jBkAl3OP8+m04vKlY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.7_1553071437824_0.8725145688025067"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.8-2173204.0":{"name":"graphql-toolkit","version":"0.2.8-2173204.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"21732047c5297705e11ae4d36d4049bcb81f3460","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8-2173204.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3RCmbhNEwUUA7Z/ZEiXX/SGJQb0NfeGY9O0K04LgHq73H1Jp+RByWuTh2BVaksl/XL5hjrtpCFYHP/EESgQ0Eg==","shasum":"2ff2a5a38005db34f5b3839cd61b39828403636c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8-2173204.0.tgz","fileCount":250,"unpackedSize":258887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckf2eCRA9TVsSAnZWagAAhYQP/1Exk94AXepvPSnfO0Bt\nCEGzfuJtsfZsdfTCPCDutZPW8zEgwlJhQgqaZ0ZJGnz6vp8kG3zf2Z77hlt4\n0xaywp8xtk0EVqFhzz7x8QmkQNFrPvfxQs/qHtO6rpUt8ilPBBtOJk30KjhM\n8IuKTevtf3ogjzmwxN2/ca/DLBvtet+KUvPOarCRZgeiQHvWgLwYcAdmV2o7\nNEOzpPPTGqPn1RjvwY5L/v5BVCjJaK1rns2+DDmN2aQgUVO9qdJ9SC52o/Ig\noRRhL/NlZmZglYAbIqBn+nQWv/dUPCfAmAnsGMHQXMqDf6U33pzbVMdogzgf\nf4euZB9DobQ8klN1DsEphUpsDNGmMgz6X9FV3O+0Vtfa7CLbEvDzrUHEmrgp\nUxczqkXOu77w+3StF5KjjS2hAaXTOdeu9JT5/jAgYXle2ko7VM/fPoqEUh4q\nEAtrrF4RBkYXaX7DJakrjY/XYKFTo8os/3qQYjKNn/otN8DX1xDvteBxhxrg\nVVbJi313g9XAPaFuTK1JK5FbiXM/0c6oxD+yXEHX7agFX3tm34clI2NViIBo\nip8Pp69/e8INpQ02rCqdTjnjJ/WGmWscU7dzw//ZdE0uIaH5aFiEd0C0oB90\nLHTUJ4luB159P/PRAETLv/Om7nlP7fLpvZbXjqvGMk7zobo5fiXLL0Olg29y\nz0cr\r\n=azWw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFDn8lkdcc/9HufFktR5cexH5kLUPlPTPtGqCH1/irOEAiA7EXj517A+Lv6soZIRbeaL6QtXLNtPmny6dd6tisfUaA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8-2173204.0_1553071518185_0.3687238588960009"},"_hasShrinkwrap":false},"0.2.8-972df27.0":{"name":"graphql-toolkit","version":"0.2.8-972df27.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.2","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"972df2794743cc4a3674472ed061dc61d7981df4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8-972df27.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-NGkE+/aPgECRH52S+Zb/o9SR+g9Usraps0Vx+okVKiaymVL0rL7zWytz9NuHzhX/MygKvKgfBGW+tOrubROPAA==","shasum":"b82dc41cb43af6714dc2c03ff882da32e2652eae","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8-972df27.0.tgz","fileCount":250,"unpackedSize":258887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclBo7CRA9TVsSAnZWagAABoUP/AiI7sCfYk1FSb022mMt\nypm7EjTi6HXspxGUWlyrBsHTu3nv/oS32DxD5wfBrqGUcnBaTu89pptd3MyL\niDF+HWg5DvCUV3VQy5t6bMesnKXCMZIq52fHZ+Kf4JIVkqroT1dh5xCWutmt\noK+qa0Jx0d9hWgRJx/BXJQiFjNOLwgp4kEoRCpK+vxBx6psKB+5xt8PxyBnn\nsVpVBDnIIKJtlw2p2pXP/mk4Bi0aMrVWwrDW+bnIkNT26WGwZ4JRnnTX1DU9\nQMd5+7ibsdrd99SFf+cpMesu5d5dsHauJMMYO35WpTXWRJCOPVAKgyMCBOxH\nRLyXRHodnjrQWQ9LKduQJ8VJiFPuSHjyJZUEb4cPQVSZ3NJbA9H0lQkYKmd8\nnpNf6TZSj9pE1h7ou9FYBgY5zi1QFm0cpc5/sDRbm2Bfk8x1znO+QeLq7ONS\nrsyNuB2geV0HbcbTHnx9hjiNLm/xrz9i/haZtIUPPV2kz6hyB8BED7TwObNh\nnCDu7LuuLjiPr/Sv1gBWqCKL008qdxfXwD+udZN2Ooj7cjRiD27rf1S3J2RN\nJoJtuJST8PVWyX1ojQi8RSHCPk4SI9UPEyMlgZkMhiGdPdbLoBXD/zvGSOaC\nVRxhJwzJlPG6amAW56tNoKq87zQ7hWeApwehwVbckkJafDXEfR9dgAItRKS8\nDROP\r\n=VM++\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQlMeatpOLuwVtir1dXfKyugL9DZjjq7iEygO2oItx/QIhAPjVVUXFA1eGyvEAsswhRNgakbgkm1TmRgD7JKisr3th"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8-972df27.0_1553209914288_0.21670889504878055"},"_hasShrinkwrap":false},"0.2.8-d31d269.0":{"name":"graphql-toolkit","version":"0.2.8-d31d269.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d31d269caf63e2c788dbcf3bd0d3a2999eaf887d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8-d31d269.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-7oUVgMsrzWurra9a2u9edZPuLCagjzpEYiECVuPavmmCKtK6sb1OpbHGIKi5e2l/5tgAgNqy7eNHjAtZ8cD7rA==","shasum":"22d46d8892bbba817ead7147a3efd5c28ec7f885","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8-d31d269.0.tgz","fileCount":251,"unpackedSize":273486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclLb7CRA9TVsSAnZWagAAgz8P/3qH3P7VXjuJCa7M1fVj\nsToJ1v/GT0grx8vlgSXieSF0U04w6fp215hmvYvzuv8Q/ZDaWkPal3c2GxyO\nvo7ThAJONhc8MXT9VpmYd8ci86QEyP4sQv8L4G7G+uYt8xKRvUglt3urgr/B\nTBBu7Me/ZmpWjajM1liY8ejuw6qxcptbrvE6KfWB06acNeonraHp2wG26b4F\nQy3JIP7aSPJW9tCY/WEAIV3Ek9eRDamCTzz9RRHxAg0BjOeFZXHF3WvEKqWt\n10pKpWVBc8gEZgDBnBZANrzpSyCGt9lmisq3PQyaYtD5rGN1On8P0SqErQhP\nfMLknR43hEicbhmwO2veYd0T3ecHmcWP6IJUyEy7hVNTg+XkU7CNwJ3Sd1wr\nyXtSGuDszRBOx3h1ZkRoeJzW7/Uqnp4lUQoTnAnozk+q2SZMUuwdzon7gZOK\neH5gX9Tvr4Z6LnWZHSsEjA7/FWFTrt4oijGJZSolfkoUCmXAQfukI5KYLv+4\nI49xlPdtR3aaNDmChWwJkBu/DdbqHSeZ7RcMcyk5nQ0JH3LqUv+t/G+o4z1m\n9fiG/7m5IcHxFB1kL5zup8kzVW3k3Im59RrBqPYKT5NkaFHrWpKieAAj2la6\nMLk5JGc6yztb+3Q/ill7F2C9RQW3dOIdJO23kqEfRGCS9dqi7bWCMeBoskvG\nOCY9\r\n=CBmV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID10/VTeLlaMQ2S72aSrDMbCX3g2or2uAzz7CsRuK8TfAiEAytTY9eldjL4Ipe3lV+I9Bp7jqYAW4JyCx+JY4mIQahg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8-d31d269.0_1553250043001_0.6548533478664056"},"_hasShrinkwrap":false},"0.2.8-74fab96.0":{"name":"graphql-toolkit","version":"0.2.8-74fab96.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"74fab9658ff2ebec69092cf7e08ac21e4f992ffd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8-74fab96.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-pELR03Y6Ew2/Rv2IMDYgr18nxvUOY1Aw0Ws6N7eavYsUds9F9hNcmBag3s6kJdpNWlHQ06WNSxibpClshySgew==","shasum":"46b84a8cfd1b4378a05b47df2d17d108b32b8394","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8-74fab96.0.tgz","fileCount":250,"unpackedSize":258887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclTXSCRA9TVsSAnZWagAAM/EP/3FPHzbAM71gfN0hQehP\nYM3M1VboXo1Cu991eHywPi/rrHsPGzhiuYPPC/rbpMp0XciZXmPqGiz2E9cS\n884jnffdawLANnNu0xqywhh1Pd7Mg6Qa8b/c6aY9YK+7Vo76gEqgPbomgbmX\nACs1chkJk8KSzVEHwKPNOug+KMxUrkCTDlTDidCd9woe9EQVS0quL5cZqo61\nerePu6vwIa5gmiouvQxboEIePIrRkmac+4LYu5/qp2i55+WS6XP117JM3+0s\nbldoQjK+WShwBCCv82gVaWbfvJuvz/CS6dzmiKv1PSNbW4mraeMIunb6CP47\npvTiSLSnUrOXYC6vSzy4pa6wLN7T/424mjDZh68bBhrbA0KHrwuNan0Kpudm\nYIn6eQj0fWaPQ5Y+BQ44y1JnTH5UuNnAZdNKbBggqJiDiEe/uulm2kLPtHEI\n8j1HzTpIF0+hsjBqFbDefizs+PsRaQr1W5kfuQ11HD/6VASuI0ZQ7g7TG9b6\nlx2lgpbdoYXmKGAT9aQu20jleFAj3U1Nf9zMjTEipMcBTL7mP9ZcucPGrjC4\n96cOAFbmygcHOs5KJyyrZUv1Jbp3ydzVqaKpZPZ8OEFKy62O2snGU+nYUQG0\nPCDoswzDmZZQb2bVbPBP3OpI+yfVSlT4JNdpDi6GVMa3sfHi9F7yAxT8oHH+\ntkOU\r\n=clmL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxt+HhuROSH3sO6AOY0fyVyqvuYonktyZZBgFZ1wCm9QIhAJthYTGiW9j7A4l39XIswTEr6qgldD5Dp32GwF5/w9KL"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8-74fab96.0_1553282511737_0.10965872762194961"},"_hasShrinkwrap":false},"0.2.8-1461b9b.0":{"name":"graphql-toolkit","version":"0.2.8-1461b9b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1461b9b31c9ce151e652be27ff5d322de6c23f64","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8-1461b9b.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-WUaIUfqh42vMVtO6lc9w1vCIovy2oV1TLm3gt1DE11SFiI+F7f9cXNPzAsKNsf8b5kT9JECt5D3FnmlcSwS3zw==","shasum":"6b320698598fc939f3b40409b8b1c1221aa06087","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8-1461b9b.0.tgz","fileCount":250,"unpackedSize":258887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclyxuCRA9TVsSAnZWagAAPtsP/1dxOZvbwHY8+HGTw4Y+\nDcQivTyBJuABY2A0PXLhInwXR6XN+7RC1S0OhisVlahwX4p0p1TexUPdUmZk\nERI0K45ekMddHMJ4/sGqorUyxJRVQYDWYLXr+1azfImcn3b7qU5jZ/kI6Qfy\nZXGU1P5HUYBpHDMDWXVpdxFvnlcHrEcNbTl98wTy7SWP8D3c57tcP70BoIsl\neYZBLOyKcBp0omc9x9uBDq1rttNWird0yuuSPyk0H5bnjGY7lFv5ViHq1rwx\n+MYiJURW7Bgt03Np/eo/UP56hlRdD+DNy7zkJ5xsE1cbNviugAgTebEEmP6b\nOmhpf604UDf37tyM4Y6BxLZeKMFBaWsMfLcLlGWB7yqmnv1vux7AI6/ZpmiL\nJ9Ek3k3a2XFT80fjtSGctSbkwPELFKEyFOXTP8atw5tio6AlKxiu2YBY7zAO\nRW+kY06IBm8YXl5lL0CFxOmfIedX3sLZ+xHDK0Hx8uat07Y3961aZZ3WRUE7\nWJ4UjC6eHbcei0Ev6sgyLDq7rZM30egFBN8Q9AKkNFBEsh6TKnmAUYAlBRtc\nnbv1oDb6fR4Foo9dXFH+zmP2t/jSo5QwmuVgWbTlfmvSmCjWkI0N+zxRMZQN\npMKs20YrRpmReIDiWc8AdBL9bf5O9aZtep4PIPX7qxv1H9cA95oCjj8XlH0A\nKLX0\r\n=kSnG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuMOMLd+s8YItJhOjZvPAtV4a+0RhUQu5arG60KNEvsQIhANKrgZSI2JWAjoeUSrud9136yzQGN539uA2UQxHEBpBU"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8-1461b9b.0_1553411182327_0.687579997972616"},"_hasShrinkwrap":false},"0.2.8-fd1dfd8.0":{"name":"graphql-toolkit","version":"0.2.8-fd1dfd8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fd1dfd8d51dd75453df0fa3a27f7b2188fd88856","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8-fd1dfd8.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-N+ssYgR/fMjRmAsSFRzN+GfKqIZ3DL3vmwlZnMrkCCqwUrXszp5T79FVxMSSIlCuGNay7NO1H3qyciyoqL2ikQ==","shasum":"754be01e742ffd7142a57b101cd706ce80f4c4be","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8-fd1dfd8.0.tgz","fileCount":250,"unpackedSize":259255,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmGVuCRA9TVsSAnZWagAAfiwP/iRQZYjkmzLc0SDqYq3g\nKBzyXIPHpbNtn3EhP5POjPJET2ay2FvRQhZ5AnBgkIdmcWw9arX1TBmpC7eP\nTj4hOpIrr27c5OzFLjWQKBLoAVkS/yCABYB+RC+k1EwGDXbrOKQpc+5tJip4\nHHxMKSeLTiuDb5ywzpGZcv3YjqcW/16Vg9vfYRYhLY6jAFFirIBHBy/fmkkR\nX/u7iRHtm7f/0/m1+iKvpbiGajfTk5vnW5LgweE8e4wmcCH6cAdkR7+0LgHW\ncGZgVYFTCI8uVR6njJSU4a/VEg1x97htCGkNQawpt6llHFo36PiaBtul4Raq\nY7bXYYpqVhzRuHGnToFFIExfmmSadDuHMe1XrgqJN45qoevK5qf0gW7n7m48\nemGJkCxTeVd9OvbyESEplEkYZGxSqyLAxGeksudBOhsmDFnQ+x2qVO6Y6RHw\nkf9DyFC9AYzMGS+SO1aVEM1bX3GB5tzpVX06qQG+rYj4owll14hcGjOnDQ2U\n63pSgkMWBu+OCh9R4JILgeq+kmdEcrAj/yJRgUacONvtZo+6J9bmuBXe380D\nkd6eFVCYVQMtsFzI5KnjPKebTMuGvH1hhgw6Of9KpA4/AF5fwaHQIGgJymLd\nU0UjiW8EOJWWuJqyaRjZW2W6K5VarodgAqYy5UP/9a0Yxm02BPukcaNxATJd\nbJ3s\r\n=sVZb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDesZRlxYhQI5cuTh6J4Az6+dxIyfc6IVqASyMIOUOanAIgagSZMZg+B07yXgHecHolhLOKvMM5pz/jjNMfX29V63U="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8-fd1dfd8.0_1553491309916_0.9509846254724303"},"_hasShrinkwrap":false},"0.2.8-4b3671f.0":{"name":"graphql-toolkit","version":"0.2.8-4b3671f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4b3671f3665e73565ff2335431228265beb33d5c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8-4b3671f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-hGuWAwG7r1ZGJHfukb2oufAR7i+6kkw4V1L0W+ctMbn9O+ERD7sPBfAxsRVDJrO+N4gRiOq6h6KEbU9D/0AuLA==","shasum":"1c570b73fab4df52e3b3752c25bbad071f1fc4dd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8-4b3671f.0.tgz","fileCount":250,"unpackedSize":260261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmGWYCRA9TVsSAnZWagAAY8wP/RYY+zVivhx8IQIpvNFg\naSqtEOWRQAPzuFdjY1kRpGGjjKYhlXiOhUiUNoLI5qr7+SFlCaDvzpin6nkH\nL6NejHaJhY9Y89P69ZGUk3QOAxoX1MJ1Ar+GBCljaPLVnvQl4wIfQGa8xUHP\nPKYhBd3n3mGJ3nox6NPqknFptd/PIV5rUP8ZY/FV/LBXbqApy56rwKIfudjL\nClqejcrMpZpPSzO0ueW+y3OSn/UgU1yUbohroJj5bUQ8TnbyP+XK9XMPRK0S\nCJFesdW7HM/ut3rxL4SfjtNwWWAgtuccXbzX6RnDE19wRoLTZeBoUra2xYF6\n+zRNjttazNj/kmncbYifhexNsepTZ2rdWKcbwJz6VajeFOWKWfI7VhsQMB63\nwsMqCw7iQ9FAmnogZ/oM28Fgk46Hdpu261XfxZJSgEvTm6jYmZUkn2++5bHT\nG+b5krSWvEo+hAv8H49hvJM3+NsMSBL52L6Tt4sY8H8xfoJfGL/g4PB7qwmr\nqtksgY0xH+I4cgBeSivWBYS/hCu3chutUnMfS5Vdyjjr28nIV6XcjBc8vxgp\nHCy8zOmzTsj0lkgNGke438vV1QUsjn2hOPKuZAd85XF3gmZmCTzFgXOIR9Uy\nfriDqcGzABA7J24HhnajomfovMOKQAdHN/l5Bd0g+9aQK3ZmUDJNc9sWpt+z\nHYG+\r\n=Apjn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC5iShln2l1RsHEMwc4Fv9g1f9r6c9udpcERwaiCeLWwAiB699WTYPgIZnlfeVTj8WGCZn0J1uP3rTrwmwdLkpIWpg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8-4b3671f.0_1553491351770_0.19270234927070606"},"_hasShrinkwrap":false},"0.2.8-f0f6fd0.0":{"name":"graphql-toolkit","version":"0.2.8-f0f6fd0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f0f6fd00fabe1ffc867b2a649aca8761fbe96527","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8-f0f6fd0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-r/dj2nLOcXUPEzRbyG+yji01ZuJUCf5wx6oL29Uvjwc8G5V3IowJL3Bkd5uzGX00S6KRhlduc3wroeOPtHPTdw==","shasum":"f21ccc5d27a47635c0dc2b660cc32bd36be379cf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8-f0f6fd0.0.tgz","fileCount":250,"unpackedSize":260261,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmGXZCRA9TVsSAnZWagAAeiIP/022U+DLJMFnn6KQQtKa\ndTB2ClXSaZZPOQ3OXCrvfOGoV2abSAuWlbo6aluHpU9stMHLayjWhBSO6pUR\nIA8XaeEbsH5IZ8EnWCZriMXRf+0sRH/AT7PmBOsgvarhMA599YvRdkUXrhm8\nhS+vRdr8b23hhwfg7q5D6tW786lPh6z84jL1foS9UcpE+/8ceUzhJ3/oPGXZ\nPp/LJMI4HAX6K+IFfkN+bHOWFE0ThbLbq5+U5dAu+RkLQsgCzyzXS3nTHbGg\nae6DMSGH4g2SXnGlXgW/H5f/M252kOSFJsYbgIcBquwsnU0AIG9HZ7apOwGO\ntprwHlun9okpsFU7rB+46tyuDtOHSKsTJETgapCAaK5c+Jg/5XixtrhT7mmP\nCByXrbgtx10unFcMBPsUS4t/xqRb09aPa6j1E1qbIFwI6Pock9pk6bXedbPz\nFCguLE8qNei3eJCLKFfIB37Y9QEMaXhMg5tUtxeWXGcGYGGzC7GVZdjPPEKH\nOqDOSp2KjnBdxumHetBAdIbFXYdm4tAKia51f039RV1Uw13F4cFH7BQVBLxe\nHH+RIu/nxbR6/e80iM7mt6KLcVj6Gqx7lkVva0pMSGIrB1A4Am83YTvoePDO\nL74FCSaHQijr/3K8Kg5ImefGVZ9FaHUQrKclep0wonmUOFFQecB7bTigUOC6\ni3gm\r\n=xDim\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIETyZBIkG65KrpVAKoC278vCYDnK0jYo3wAldcqvFdxUAiAzAjG8Jq42m1VSw/q/KV1HY/+ZCEKkGcmtkCB7O+Ai9A=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8-f0f6fd0.0_1553491417074_0.4175473716584659"},"_hasShrinkwrap":false},"0.2.8":{"name":"graphql-toolkit","version":"0.2.8","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"f0f6fd00fabe1ffc867b2a649aca8761fbe96527","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"dist":{"integrity":"sha512-J1i1xDSv22mjdtJ4zuw6eCEG6sCcP5Nz1qwP6ZgRNwgJiSP/SJAuiI67vOhbqPbuEmdAM9Kb5YPu68smslxXZA==","shasum":"25408dd9361abbada26cc86a01c7e69e7a7f4b51","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8.tgz","fileCount":266,"unpackedSize":267738,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmGYbCRA9TVsSAnZWagAA+qoQAJz711DSNkLiY8KqEqE6\ndV6olIEwmo1nK66clamDIjVryUhqhTrB6GFhq9ycIUHiawZirltYhDd9orwY\nwk/pofFIjsRJk3BqiNXLFMZu6Bknhj9zxOqMn3Kpc6goOz5Ud5olDlmlXvg4\niwB0mVpUiwXMb3n8Ff8Bv9TAOj7yRSQWsBXpUWVpVMbvKN8n3TN9C9N6bq4S\n3IvzRDqlammx14KectUMQa885eMl8vp2sAsyRwy/Y3hnJ0UzuwPFcD1ooHxL\nSbI0n0Xly7hyvVuE5eb5rZ8ZURMhaE04WbOETX91PHmHX3W83eVenpOuwGqs\n96nfT3YL9yZuJ/JFVMWLTU4i3CcaJbzw5/v4Y3R3MRruzQGzlKUyLD9EKygn\nmg8QKhqhYefvo/iRMnq7zTA9s+loWL1v46oZJ1h4cICDE9PsHL659zg+R75c\nxTqKC4B+2emUOGOOgcq4zEvz3kOXDJoSqmLNG+QPP/xsrzmiZF2RXi3KAuhN\nGnHzJavzVi1CjWdWcPzWWHPlTvPrcMB+YV/BWQP+Qz6bKUi1pgDrtxK+d8Qf\nt1BKyGmh2LXxbuAHo5bveHiPV6ZgXCI2GITWt1Fr5KMy4/GLCRxRGEPa0pSl\n4CVx6/G4bQZj8H4twjLHdCJvZPZiTq/1XkiwT4i5lkznmf1yAQFspbO+3aJD\no3V8\r\n=T4n/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/oLzMW7Kq6OZ2So4FC2+H8EuJqgk+7JjCE4z6fIgQkAiEA8fcE7JAwf21H365CYNZyVmGMlcSoP/EFNRB7iIBpU4A="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8_1553491482872_0.7802518908885587"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.9-1061ab1.0":{"name":"graphql-toolkit","version":"0.2.9-1061ab1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1061ab1e4e43c5df75309053e9cecca8a11431d4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-1061ab1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-He13ETbFmmudByAbXs2j2QtdQZechdh7qcNtv1+bD7VCzhbahw3BUmAgrMfgVMGvVLasPusVr5/Lx1mYqj1pdg==","shasum":"4b035009db07ae818a01c5a72ca73386d4d9a220","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-1061ab1.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmMMZCRA9TVsSAnZWagAAfswP/i/CTjfYCmfhqSFMpjYR\nSrmgRO0qetpIcHHK4PRhdmEIpe1DHXycgW0gYFVqBc+VSZ9BEm/6ASzqJ7uW\n4J2MzOLFZkpsodhugu/dPaocBmUjRLzqrcwxtGt5YUplzYJlP5KMj2HnQE79\nOLLVQll+k/YJ7ecxp0fOPZDO5yg3gM1E9CabqFMIMql9oit8GcE0hMIxiXqS\nQoDDV4XsZEhkpOqZhClJj04bXGXjyNcSH4MHRjoSYyEbfSlKN3V/qlo1eojy\nO7lMfODZL7PL8WgX9H88sAuZwzW7irol7KHukZXwQRCuZ2s78UNVNPrc7RVC\naoN3r/Hzkl6P8FEGyuhfzp5w0TOUg1XUmKZ6bPiDfx7uPFP5xQh9Fyxl/0vn\n3sbZG7NsAqJTD0M6lx2rTdQyPsMRsNSInDrHz/sNdqMgRmLd2r1GaxbgfH01\nERHiMgdZ9UFNMyN/wDyzpyOZJAHM6L4LtT3fdUQY6tlekMg6xix2DtQdgnK/\nh+FGLWhDG9yTWFnHlx4///tnbLBnJV9aFDw65wT1doNEDYb9gr36gOvCs6po\nC3vIcWjfBAEUi9dNe9FXDydPaEMJxqGo6yhPwJ5Hsjc0QuA9yDRxY45Hay3b\nBAjNHbMg+t//9YyGo0YHWKC04gZfrkVbnfPpL9VQDE3lMggFqjq7Mew0wxTT\n5BwP\r\n=hGDM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLFuNnONwE0SXyfJ5mNG0bhFQXkCq3nNyEj2FeEVQ2kAiEAqICCt0cDfcRwnmWdE2BP/cQO+UbP/nXv7md01OpUq2g="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-1061ab1.0_1553515289087_0.21373041645753776"},"_hasShrinkwrap":false},"0.2.9-2f74a63.0":{"name":"graphql-toolkit","version":"0.2.9-2f74a63.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2f74a63b54f83d9b199f95ede486c96f947c18f9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-2f74a63.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-CNKt4Pk6wXE6NNLPABFDzhvfgHMvplBZP6bCbipt6z3FW6i6awGATV1hAjZzJPr8PTeJ5mKnnFOIkQZP2C2wng==","shasum":"8d498c73538dfccc94c2f1acb59a39cb8cfa330d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-2f74a63.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmMsNCRA9TVsSAnZWagAAi3YP/jdnPhiu+IiGukL3Z40W\niOxYMW5gRxjipPzc0cMDpWMLEb0EO5zdPZP8TZVN3/4SHqSwJMkzAYpD6aN/\nk06kRF2YCSRU3FizpI7Ud3uQNqzqKy1MM7jwqnCW/fdmmMs4bTPFXieGhh6s\nZ8ZzY8SQGMlyOwFrKcBbXE+j1wDl7arSjQy3K8yC40g6JnhkSmkuWnT+rmPq\nkn6cV/wcz+xwuAMW8dWtbFcYWkJuHRhhvyTy5ieoKlu3fEU0cfQYY+5S3qos\njsMzri0jfDA/kSq3QSPOyl1NOIOidzUl4HqKPLr5bXUgv8TorS5MDp9NjTmu\nl1v0HAXk7pBocQHRZ55yqG54GbtfbGTGjjCMFZD4xvjh7hbFejvEfrumyIR9\nrpQwAxiq22tZVMLQaJUj2sLCNVPngv7VGHZEaVfJwzN/qV9Q6FecgoExEIW5\n4RTyFl61E63T0SRv5yPplL4Yfpj/kRHoDdAyhXP5gUt8cZFJsYU7MA6Bkidq\nOI0EK/SIqzEH3rCxGEDBwrUVi+aupKK4lMyBfX5iQVSitQjwSHAaTKxHuaGw\nOG2wL74LdtVAmd5rDApjSiWUJvTd/nlwku3aqfpSI+Os5ryGOXUizBWPNi82\n5/Qt4AZIOELDbANujCPLpDwCTkK4oUvGJ6y6oYlVCb5RMIa/wHntz2yw/1tP\nUn91\r\n=zZ0T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGVXAb6nP4pNj9vR0F5/uJ+mcgTadJuQYI3r7Kyn1aBQAiEA5GCHaD0ojXAyxBmG/hdejb6L2Xe67+CLkMD4yYEdPwg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-2f74a63.0_1553517324353_0.3820286755472153"},"_hasShrinkwrap":false},"0.2.9-aa2f79d.0":{"name":"graphql-toolkit","version":"0.2.9-aa2f79d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"aa2f79df74f4acebbb2b26b69d577056458673e0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-aa2f79d.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-sMMfzthuqJ15ihJHfQQNnE3Pohkp2EOFVaMn1jRNTLa5Qpbjq05qrmwb1tBngLJzQ2jS5YHUiPDU0g7dj9NmHQ==","shasum":"5d6faed4a26c86e5d7ef9a2ed6fac8476027ffad","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-aa2f79d.0.tgz","fileCount":250,"unpackedSize":271528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmOgpCRA9TVsSAnZWagAACHcP/R9y5qdcefIGRdJCDtGQ\n8rTKsJQ2QDjIZNvRhJCb1MyLXrx6cHkVDmj8cPnV6P5xIQo3k+pFjkTi9Twm\nS50tzwV8LPSuS0xVLR2/ZlqbM3ClHqfdp+1UMKe0fJLfcFuepvB9Srm+KrgC\nysnAwKiTMFt5WQ+V+AUB9XzYO0tCmjlBX5CISjdZAS6Ia27bHb7CnNJMcD4i\n63Nukt0+2G49DYf7JZ17KnV5whWFiPaY/ZqduKIDfp+BlboaPGad6N2M4UOB\nA9JFvNfIKaOtMlSwAK/OH4cyWJK1YdNkUBFvPvM+y+A8ANVhbRy8OoLARuRT\nl7jFYMRLvwzZK85FyNKSFdxIbFTdpNUqZ+Y8/tccjYQMcB1R7uCT93BgT/vZ\n3fDKajfYxcyRc1b8VyzqLakGW7L/ujo33dGwhbWNyw3oKB9cVbVFFNCL4+hE\nt2NFdN0dfHUqCRLGVLjrdIEwrkRqXpUflho60+/SXq4pS3JyDZw9VQiA0/vP\nASLPzMkOP9y/YfeS4DKbIyqpgaqjFQN1lbxw7oLnMN2uAgVbhcGlxshpUD3g\nydRPsQC6AO3FxBydK9IevwcUEv8CZSx7XtGHYDzsfuVXbJh/1+WSbVxJMSD+\n/1r1L7Jqp2RtuUo3cvCnjevT//uFEf56/MVoCchLtKGonEAITqxGEQ5nfBbF\nlCSx\r\n=Jo88\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHFrrerZL3/lOmrTiTbkaBsTChzkvVe/czo9AajFNh4uAiBtlElL8t2kr0CZ+lVRgMhpRjvQAo4H5vIoODOwNuOTfg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-aa2f79d.0_1553524777260_0.350415826876711"},"_hasShrinkwrap":false},"0.2.9-1646af2.0":{"name":"graphql-toolkit","version":"0.2.9-1646af2.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1646af2efeaa922624354f2e97f435048fc83ec8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-1646af2.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-exa4Vz1oHb+Ok1NwN/ZjewnK1qjqorENq9ZKfux3Cx4J2jBBAxj8O5ufQDE47HBqxgFG9lKsLX2x8nAyYjhqCg==","shasum":"9b1665c9fec17fd9b4042f7598ec8962f0202c85","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-1646af2.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmQFbCRA9TVsSAnZWagAANi4QAIOxL+EQLh5HIUH3ATZj\nKe4o2j8XrwaQsX5va8rlroReEBSOwHwRPc+xmsYiw4wKOfEDC+huifLZTww5\noWdUu/S75YdrvljS11hMkFOElG/3JqWkTqGdDgvebx/XZEy73r7lBIPFPE75\nylqibt9dF/5/SY/CzbwNeWNXn1vKsKX8CnE2EPRvyqu+Zio2xwARoeqVOk1l\nIyUgWMvkSOIMdgvDqBOeL3coS5FfrhbfVSRPpzehVD3vKESpJoN+5ApM60M0\nJRSaaa7rx+2gvsz5QWLtByQ8DwkjpG9E7SsdNHtq25Pvo0+cRhEhdkNW/upd\nCXO/C1ff5Y8npQs4OzlFKyGkV4lURsbBfVzeE2Yb/T++IQm40f8EH5VuQn0y\nEvkv+2FNoMJRBbBMeAD/Mr8H2RA4TgNgI3yn8jBFtBqLsrojaPhfNa1rB/xP\nXvG1AbdaUUsV03g4UNUzsJ666QNOv0g88kWgjGXRtth0roXwMJcq67Ieptyp\nKiVSdzS//R9QO9oqeTAh+J14cpoFGi1XFjgn2jXU6uYR/I3S6lMpBKeZugZh\nk9FBpUUZn8sk3LzIdQ8/evySzE404D9m5fXegpzmWYJJ/OlYwuOys9omiALH\nyU+LRWC3DiFSatug22qh4/hErlcd1EZ8EQEoTFJhp2X65zPrRHOGiVhP6NWk\ngE5g\r\n=1flN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHYYiQmlxsa1tHugGzCHAx84dw9uD0EtQpK9eRqi0109AiBSANOKlGTjEzBwZxJ13NbrPgUayiwJDD3L6+44XJRuuw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-1646af2.0_1553531226004_0.8366834386038067"},"_hasShrinkwrap":false},"0.2.9-396ae19.0":{"name":"graphql-toolkit","version":"0.2.9-396ae19.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"396ae1937d335bb815a59704245b011b94fe32ff","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-396ae19.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-YqTuiq2Py4xKttkPof88V7pEHMY8G1DsoRZLbZlsG6ZIpOerYJmej8m7beRvDi5jRJu4ULJaQF8NWOOt8qNdOw==","shasum":"9df1d1e5fd1782f928df43868c9abb22fabde313","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-396ae19.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmT8aCRA9TVsSAnZWagAA+SIP/39LG8BxNydacpSkyGRz\neYI15HF5wO5L958FqOgxvXqp6gs9fDVd+tH8CJl/BeJSGAbHIOWdskkdioI6\noxg7p1fFt33Z2kj6oJwzht1pjuGaKjiBmAIYgX3Xvx0oMejLn8clJCQSMHwA\n5sqx9DjwxLobSyYypq9gblznmyK1lmfqObtCrrvjlhPpLJmwnjGhfLtI95rz\nLCctgCEDFcbs9U3QxJkXf9BNwiLjdz7Wt7/G+epQIfJc1P8uEg/iMWeeQJfu\n2RL4P0Eyoj+7R4as6paXuTeNk6l2aMAmLyAsQWkx6onItd8z5qRc3UvrUeyY\n+9/18nPxVOqmhsMXNK7Mbt7JlrfU3/zcyBaZ1sIkYqbo9A3Rck6b0etm00Kr\nFCceLKGPCNqMI6fCeDkAqqc4GHM/Wo3eMaUbFKuotPFQEZIYC/tBzooT1MpQ\nN1vQnsVHScFW9j1hsiawsL166U/mkCxEINNM1rcCGV8pp5HOfjUSKqlE0+3x\ne/MaUE/IwzQt4GHsg0aA5YeYHv/vgIuCd2iYIhteR6q+2PTXiVxbe2eBJXEP\niMiSlUG0gT0a6HFFegVU3u479DcFokT/6Jvp0y/S0xGhEeaUZK0xorzoDrcj\nCplvkbdC0iLPj8FxpKWRW9M2cHeeLvSBVpBic8UCXI/4bvZkHareBIp+oPOy\nez4u\r\n=jg66\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhsTmE5An+gs/H1n6qwMBNlK4h7T7OIhljV2bbABUG6wIgeEjv+rVNem4flfaVgzv9/8NPq6yzzJtJqH2b1jAjEtE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-396ae19.0_1553547033943_0.02698970075876095"},"_hasShrinkwrap":false},"0.2.9-4d573cb.0":{"name":"graphql-toolkit","version":"0.2.9-4d573cb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4d573cb1ad6d78371372cdd1eada3c3cbeff0e0e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-4d573cb.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-HLg9Mu5JxON4aW84IUoD/+yaIc6u0gdG5QdOIDnR1aFIXzSGhWVs+urZ2O9bPrA9T3leUf6Y9koU7/HkPsbxUw==","shasum":"2ef2a861465df7ce163121c4e3040fb4c69481f7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-4d573cb.0.tgz","fileCount":250,"unpackedSize":279255,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmWFzCRA9TVsSAnZWagAARXcP/0k6KxorhDhFgUipH7lG\nq13y2L2ICSEtHJKYVWf6uAABy9k6/Hd0d9ScFtz5t5grooZuF7WejyvmvQfi\nzroW5YQvo+qhgyolU6D4PHtaREbf+DfjsV9w4VjpQPvDPKno4Pxe42jgAHRj\nQFRpOACYLI6uyVJX3STKS6zAB2gl4R4cF4VuAkhaQSr5ifZ0fi/3wlYnczvm\nLt4ePmrbE/lLTW+aCjq9GQhvlzCGjsLf75m5d+Csnswxx1hmsf6bD7j+nMnM\nNcEX0M9atLCEkQSCwlywUcklCBmGOrWHUrCSye2YGnwICos4bljg1rJuvDhi\n9peLyEpJfwYqli8kCK86RcdJIU7G8n4EnaVv5T7p1PycsmibGBy5G0s6zmYb\nZhdUWe6xXXq/D5g99SfXWC8wkOmlkbKILvM8OnF+WyLXb/4yR05zbwYfBJER\n2/HHDazEXfqEe9B+mMLt0IAbCSIDHrGAq5RU1sM7EYG2N6AVnLnfgZi1z5nT\nkZUgQzATtpy0SKMaYn9ck47Ofnon6GmeojqR/cogMfyh9HvxZ8NDpSE0J8za\n1+PWIxi8E8cNqREFB9y5Hy8Mj7QWwOqFDjBzi6rMh+kP084AReKCaqIVN/C2\n+5sD/UxR92XVNKcGxoD0x7v7TeRcthFN54kg6I5omUUeVV56tl2tTxks8Z8h\nmTdw\r\n=tkAs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICjjpEYlquwM+6Y/9VZ3QG7dE1hKuY1/XSP+b25ODSl+AiEAqQs5nV4WcLTZ7D7XvL+GU6oT56zqHQzDRBqcdRRxPq0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-4d573cb.0_1553555827101_0.7752719997425832"},"_hasShrinkwrap":false},"0.2.9-e501c90.0":{"name":"graphql-toolkit","version":"0.2.9-e501c90.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e501c90ff1fcc7fd27323bc19031a3641c597694","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-e501c90.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-wToWrth703oevF7WzvzFvSCkVwRrZuiPRQkm+ScFFrBwna8Dyt2QCLhmlZ5nf8Wty9Dle4AyiQ8XH4ukPFzQAg==","shasum":"3e5f8e16a02f6703beea1409884eae2e5d61d23f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-e501c90.0.tgz","fileCount":250,"unpackedSize":279763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmW8lCRA9TVsSAnZWagAAnH4P/RF9LZXvMvYnhJFLIWv8\ntHrenZExHHSp+VkEFrDnCwwzCJYTIH8o5Web7r3nybIbP1QU3U9d8DyNc1r9\ntHHDNlTT5jaUw8Oz98R2QHszMOJneOJk11CsZfQysG2VsleXRdq4Nyyoq2nh\nRcOL3i/6i+MjnDmvK0ywShVM2yk5NdtovCg2YJioKJnjeVVJc407gSaWqKTT\n+juxkWKFVQkRf5nvLKxaE3NIRpefJRBkrzKZgREs3scJruHtXT3E50NEhy4T\nM1/vs4z+8oqyKtxpRZ07odtaYiFBNI+zV+mRe7ZfUnDjdAexWdeGRlGFzHlo\nF/Z2snBtldcvdL9GNwI4Y4uBWPXQtpovtEUno6mZm70S28V2OdJqdSWoGT7e\neXczaTfDrpr5fdxHwDAoHjJCIsNUuRiv65/odPfNCiTF55Z29g7yoTr49EVn\nq8zyvSFX4KmLI9+tN5uOgMljRm31tgCHfLI8q+LE3Zz17vNJ5Hs+zOfaa7Bl\ndJosT6erTFlcVo+MRudJIZPasTTnddH5OSrsZfLA4QSSz5sgNokO5h1vPqRd\nEEtPGIv7ZVYvw619RijZSJ6jMH+7FHYcGG22V04zmY4doytFhfvB+X/X5IXw\njju/eUrnMY9c+MzlbCuqmxBJwGmFY+HfQ8ArNiIVbHxaOjEngilQ6OufCgkl\ntrhN\r\n=9xMp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAtfJSsu9OAQH0c2HlCrw9AjQq4PH6Z6ukERHcBi4kmWAiAhcveZUSfLVNmafiWA2bb03Fi7Nu98X1G5Oj9o08TbjA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-e501c90.0_1553559332680_0.24377549412816713"},"_hasShrinkwrap":false},"0.2.9-804616b.0":{"name":"graphql-toolkit","version":"0.2.9-804616b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.7.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"804616b7500cd2a80f9c62e830bc1ee31d11d4bd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-804616b.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-MoBc5jn6RW5YXlwf2CISOS6a2Ck1Ez3Trk8upRf6YZV0IK9J2Jyq/pYzPLwpfLoJ/xSLzl7xOoQJLN4AJWMbEA==","shasum":"44045f2eff6f8ff4a18875330054632cc154ab7f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-804616b.0.tgz","fileCount":250,"unpackedSize":280725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcma4HCRA9TVsSAnZWagAA62EP/36ciEL+add+y7JqMwjg\ntGXAdLUeLwHvWENSI/BKL8awMFElAfOjT8776FqYGQISE8BTo2MV8RRQ879z\ncQalwQR8IXX2tZxBoHxw4gaBhtzW5ZLQenwzcCwQkyun1+S37kewwHhKB6u7\nnpOKraDax/5K9or/OO+lVLKhdd2d539MNkVhOWMW/LU5vmbLYh8BJ2JpE2/g\nWOXn/MvT0FEXzJwpTJgnPh+tbd5BFntFlVarvjs3N9+ERp03JaxnJ9sA+9W6\n1KsREfjwwdIpmjDjNB4BWpJY+2Y1FUV+zFLD++FqhDu3/l38KZjV/5mh8sE+\n20IrQfwds6VrFm3XtMIpnTuqlZ4SdzvXjqU1vy5tCzCyiQr9lz0wAaotv6MF\nFjL0PdZzv3ElVWdK8LuPA1cn+bR5jtGAmAzXQCQr4/N/Axo87M1pkmZDnxcy\nvX/8GBf4RNSAcqqSmmRpdR4ReM9vmTFDG1qIiF7vCKbqRtDyhnRbC8ylURAY\nN6Z7Ovu+3ueN3Cm9glCvHpYSx7RWaHftPtMD/DLPLPUBIMKRKijRu6b4rVKu\nbXJSAbjxjmnLW5mbBOuoPq8+jA4qv/DqiVdX+2SJt7roaQg9x2E/eZZRY0c0\nDnMdej6NZUKBo1GevYlXjXi9bwf99I2cYjJKkvUULphxPeJcTUV0OMlcSqIh\naBzN\r\n=RUfn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHQjY35YsosN5bm4PId+ZLZdSGXLjsagefrSVtKDQkLgIgfGq911kKI9tOeSEHDniATZlctNy8TysxkVX6PgDHxZs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-804616b.0_1553575429697_0.04493826548308477"},"_hasShrinkwrap":false},"0.2.9-c734287.0":{"name":"graphql-toolkit","version":"0.2.9-c734287.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c7342877dd24716b2648ff08637644442a0e5e48","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-c734287.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-LSCP+DlQbHRKscmn/AaEYEOMZQooYiUJ8L/2fZC5Epp3ntneg80HV9YJ8U0E10kB5bRhWl8vU8QMS9BczmxbAg==","shasum":"a091c36dd0d926d94c8767f4f4ddfdc92357f138","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-c734287.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmdSCCRA9TVsSAnZWagAAFxYQAJQAKL8cHVpov5AEwVmS\nIZycKE5Z0/RG9HGQ0fcQ4Qwtb+1qgDqxF+RXOroybHjExjldch/yZQN9Zuh7\ntb5zWTsASBJ4xdel5bCEXUYEqe+d89E98gKgfYcE0O8tmupN2sMGvP3QMx67\nLA8Pgk8BzzrDqum7vmQrtQ7Czm8AzL2mf9heZFUqmNd8/kEdPKeIvfjIowtN\n+awuDqwPUhqWn+chLIq98UFY2843LsMdntSdbY9ARDU9BGJC9NpMdeBZpFoJ\nR+8Egh9U72mv2ebJmyePWOUZvh62lFdbIDFzMqN3c4nQRi0e6cvgyvIm5MC7\nixh1qGvrAhgSozUoTpqp+BnoLCPv9nlV1h0ZbN/XcrDi1bGfWePsH1CyH6Zu\nvjBrOkpvbz7+Woz0BaaLO01BaOPQ4lD0weu53wgLj+qIluuSp2pQdJ7o6poK\nmPBo/xJisFE0gUYNpXINwyNheZ2s5con4bYu2uSffK9hMiYNauhvygnMRCL4\nPdtUAlkZfPCrpoDrNdyauynF+2Au+5KCWEFNLtTMKjWaOI7AmJ/1yIgfGGIg\n7pRZbUpUhK3bEy30UOGPUUx7IZV/ExbiiyRnRZU0c0HHxFnHjOUPu9hNd5vK\nghbdmjs8yFvwaYcaHlqqlecuST0RX4NifYBsLKlzl6TXR1Df9VhVjNoPN3SR\nFkX/\r\n=KvZ9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCn9a9Kr5p+6ktcgdYE3717flo16AgjUG5TaAGADsegZQIhAMJYzjuhg4CciGVsjpDbDfIm1I7ZbVjOwsPFfqT9r4bp"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-c734287.0_1553585281667_0.2751804931843773"},"_hasShrinkwrap":false},"0.2.9-514425a.0":{"name":"graphql-toolkit","version":"0.2.9-514425a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.3","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"514425ae0113c6c976d7678cbabb9ee8c12080ac","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-514425a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-cDC/z+7cEKlCzP6jBByYhRz6vk9eRFf3h54RR6BLZvgak6DJcIY1Ks5m8Ra4mXl+gjVi/kKPertTUx0XDjxgLQ==","shasum":"72255b215930a496a2ded29cc0f9fba9fc1e076d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-514425a.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmdSJCRA9TVsSAnZWagAAnQAQAI7cYkbb3a80mRGCkFKv\nPONJFsaBuB8f4T9PYh3hU1qeQOmZHoXNeZjNmT17ooEhR4cJhpMFIu72EW7v\nZwspqew6UpmEBIlEPr42d2MejzBVOeiVHP3lvM0bxP8o1lilQ+USGmC+0UaJ\nWaLtBviuTIPZIKYhaI17co8jyuk732qMCqitpFIVJ6TZG+FCuVXWInK65923\nUvrk3vUVa6l7IJtu+w7dW4Lc+AvlaYguY7NWRsjfmGaYN4H8MHTXtHgemy+g\ncsM4L5CtvqRlYVafS41KPAl9av6iSUBDjuwlVKyVQx/mbsYrwSMfwL2FT/ku\nte5btqe4EwmmHv0ldsB9XcV8em4Q4T6nBB6932SOy0GxQRzGiuSkq2wVID8h\n661kkdnn70Yh6b21eM0C7JzfXwq+NH47AqNIHhs5N9MtIg6XVMbvYH45QYfm\n9upTKc1FBzrkhfGJGUR//rktcZ03CxkI1egkJAu9dCKMLwDlh/bv5OpgHIU7\nS1Cl4S0rEqT6lGfbmTve7WJJ1ozuJdk5pEy8/jUX6+te9s0lwyR26Pqq/UxJ\n2MzE5VeWlCiWQ4TZoW8n41HrDSnezg1tz7srvz0zL3yd08JCEBkoHJsWuu5L\nheHDmFuHgcmmsehHf/pU4QwP32vs6YguhT4FglDRlLWLSROHu/3BJ053F/PQ\nCMoZ\r\n=43pl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDebTuSW7iuxfgyA0XDSta8IJNI5xbGd0NYeHq8DTp11gIgUHm+FxEUBmZVXKRjAlWWDc9b1OGZzPCTJk5WTdTfHgQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-514425a.0_1553585288987_0.6677363746526066"},"_hasShrinkwrap":false},"0.2.8-1cabf06.0":{"name":"graphql-toolkit","version":"0.2.8-1cabf06.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.1","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.7.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1cabf0684781f885c761216a63c82a2296ae7caa","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.8-1cabf06.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-wBKx63NoTvxE9Qwb8lYKQV+zt85x2CEHODjY2ZGEZ+ql6DJuc0T5ZuR29H/wElBZd/oH7+OYVtNFwl1iaUHqOQ==","shasum":"3f1db1a7d793a6dac7a6cdd097561b56d14a5534","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.8-1cabf06.0.tgz","fileCount":251,"unpackedSize":278622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmkmYCRA9TVsSAnZWagAAuoYP/0Ag9e/XyIiytHLdx+1j\nJeFBkecbEAd7FJfVMsD76k0Ey0r6TfXRBbwjohvM01+qjxxJ78KCDVcoAJdG\n73kid7MmosgjY7e4Py5PKtH2B9Mj2AK8WIXWxj4BBuWToB1cqaUq8Og4zCoZ\nuRKfK8WzYWlfj9LXJTpHUMrFXTrfixeGNejuriGFjq5a+RR2+TVR9szBQH3W\nO3dJYjMmryNDe3YfwnwFUUnXFueRJsEO1HOuBj8Ne1ATc/T8h9//iCAKR/l0\nVK2L6zpZIfgkMGVKlO3DNdWLMnuwmtNfTFzFJPfUDvlvVeGWqE38Nqcvt8WT\n2VSwxx9GL3HcX4AGj/IAjvoUpk/4fV0fbJIeWFCh/E3vk4RIndJMrbe3nnOE\nyAMt1re5pSi6I4I16di0/MdwXMcwjiTRZk3f2bMsNQ0VgRmnThR2Q+nhIwJH\n32xrAQxNdWZKKHiQykQDCKVnNi1Nc8YPnetfPXWt+Pd0SR1S6sBDg33xlnab\nRuBcpcpU8DVp3mBYwJn2hFwQC0+eGTfTHcZNXT5pEY6A8JVecbYjaqOWxyAk\nZcweato9x8xwU9OyU11PbJr25QTr7sxrp8o/J82nlPzqj2BcpU1SrFhsAEB9\n3K7AbKfCsw5CxxHFa0z1SWB8TdywcJdOF7Z6Wapg6GqQosNcZa7QW+Dgubq5\noV06\r\n=qy71\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgMNzWW7cyc5sFyv//wuGRIPKzV7+uaGbnmrKAfFQEQwIhAJdMKCLrt6IvK7Bke1otrQ8u/Xsx9Zrzr7PT1rC3tVAQ"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.8-1cabf06.0_1553615255568_0.5992607157214676"},"_hasShrinkwrap":false},"0.2.9-9b6d1e5.0":{"name":"graphql-toolkit","version":"0.2.9-9b6d1e5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9b6d1e5af19dd137d2bacb876367a744dc23b2a8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-9b6d1e5.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-GaDFSF6kO4uE2EEXIvSNNNbmFsXlekF9lNXkamdJIPyY/DGmCx1nd+9r+gIxRt9zYUG1WIciEP+mpDTSIW1T2w==","shasum":"d0acc6ae421f78337d163ce5299eec6f1e74fdcc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-9b6d1e5.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmoBbCRA9TVsSAnZWagAAdlIQAKPCX7lTBsAFn3LGAjHg\nVvxCMbttGxjPQmps9H/wlUmLzaecLyXzIaVNIg3Fxc42uPMKtIITnUj4YQLy\nzMaKOkaNi8y7jpVsLaPtzgGAh0ybbexgrfdqduW9csZ+fMkh1WWV/NkNmBe4\n3pkAtIg0DUk6opxYjpex8wj5FqS0oYxjPTUqIqgpPU33kiINJFDByrtHJ1Fx\nb5+s/gLhYNlEt8/BG/irzjwLXp8pJenXey4UWl8f7+6BmhlWznYtqH11r9ct\nfuSWuW6qyyPq7Cd/BzvUFL8sgEEY2ihdmWgS8Hh3Z7smZECVM589Nvfo8VPC\nn3Lfi4MGOZZkDQ/RE+o89Y2PGvF+jKM9D7FnJ/y78x51X7S1qDJ65S3IBDfs\nTfOrES+SvAVNISc4joA5JMxHiE3lbg86iY5vIQAsxZeo5KXcdMrTqSsIyjWe\npciS4cAamSykjkbi4LXKplagzMm5ULuv6z5W2ZZJcTTya7ZsFArTQZeX60Vj\nymtoK2WnTknMvIJE/DORrgb46K88xNEhnyBoD036TRpcMohA7EggjQFPkM+u\nTm6CdvO61bZV3EiB7JZcUbFSLEYJP8NP9eVU7n/+3P5vLEL1+eq1T+MlW4v4\nJEUdmUbp7tJqEwFJP6W5VONu6rjN1T0gin82CmAktBm10e5lDqO6S0yOmuNn\nGe8L\r\n=qISH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHViJbO0gQdE3hiJspeBVkmYuqzkCRghBrl1PjMVkMBaAiBP3WVb53nChxAiZH6nmCqMdEdk9X4M5GVvbjUoNVPv9w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-9b6d1e5.0_1553629274742_0.6753519222552895"},"_hasShrinkwrap":false},"0.2.9-47061fe.0":{"name":"graphql-toolkit","version":"0.2.9-47061fe.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"47061fed9749efd7d1700deba0c26899c6a1d690","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-47061fe.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-aQK4NVMOs9NjUNfeROntfJ4rcQsAZ+ogouVV3poias3bjFduFOQqU+0v0sBZsPloZqytB9QMigYxQ2Cvr+40gQ==","shasum":"fa1209471c50f31bbd88804a7fd6023e545a8545","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-47061fe.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmri+CRA9TVsSAnZWagAAFQMQAIsjhiufn5Li480vBczv\nGd/BjPLx9WYDb+tD9hiq4vjj/oCSNS5FYVgr6ZZ3tqxNRFNMk+0s1J3F/uBS\nzVWnyFMNtb2aUAJxWk7v/8IRiI/noOFsQs5b99bBQf4xCBL8Eb/lK1Ei2zVn\nTHELn0ZzyPaCdCnFBVpMpU0/Ei+o9pgNWpd5IGs/WL4Wv+y0JNigHZ6y+3Xz\nAIqgiQO+l6p51T9KeyHiqPTsq2XE9TSkJoJXJwVLtjCej4bm/ej/g14SzRFQ\nXOJWw37GHZPQhQtkfrpuU3XBT6DIbSkT0ySpydh2cg8xdekjIATNVlHQCnsa\nk/l6+8Jc1vh2i5WNHBw1CH7SsvwFFQlKYB/HsGVWQsemKsc3KrXtkj2rYe0/\nFv1qEpYCz4ft1WZI0xdMgC9zlrSRb3zYOlJdLVmkwMtwGeEPTlQP4lOcTVFF\n1xcocl0IUrDNXYnYUs9MQbaC8OHqKk82IwvgtVe24IFHaYxt7SXlhIYweoHa\nd8V3S9ciP0YTrhpTBepyg5jd+4kXwqbWE4+l3JbcE+0UVtTCMB5fl5G/ScEA\nY+7nXnBm3NULav0EPM1iBde9QBW7xJA7wRdjde7pW9q5pnT+7229kTjeSFkx\nfUL8/uXQZ9hZck5vfnZNE6j5p16BOOO1et2cggKhl3MGABm2ENHUkJFljcQC\np1id\r\n=GljB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFi+5WO9uwAe8JdmFjx3y56v2j6EFjsapCvvhIhNUJ0UAiEAxldus2Ytas3nMSFhSPHnXiC1Eo+Nf0OAW9bioY9i5kQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-47061fe.0_1553643710299_0.30148832697990957"},"_hasShrinkwrap":false},"0.2.9-17ff5d0.0":{"name":"graphql-toolkit","version":"0.2.9-17ff5d0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.1.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.7.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"17ff5d0900a7cfc1a79b21427dd48bd4d15824bc","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-17ff5d0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-bnoaE7wvx+D74tz+7jsj83gdEEwnwfabDK0tiuaYz6zbuTJIXsBplPxPfASePYD6qS2NlTPUytkj8Y4N5/Qg0g==","shasum":"9dd60b4415febe6b2f5087db94647058906faeeb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-17ff5d0.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmrjPCRA9TVsSAnZWagAA4jUP/22UDI0gV6lTbvqfQxfn\nye23EK4IKbrwuuJugEIMnvtk7BjcXLJPg0JS21SCC6hcUbXBJzESuqbfsnpQ\nL/Lqaf7mt+ykHPi1m4sgQbd/Ce3sUxlWSEBx8DF5RdmTC+kCU8bYqFOf61of\nhibT4s0vWTbmLjO9RLownKCa1b4dvuQ77g7oae+M+Q5HgEO01hBwu5MiYBER\nlSLNjuX0E9xtSS3rsmxegKkakFU0/aF5H7qr2oVHrC1IIK7bGsit0mbGXq3z\nzjVS8Xlnj1PSnoIrkE/x1lIGMXHT6fYwd2Dx5TLkpk52rEF5dpySd1/uuVzP\nXi2tDKpvJzvWylRGpWqBrAK+iUnX7MDEEctezG7pOVhNB7Mkf5AGW8RlCvhg\nRKwsestj2XdVJtvavbhoO7Bke3e7hyVVeG2sINQQjnzFbSdefvxOWBFSiPFZ\nfIu3tMOBCFR7JrVUhtsEXbdxNKxIn3dOny1h9hxUsYJTcs5WYi4De430dnAq\n1u0D2LItb+4vUvYJ/LGjLhqqIg1FnYj6HWxXc0Qh2zOkcsbCwcJY0Kjo2DRU\nZeOCltL0ynmgF8LqHuxPUySnRAT7A1UAA6/9VbD2IUWONymM1hv/5TFtk9D8\nMErayz5ul+fgExyoGgo6/2osFwFkvJM2a3Mmi5Lx026r+4yn9Hlb/x+lqqD9\nHFRk\r\n=C5Df\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2SpkJ6lnmTMC7nnzAuFl4olu4eaXy9xfmnWW8HcBGmgIgKUPruFceUvg4ZEiITcqgcVeW/SGkMvfbnnjAJ9Z16Q8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-17ff5d0.0_1553643726868_0.7055329154122103"},"_hasShrinkwrap":false},"0.2.9-2e79686.0":{"name":"graphql-toolkit","version":"0.2.9-2e79686.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"5.6.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2e79686e8f5881ee7648a3bb843063f4107d669c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-2e79686.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-tom1qBuEvzOGQoJa/3TuUwHxp5UhaG1w52Zihn2yWN+Uzvb6BEL8DNGZZLYMunsYqRhIEtBzWl9PYvpgwM11Jw==","shasum":"5e260a0490f208e5c2c51fcf263b8d61fa36a999","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-2e79686.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmxeCCRA9TVsSAnZWagAAJ14P/0GQG6P6GkYHX31q9xig\na1N7lszWVg/3/V9T6kwAU3Zn99igWyNIlVBWO2z5QVcPJr6cWAFUTNA3Zet6\nXsSA4U3xmq8wFY1ScXnHBQPFJ2GGgmEMFS/LCJrW58464z0j23lNr0LGZNOa\nCHvQx8+naqrsu6YE/XDzWipkXngMjF8dO6WdARQODlhflftosexhNFAc8aH+\nRCgvmIuiFKtoqrr+gZr/WvQy9TglFJRe8mx9yPLIHXPeg1z9ZuhE5xYmxdC7\nABXc02FsLs+3qVSe9+ERjt8OisUdUEpxhlI3+8eLMkJg462vw1NdpFsJlRfw\noRmUkJsVsw7rRSgZMikVg3Py/ZohaEE3JtqR/iOtI03arMi5nXcEvb6CpwQR\nTu4bC8tbN/fFKa3SoDyZswu7uaEjwpVlW5+0DIi4bv+qI1ab7S0rHrctrVO2\nW5JSIHezdobRzwSH5anam7FbKpyK0YCiX/7P44Soeo603BKzaTo5zIPmqeAn\nlfmX5l5kq7MeptE8aHASshcHSH6JGJ2q+EnX8b49T7VcAB339VqQK3vMl4zk\n4Db0P5oVKdNPLRWXfmL5RVrWSCPO0tg1/AzKDkYfHuO6wHztQIugTulQMDgi\nDI0r7rY9/eHkkOZRLfQomIwFc9yTqS7b/aRHD9xGIZWZp7BIPyfU9INinS2o\nNQy5\r\n=ZkE4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGltYPLLjFqLyBlxiziaEcCaO4c5+vPedRad9s2AM2OVAiEAuoKe9VZD9N3uGBa1IE4aWvteoINeCOazozaquVbTqsE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-2e79686.0_1553667969533_0.7095586655686148"},"_hasShrinkwrap":false},"0.2.9-c34e87e.0":{"name":"graphql-toolkit","version":"0.2.9-c34e87e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c34e87e5fa98fc5665384fa3b14b8630e9df0a93","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-c34e87e.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-UFWEDoZzTQ0XqckLmYNDeacj+KEs/BDeRAxIxSRP+5/FMxFsQ4Y1OR0HrSOg47oTCYYw+evgqXRc6vwu/vlslg==","shasum":"5b0f0a0424b0a07cbfa403a34d74751810d9ca9e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-c34e87e.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmxeHCRA9TVsSAnZWagAAuJAP/iFbXNXJjWdMOb7xrzAu\n0qQZPcVFKJ8Wcq4AnzAS5pIH0ESYDfseZTZeHt6jEC7khc+B6EPIE8jdDiRP\nNP68hWIr3kV5z4wRX9emTgu1l4MJiTgCevvQ92UsI3FN/5NsKk442+/xfpUr\naHXdzCGpO8W2tChphPEQcdjBEex/Kap/aDTNpneTqAMIcSQX4bNobxQ8iXOA\n4ABxpi1VhzfR1ZSRzJu6+Vx1gvye2pDZQ9TTJhVnzpJi2evcxOOpx2dAe+aG\ngloS4HPcX88j0QezeB8y+m27Zc9FpGo1tP2CUHM/vNBItZtgU9/yTeXxfiFl\nBG0xryw8z9ZSklXw9yrGmzuXe9MDlvDjXVLgfS3YVOqUQjiA8iGFMofeoWu8\ne/3+Y5+pJRj+BqOK8E8gqC12AeVFknGNHqQynB2DWvWCQK6ahYtSKj+bxrDO\n9Fx6lXKQ9FIrfB85aFjrOp+XBp53Y6W+rsvkszavMv6Frsgzf99WXTxPuSbW\nHw/2Lt/yUfCPiNhLfOOTRBtHDOqivpEes00bkz+1vI0fq4oeB/SpXrUESGOY\nitZ5Q4lxLKkb3LZ7TKinkfO6uuX12QsfB3hGUMovbEU19b8FzENIaLeWViia\n2n79a6gkoS/7cun3nQySJmVroqr4VH3QF6/iIKL3rlwSWeKFEKh7h4h2mgDD\nbAtH\r\n=rl73\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICMbJxpMRVerbGFrmW7zBF1h0LRwebh0W+yaeOKetZD9AiBwPbFiOQ+0EIVWNmKK3+j6uCiKD+CToheYxPG8D4k5Fw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-c34e87e.0_1553667974712_0.32398032393321285"},"_hasShrinkwrap":false},"0.2.9-c617bc0.0":{"name":"graphql-toolkit","version":"0.2.9-c617bc0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c617bc0b7e59cfba67e796142aa37faeec74917f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-c617bc0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-xgRTUAVJBIkGpjbjpmdswABa/ktsVGK35TTcg4hjOVExBPpOmmjc4bKEF1rrkVD48FG2lcl9zV68gh2m5pdZiQ==","shasum":"2c67248da507004129a29b926d1dbfd74319912d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-c617bc0.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcm/lOCRA9TVsSAnZWagAAMWYP/jG5uB5Dscj+BRDzzLBY\nMfcRkzmL622zJ8BOKmmOtdoXRFjihGGWNrHq8SXwjKFX1vvyxOkaICb3lsi5\nzkCLlBu/l1JSR2tgI3V0fjweuKGw8WWaxd/KqxHktTIpSMD97dJKYva0j4I2\nnwwgrRVtPakPBp59SSzufn/VUtUFWxEZLXupn7kORuoLBsg5DJn6j3HQj7PW\nkzi1yH53FqU0Nvyt09izVG1zrEonuQiuxqhEf/zEPcBugtFMJ56gG5/EoFxu\n1niO7/Bo5GT5MUWVgNldqklQJUXr14UsEcR+1thk29ayv0a4qTkSDxmSpeu4\nSU2ghbRfAB6LQs1G7cqrWKZ2DmTWuQs/IglvQSL/dfXeEhYS9x1yv8PNXX2f\nhY+QeVUbhNtjKtc9/BDTtOL/kNGhE+ALJRIuCAETFo8f61CqJ0I6djQsiBjE\n+QFaAzy1OWKCoYl9WCjmSSoY0K3/z8vYgdp4Mw1uVOSjxk4oGFHNapDh+lkY\nA29upeKdA4jlOzOP+s7Rj+xC9jCtehtLYx20mK6l94l871X7bx2R2WW83zw4\nYcR9+nqp/vyggV+7L+PRWrxJ2n+2jiS/8+i1/cOR4TsIsO4MPNQAFlpYt42Y\nY+7sz+gUEEp2S5FiNsAQXZB4rmoQFdJLqu623Ux1W2m4W9YoMKgHs48wgRWJ\nsIOS\r\n=4tYL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGoViSqV2PE5SCDI10f+oefHlIfNrbuEbY9k/2F4EHpAiEAkWwBMd678+Bb98RgVppj2ABTAfywjJSLKS8ny+wUXQo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-c617bc0.0_1553725773428_0.9608631427275336"},"_hasShrinkwrap":false},"0.2.9-a384c63.0":{"name":"graphql-toolkit","version":"0.2.9-a384c63.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a384c6338e27352cd08c773876b08ba2db20a1f8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-a384c63.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-jZUgYkIN74ASmqR877dGhB4Imi384mjkz0PBwIoeOPgzslYbW4PFoXpcBfWnOw3UotlBQeOivVoVR8c0RwZzmg==","shasum":"2ec31801af2a2920a5599ff3967f5625dc100b96","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-a384c63.0.tgz","fileCount":250,"unpackedSize":262989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnXO/CRA9TVsSAnZWagAA2NsQAI21LPp9RQtDKBKzyWPE\nKbyG5q6JyOVs/l4hLZJmql5tmfAgoCtQLkT59CTa08wqAhisHRmMJNLIa6Sg\nNalrY1+1GMvcUI1c+F+NWJXahK6KebPPAuqAmZQRc8SlClMeIQBj3G0+AX3o\n3v7SzV/9GUrJs2Of5wLh+dcl6dauqDlnPvXwSi00jaBFafAYs8iM5nWxkOOG\nvbaWCGejzbrIoUWFhrn/aRIJ856iEads3T9Zr9SequJdeuayPSDOdutcnjyf\n/nG8L8oCywl4mHO5FO8S2WYJO0uG6nYr+RO/yFQlQuo/iK36sY1Z3LwtoGxf\n9HNbA3gsB9F1k/xiUua1v6777cNK2LWaIAlGSulfLxga9VqDrGz7myeIjAl3\n2Of4kxfA1zdwxv8pmJ2T4gKS+iNXwxSSr6zv7VjNHmBjjrn9YUpJPzADU0aK\nx5QPluaMjwkiZru9+5sv3RtyrFA6kT8Gnay1o3jrM90NBR7FzKE6xI/2aInY\nJ8sYw/B67Ybl6mcKn1GssK4EuJjIH38mmdElWP5W26SZ0SaKWhELqtI6697z\nFpuG2zfO9+h0nNq6JMwTqsR8DnNcB1V9UrVRmiUgj8PjJ+JIY60rG34LC8WT\nhVwJDtijmA22SxzcrOeJGBsdY9a+WxgVuZ02SS6di+DYTalqcr4X+XDHBeY3\nig4b\r\n=WHFu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAs4ZoYv+QvKigm0HtBA+hz2w+1Gl+rKJC1954ui6m9ZAiAEY4B/O/ABiWzY84NQxzzrgyLThabdLfV7lvMpeCXt9g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-a384c63.0_1553822654014_0.6416435741959157"},"_hasShrinkwrap":false},"0.2.9-be674d4.0":{"name":"graphql-toolkit","version":"0.2.9-be674d4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"be674d4f6aa1e738ed4dd313b4d34d2184a2ff46","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-be674d4.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Eih8JytkU2v6gQzOSFt3NHArO1bgYioo4yWeI59XAhXS4HC6ig1HS8dxa+eN0uPXRGrE4YonqwsToEzDMIIKcA==","shasum":"58e9d35c9d8d6a0794b58149848fcf6cbff6f120","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-be674d4.0.tgz","fileCount":251,"unpackedSize":277368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcne35CRA9TVsSAnZWagAApZUQAILHw7PZkECtPBgenohO\nvlJKNZ/hzMEL9mJoUkRNHLwAgN3p6TMjn4uv1tjrIJDgYsYAFxvDR3lPf4HU\nA7a2O+T70mCkNCtbXWsoc5ssADNtsprX40ogN/diJBw4RdKMwmnPkkAIUxwf\n9BQxb82rmEmYlfl3YJiIS87Ec1xfaSmIkCppSv1goagU0qA1WjW//5zbJhpW\nl6TtNyQMqKoAI7l9T0LOlKU6HFYt3cyQQCuTx+SrXW8iK6qr2XpnUrPeg9Ok\nMBUJOkOtwu3Ntj6KCnd8YXb7RRI+4TSg1fBGJy1oYG87DNVhP7BfOId/Fp1A\nFNrvkWMifto3N+kTj4rgWmZUgut6SxCT7LJ2wgQks/szjQOpE2xec8OoX4pN\nnFhgOdAuPjCCTd4acgtqOehuFbjf9W1SIzariOUGzt6tWtAYRmIaIKTxQLQ8\nwMK01vCFG5/jrbOKerY7usK3ofiDyTPCzSlGkK2sREx/wISiqdeuiBiwWUWv\njtOnbDilkuNo4xKkBR8yaAhYLRPz9+rD+Szrm1MW/iLOIcvJhwRbNvPMJSBg\nynKc5PMTjKOCZBDuL9VkZEPKz4MfL0djFxtNnSIMdJQTPQahgUTtzv+SUW9S\nNl8vXqh1d62JxEYdEX7VQ3pyYSqIOuLDQ9e8RtqtZ2qsZSfi+Zb9bphne54+\nzo9Y\r\n=5Caa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZSi5Lq2pHaRo4OmvivEdTpmQ6MjAFSTLRMsMHfiasCwIhAJoV5mJ+ZgH0QtVozlrNCxQj8r6E/R/EKwvRz+dGCmXL"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-be674d4.0_1553853944985_0.7907316265565503"},"_hasShrinkwrap":false},"0.2.9-9d1fb73.0":{"name":"graphql-toolkit","version":"0.2.9-9d1fb73.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tools":"4.0.4","graphql-tag-pluck":"0.8.0","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9d1fb73ae7f83c9b35e5233fc085561b932cc00d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-9d1fb73.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-27n5YCj/NVGhohoBbZfZeA2dWuhVq3TSWgDXFuq4gneSkdbXv8mzGufl+h5dOxpE52BSZTVjTSS9n437QK0LDQ==","shasum":"22872cc39482aac7a8fe42fd32b84a9121241518","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-9d1fb73.0.tgz","fileCount":250,"unpackedSize":280725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnfk2CRA9TVsSAnZWagAAxKcQAIkmC3tA++7an9W9fBGr\neZuhNK4iCBnSA7KbU30vPMgWhU+fhcPgr+u01RKaCdffGnwDQYQglzrZnEvU\nC9ziViGVA6WibpW3LaLORL9SsIFMfe7p49AvElwb5xdLN4WgV3FtxtiFbaZs\n31b9Lwn5qLPInh235OcyyFaYFlGpyXcwfrYw5rtJireQ1V0W3PeryapdoRKX\nyEEHH+4r0omWzQcBlsR21ZKcVEX+OfKLAy/tfuWPuns/j1gaGX+nFjNy8j83\nzsyD1psM9KKGLXEiiTVlrrUwsfqP+os9GsfxObvOaLYd9H3JhjtVKGkcrtoH\nsj2cwhzbU6coVXZVuWRoF9aad+VECz/7T0TQe5wDvIemplDkC80erYlCxe7J\n1J+FKZPUyKOSIR8G0whzaRhWl/AIpy7XYHfhCXlCaL+Kc8MBBr1KZ974vcJn\neN9i0oAsB0NnB9xhGYy166+lCegQRlBhVZRfzUc0q95BmRj1PBFPVAU1mffI\nCHit5KM5+tG8pnCA+YLd7bBPRFiUMppsnSkzb/rVH26z1zttjbx+Q4ksSv4C\nZw/QFFrtUWCDjTKOmf8dAaJ3IXnZOxgbUxPx48BnDIn5gEsLJApTCdl4OWqB\nLPHhIlBSUmLeJfaT/HwTZAgWCTjPRkOkHiUILQGe9EI5O6AlMCEgkqPSQB0y\neKDg\r\n=s43d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxOF+4C37qLENloXzPnbCjdcCpA7uqmziBzz63o4VcFQIgVunk4YPzXoXM0lww5BhkGMInvLy0bhDeDlrPXCVjYA8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-9d1fb73.0_1553856821848_0.5823329614154249"},"_hasShrinkwrap":false},"0.2.9-86ee21f.0":{"name":"graphql-toolkit","version":"0.2.9-86ee21f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"86ee21f25023d77c5c72eea2eb2bb6f406238a98","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9-86ee21f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-zwS7ruEhehie23GqYdq45xEMqWUqqI46Ttrmk/QTvNAZz0AP/seZK5ItLJxzPt7FeQUIR82Gow7ewTV43LFA1g==","shasum":"e9a82092737c2758e8c4a2aa292ab6bbd33bceb5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9-86ee21f.0.tgz","fileCount":251,"unpackedSize":295104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnf2FCRA9TVsSAnZWagAANCwQAJiwXXEDGqtKD4ekrdOL\nq3qtwq7QVcsc2zs68TBMIt/ZApNM/TxAVBSSp9Mdo8bLj+OOPK9KzCRCKynR\nZTkoTRKQj78YNz1l93Z/Fmv183R1DTeWHUyqsF/Jvy1KVJsnvZuotMEmlK3x\nIxHJQugTnt6yKAXKBJ+82SZMKG33u7zMTpAOPEnZgEQzSugwrVt+Az8wow9m\nRzoLpZLOEyv2nI8r+OJeSG+jmzQFEHpebSMvFIlgcv1jTV9PqTjvX4V1Qx5f\nU2L68/5eYY/xp5xbZxk1Ns8N5g8ypny0pL9I1eLhJGcU5EVVjF5LpCNY8Kon\nd6F0x8lTnv43NASIYfop/pSqZH6bKlN2d/Lv6P/kLDYUWGvfAeNBwJAZmfec\ncUVBj09Aiib2PQaCuFXMkavUYMl0eMbljrKLyu8iMNqeNr8TluRz9Wpyvr0S\nWXWBrm6WNQRbLKHLQ59CD2bHDHKGEoCdjKNNgXPgUz+0MJh864xRT9H2A5rN\nFjJuiTJN15d4k/24GSnJgZuyc6Jb/wPo6WBYCjCg4Xzrnke94hgAfGH5KUE0\ndPqL/ALPcfpmityOasNNpo6He2zXGwmMwB8i4TyCSQRocm2CxbWUH5d4JXmj\nMYbmkR4Qvxc7lwp3QzRzBbM9utVJ7Upyj0NV5CptahUGs5c9NwG+xjmxTXX+\n2Xvw\r\n=Kijt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGvexJHQcNPIIbXeRth0X1tQj+CZiQOM3zmAleA7kzrqAiAx39Hd2N3Wi6BL2ZBnWK483TFx8MGWZjh2xnJ1O/lveQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9-86ee21f.0_1553857924356_0.0911535681637421"},"_hasShrinkwrap":false},"0.2.9":{"name":"graphql-toolkit","version":"0.2.9","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"86ee21f25023d77c5c72eea2eb2bb6f406238a98","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.9","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ALojfCMRYb+o/kbHmnhf8Fa6QMS9I223us5jb1jxQc5n4/StYpPQDhVqb8WeAp8OA68D6k1Zxtz2uLyutR9KAw==","shasum":"d8b2c3a37feee4fc6424139d1ca97366ff23bdad","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.9.tgz","fileCount":267,"unpackedSize":302719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnf4tCRA9TVsSAnZWagAAZCoP/2s6NucCEQPnrftJYdmM\n3+O+XaEey0eGb/0K+Hmn+K8/ANMtBrBDAzNeGFXKUAcp6D8NmKFfPjuxus9T\nF9E/0hi00scVZcL6q4w0oKSE/Cl5mieDhAm+eY26RhYllQIJeP8MKXeHodw7\nHuzi3OJrk4y932wp3FhL9s6wHE13SQqJVMUFzmLwMIljw5goxLy1DBGGFfz1\n04SQXB4IygjOsAHNcJI6y1E+ObmX6EQhrxmxE7EoDRx4oufxnHPI613xO5BS\nVHjBxnC2XchXxbD+wGX3K6TccN1jolhFOAL8mr2k0KungvPfnm2leJNjx6Kc\neUdvajM51iBN08rQKJQsjXaOd39uPUx605fj9zAveSLi+fJXm54zun7g7vzn\nNHlIL6TZIY7vYYAVzb0XryPkAkKF7i2yMamQ5ktsYDx+35w09BA6i+q0n+Ta\nchRIk84hddK0BCgoyVpuwuACzF31yI1rcIDgKmkvWRv8GnPgr/2ibywOqZ6G\nm6MCSBOqU0w+dahEEoZ+syrQRpA8+Oy8dzcyJNUR1EpKt/2h5JyrgebaZukQ\nfIB6kt84uH8yGxRCtCN0ZGaj8hQdMyDy5cUKiJNGe7T8l53jEfKeKuKah9R9\nx+AGQITPDD7dNMh0qgQpS4sREdH0JCNBFKFpZQP95VeuXIePFdKXuy/EZ//c\n7/Ux\r\n=odV7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD51oaygudz9ELreXc7vCV015BtxsUNAAYJIplMSwGbcwIhANwVOaajXseFxbzIc9EpouxZZ4cOSbhrSVWeSEDYWNHg"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.9_1553858092370_0.4204071579694131"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.10-233ead1.0":{"name":"graphql-toolkit","version":"0.2.10-233ead1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"233ead1932bd390a49240cf607df7a1892cc68d9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-233ead1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-2slIpmPnkMfRqrvTPxZt6iR/WXyJ90BVd78J/hT2RtzSLii6P4I95HZ2A3ugpc72zXuIAVAe/GIjKuKyBYGudg==","shasum":"bc1c8c660d402f7976b50d333033cd468e17c5e5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-233ead1.0.tgz","fileCount":251,"unpackedSize":295243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnf5+CRA9TVsSAnZWagAAtUcP/il39Is4Yta3Vi9sE7oU\nymyck55fOC5yNXUUFoGEkOiInwTkjNxQrFRMhbRLkrR8n+V6JqewjkpNABj4\n09wSHjbFgH5GziwXpu3bn80HoZwPBqayC4scwIZXXDFnxLvQ/Z3sUv+/DQEs\nlgN+d3VaT4+DOFWo7Djfb6a+6AU6km6SoUWYFg8IPRFRa3sbz6Wmp0PayU7U\n1w14NxH8N+dST6IaHzk3qzyI4cEnWdC5mTKsOju59W+AS2skDBFDbr+OeJzj\ntJ9Hue/mwAYlGNjY4E5j3MhPc4K8g5fNK8jsJbwZLOfo+dFCHOeNDMKWTzCO\nmxNF6dW5uFYLjsG0Utk+IS84o4wmKEyOhT9jXXyxeuuql/EP6asVqFRuQ6VY\nS6a8vlkF3ShaWAEv6DCP0obHak7VjWo3NRCCHRjIez4F5nj6gXhDcXcYGn0o\nxrtjaMUF4Ri5GRx9cGpqmFCQUerBVhVI6vTIxXjJ8JI1svDSOqxDoOr/fiin\nQFLqnUZ3Dd6MEZyZXKmVABVDFcZ/pqNbE0fPztHFG9i+aLNflSKrfec36v1E\nz74tlQalCj1lwjUTaXA71CdwBe7vJ6t9MFwiFRRELYWeIiW3MdOuAMXqc5sp\noI3IfNYomRGK+M9aZSZJPZ6+eqxIXJh6UZYB9lPXyA7ViM8g+vGr7vTAlF+0\ngO4M\r\n=bBV1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCosErNdsiBqhBrOtvj81ZDOXDLgKJSyjX7kRASCb11fgIgCq2mICSsKg6POaBFL9Jd+/HYPzzLqhzxJgovy0Gt6iU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-233ead1.0_1553858173359_0.601578903195412"},"_hasShrinkwrap":false},"0.2.10-75043e9.0":{"name":"graphql-toolkit","version":"0.2.10-75043e9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"75043e9d6ae24a49aa5c8446ead23702c2efa867","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-75043e9.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-usEoOcTvqL3KiAzF2XrbogOcZ8Xc+CizVe2JcrqahJsgx5fQ8t6qAhzecW3VqmoU4f2JQugKVyXRFEGNsQOqrw==","shasum":"be4dc25c42f6369cdf86c65674e0d0870f2df5f8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-75043e9.0.tgz","fileCount":251,"unpackedSize":295243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnhEmCRA9TVsSAnZWagAAVEkP/02OYySgAGBmfv2oEkv9\nCjWBbFMr7ONpQZUg6Kmt4nyY7qDAAkiy0C76BlI7vxHeteJZbVNx9FYjMiMw\na37b85rSEeXrt3Zj8xyPsAnTJfqkg3EVq/W84r7Y0ieKOXqmD6WCv8K1i/zY\ne1ScIe1DRzlil/oo7UsrRdFlvsDlOT3iCjY4Yw7kwfbC57/d6kUA3yx8Fl+W\nkgoG5ccX3sGxpyjHb+Pc1rDowKuWyetRY0XVgxFifknM11HVll4/ANcatG/+\ne9bNRWEOeifp99r2APuJ0HlzdcBsCtMqN0NDGxXVucSkGA5YrsDNkq1j8zZK\n6F2D1OlH6sHSbOMpOLAM5o7lMuBICNqq23IptuHJezu4m+uusCbaz2w2XQLQ\nENPDZMrXZMiSHzMKCCHeBn3NiE8K+3VVSmFgMdqnSYWrlpIZiKNxI+qLUtoG\ncjd7p5jRFRgBLvvHeBeyLyxCSirN7aYYQNAtlK0zeQLRsfuHxsVHjhh9I5WZ\nzQp+LiysjG14Z5nqc9gUOW4ruxFukht2SY5dsOR5+M0vwzxngpVE+7HAe5zR\nSgc8lkMzlloLf0rmBLOSyaO59TA3Y2j74r7E2bBKiLtCFjmR7ubddPy7MmfG\nT1w3xc1CUjbYcawinOEPCWyiYMljqtTL+ugyQ+v7qXMoewXXE9PhC6/t/ZYi\norGZ\r\n=lEig\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxxhDqm7hH2WHJIXJW/pb4eDSTdsoLSmWRbRs5if9i8AIhAKxNnJ2kPP3ylPBqCxptQIJ8TcVG205XCA+MazKt1VnB"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-75043e9.0_1553862949949_0.12536921410335644"},"_hasShrinkwrap":false},"0.2.10-dbff0c4.0":{"name":"graphql-toolkit","version":"0.2.10-dbff0c4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"dbff0c4194324c09977822db65acbf88b3d4eac0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-dbff0c4.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-NVfNlcgItBP/Tw4fgcqXLAVvSiun+Ri+uiR75FfUHsWfJ2Qx2prLCuSmzVe1V8kG4MoE5h35dWquY1dZcowMMQ==","shasum":"6fc2435fba86d5d8e8bf76b02a1504f39cdaf56b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-dbff0c4.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnlpPCRA9TVsSAnZWagAAvPUP/AxcLJoZW99T4VbSB6nK\n3PAy97up94aiLf8Oi6Y2um+jQoxfLxHfXjqgkPeG2GMaqu19VIUdBq24EPks\nvkR2Buwc0qYX24tx/hBMQ2JAH/t4a7dsrHeX63BjXEVvi8hUaSxc7g7lF8Mx\naHTvSlQFa1tDxI0fk3omqHxFU7bk6C3Gs+fH714p3UNS2EFP8ro/hqBJzjVp\nQGWXJwckB3tr6dSziOmE79tijegvznd9Tq4Tq6+LyDj7PwrGGb7BnxYYq+eG\nj9mhExvLFB2qLbcVkgmn1CeYutshrag2HEp3AVf77hfmygVlapod7fr9UlC8\nWv7XTo8NRzG5Xa0q7dxJ4uDSVLZvBP/1R4vUbAHamPGCVSd6V9h2lY9yDx5A\n8su5cwESoXo0AVuGCbOsjmrmdwbRX3yWwjwre8Fuy5SWgMPlSfT1j6471wAM\nLyjFau4R0HNzw2i0xtQGKgt0+04GGAGJ4C9hYdDpI/Uvr0jWikntwOQShwYp\n5Tpz5av2nRyfKKwHD+ZTqJP/C9u12lf5gO2ZSLp0VpZlwxllWQWZPC74zCI8\nDbQHtITTM0SgomNbnI3rGuJGVtfrPLTtVVimzALjC0RUtCt+HRZFXpj+dsMx\nkwxJmjyJuix0fO8ntaHm3QANLHFHLMd533LL0mXjvA65DILdTdV4ZQ3jU677\n4A9b\r\n=Kp6p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsTgJ22hMC180v3cNyrno09jbNNotnrddXoP/GfJF2OQIgTXSJpQ3Mi5nZpSQHEWDmSOax1VlmgqZCFocPt0TgwuQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-dbff0c4.0_1553881679183_0.7381879294806062"},"_hasShrinkwrap":false},"0.2.10-8667770.0":{"name":"graphql-toolkit","version":"0.2.10-8667770.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.3.4000"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"866777016269c76a9926623f034806a0c4ea34f8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-8667770.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-iK/HyL1U83wjBIL/98qBOdRA0UbrNyTfqUJ4V7G/ELaMkEfDXeQHTYqzlZ7V2cmpqBCbyCyOhuVZNvKfmIO9ew==","shasum":"97ceaffb33688bdb41266b06d42926f05c872b4e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-8667770.0.tgz","fileCount":251,"unpackedSize":295243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnmR1CRA9TVsSAnZWagAAGoMP/RBk+YgSxcVDXU43a+vR\nHn2Sh4KGh5TZQCrBG7M687Nab6O0hhXcYh/ohgGrh0/bS4P/ZzOZbqGNdF0a\nMuHurH3S6QLm9W7K8hok+nM5US2MY86cnpy0sPr0U6Ntjd+9HRGPTdq4fD+L\nejGvWvm1sjl7ffbxMdW9sfQEL0E/IuEWgnvxe/yUFgRG6rNdMCoRxiMInk+d\n0GlxGqf/rms7QWKxD18To0cgCJrkWXcsc2X+o/E4gEawMVO8i4XOoY9ykA1F\n+H2pyHO+OwihRUK6FWy+sL0vdHhD0SzPPq8Jdiyr1dktprIw4hhee+fDO+SG\nz/v6uIa2ksMqoiUmpiUklNz5VELxH7JTsdUMpAlVKqU2X3w49CBAZ1VKbfx2\nrWrinyvixBL8dqlNMw0NCJRzbDsPGlGM5BkFSUC71qUkXDYXU3sa7QLLfKHn\nz0xGbZlbPoMMfyG8x+2U/k68V+NKAb3hOdAtz4ckA5UucjcTQD5JFjrC+etW\nAuj+APFFfVydfa28n7RDL4OAbSgl+OtpbpXi0NtFTFnERXIMzpRGohC4QGaA\n7ZjRvb9gYAiWMVNC3hfr3GXk1dEwlqsRhQ+H/qkTDDQ0geaAwro+H2yw8R0i\n4L4OAbLEk1f0XnRFtw5CY1LP9YcRpuUBDZ98AJHXa8sz+DCZzzYI+sj9StCf\njwN9\r\n=J+gX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKXXxHSU+YcC5FjZAklqodP7xHeVPNw5QX4TFxmJV7bwIhAKdvX1peRrPYR7IXh3rJRSZ4cQvCyaA6YdCCLtjCThCx"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-8667770.0_1553884276593_0.4778263128663103"},"_hasShrinkwrap":false},"0.2.10-9e197c4.0":{"name":"graphql-toolkit","version":"0.2.10-9e197c4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9e197c4596ab3d47d84ae4d1a0f1651d817e9bfb","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-9e197c4.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Mw825M9K6phsuHAfK2DmS+pcTL8PSqXgr6SmEkovASLY3p3eyimJwMPr6po1GMKqQbshi0EQ/PbB198WPF6l/Q==","shasum":"c678f5cecef7733f767a89a3d667a2c3826106dc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-9e197c4.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnmw0CRA9TVsSAnZWagAApQQQAJZ5qWxSyGLpMnutayjk\nchUbfNgcl/qEcoYSCYfjwHqyFr5RyANadlaL7IeC3uFIFbUbeGh/6vcO2u5L\nhe9EnarilfnjDQhZNcXAy1iSbITNCm8nU7xzIIqlFe0RSG2qB5bNhC4TUWKQ\nx0Sy7dYyobfpdUvtJx5TZx/Yq2/pg3qMoCwjPqCQJddruU+ebQhTKQeBm5un\n6NLA3FDGKL5XjU/3t067ElyVUeXpfp2XjnbORO/ywhZLdEY2aROwxjVF10aw\nCJDujcLg5YIP4FghfF703Ep/YzkNJ7GJTpOYrDWOes4UjjoZajOCWCSl+Ujp\nAEfrSZ8dBOlWpNT0KFwGb1RP3/8PPFKEFz+yZP8AdMS/7DUlEPDcJjLGxRel\n/2vStbGfprkIfpSdo2SSTp+U1XR1qb5FZZAr8pwsogU1JnZ1gst/OFPmKjE/\njFsZBfH0cwyzyEcpsrJEB/VwQy4BpswE4l0P9/iQNmRdEO3RTkYsS6z7TiPR\nA8PoxAftN5MspWKHeg/CKyb6f4VHe5D2HfzBov6q2IRHaaVuykzEWl8yGQ05\n/L8QwxuayOf6z1I68LnR89/ZbFJqqS9LLZFabUeN44AidIM6wD/aYEOj1l4V\nLOq6dppAgF40ZYXj4Pmi0TjyFue55kzx4qOln6p1E0UEfqtKx0IzFpwrmz+J\nxF8M\r\n=aWGQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE8/cb+hOSUno1tHxseeZW0LjQJnp1AJ9QlKHcm74uT4AiEAyXEB5zVKsszrI3Wk9VNIkJA9MvPf9mfjzgKyDqzQlfY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-9e197c4.0_1553886259922_0.9820297497953401"},"_hasShrinkwrap":false},"0.2.10-e36de18.0":{"name":"graphql-toolkit","version":"0.2.10-e36de18.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e36de18fb2d50654cdcf10f83f4730f85bfbee2c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-e36de18.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ZyrndLHMnK4hfE7442zbR0TtWeG7Lj/sbbbc1Kadx3vVTzHL6zKj2YXXBT+XZsEJ5dMrQPETcAjyEHasuCFbFQ==","shasum":"8d5f4e09f3b3a9543fca77824181413e3a02ae18","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-e36de18.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcn3YjCRA9TVsSAnZWagAALXkP/15u9zxHaVwUilQ4KmhF\nE6/y7q14HZ7rRk/zWgfZuA9fFq8MGqKLNL9w2IZwXwdk59ExbVNsUoRt1I7U\nUcEqcsSVfIhSgukZiTdjIhh3jIkDCndxB5zyP+Tsq5752LGu5YkAKvzeUk57\nU0MXWbSJplAPzfCSeeqLq2u68i2RLt3kEtugEqui5pwNGnCN+rAJA6dcAhGX\niZ+BQPC57uaJqXHsxZhvhkEKJOWabY5CjL+42DPPOHtUl1RPOedhxm920P5h\nxYud7kYncpKPXIeLXV+jjFaqUbWphahLK7RUjFei8fnccfMKxo00hUXUIhMl\n32eFnphe78HgM93oSuIuYM6LoHHHUDw9oDyEnAv1woCTOIPRGPDUYHk6QisA\n6ZD/FFW9YDHGqSRJcROwDCYKZqSq4hxLoosLYmqQ78fa/8/tc6AxRoleRbNC\nYC2Tm6tuionGL3oY660eFM9PKfXriAsXjB8r6lxwa4dn/LsU4Hmi4Q4WcMf3\ntLDdVbjB5WnC4H1bgZr8Nv577BuxeV8Y7OA90MnuTYv5FTXN21GHCsMVPnfj\nRU9AXZRQDUMYcZdICtiuzmwWmUK+1CFQlIaCQtBMzYQRuoPzuiT4qmqi0iHk\nRSmWGf7u0LelDtxyN/yqyuwKkwaQZI8yAbsXXQBkxaBlCbuGLpiRaEWzno9s\nP1Mn\r\n=2OZZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGzhbhJR+2+k/xQxKzCRwC5xc+PW0/5kFqPI6GAC81jXAiBgAMLWhao2cusH6ZSvmKXMhCtiOqX5WUYW00P7tar5qg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-e36de18.0_1553954338867_0.03849775489355389"},"_hasShrinkwrap":false},"0.2.10-a5ee441.0":{"name":"graphql-toolkit","version":"0.2.10-a5ee441.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.5.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a5ee441cbfdd2011908c78bed598276f8d4f306f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-a5ee441.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-kbNIBzczA+AzhhmgIJkUJj3lwwJv04lbIRpMzlJvF4rGPzRiLllGqg1Ayu6tVrlZPKXq4FFtJiA/zUGUUWsP6A==","shasum":"1f7ce068c90f67bdc8eed987edaf796636434fec","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-a5ee441.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoLDECRA9TVsSAnZWagAA9QAP/A8AWbCwFlI1UgbyhhOA\nqDG3Fj3S09Rj3cxxDBvMRQTCneASx/7TD+z/MnxSfWF5/wq6JrQir5YEvb/J\nCCpfnLhlhlO3XqloorUDvFZjMr53k4ZlOKXiQMl7740BrIM9YyYXzvdgOPmv\nf5fjbkNoCUsQzLr3R3t36fjiKnhaK1hxYRhlaLNR6AGVuxGCVEYQ+sR+Iaqa\nnXENNZ+A8XHcm9mKuzIz10jJ2GCzMtj4YOdKavrcOOAS8sb8s9+plIT9gkK1\nuF0LOSZxenUwIMMksQ9oaBVsjRVtkuIrg1YIr5opubANSjU8r4SX4xuFYBGl\nvtCsZgkUIJPucoqo/e4VKroPY1IQHWjiMYT5RkASZkCndm6LYlxssXZQmAIb\nICnuP5SmFNEi82WDMACke3vNn3W0N0hPXFdEURmOWG9GQja/6ah8LpGN7E8i\nGsLVLU1TXVBJMtAR08BoFuDBiVEKpwCFOqcQ5rzq1D3oIXuRUbEpHHO4btP0\nk+nlRG9RJ1Zgss365HgdeF00KHp2ZcPf6W4q2wFhrgku3D+/L5Viq0RYzzwe\nUKZHbdb9f1t/uhEZQW/obH9L77gi+3y8PRONXrccpWfKuerXTNPLr7g84iGY\nGyYqDmTsOSLaYqGVGr4H5jmnhDh+V+DITWKV6PhbrpJs/g4j69azlLLdj3lm\nGOQh\r\n=ySsz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEo2EyOFciU/w3sxvSLH3NGIEVGuDPtYhPYpgoU+oj8QIhALwOgRSCBJUacJzGdr5r8g2nVGpv58jO8GVQYDS/7P/I"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-a5ee441.0_1554034883425_0.046859529922047116"},"_hasShrinkwrap":false},"0.2.10-cd15133.0":{"name":"graphql-toolkit","version":"0.2.10-cd15133.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.6.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"cd15133a869c88bdcbefd7640584b43f164b8819","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-cd15133.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-w1VxcNUvUVnW1rrnyyKHfmZPa3JHT4YUiu56q5aiUEVutcUjV/1j5qdohs75xZoUk+9zxGU8KNIhKyREgIirPQ==","shasum":"d5ee3119ffe0e8dd496d3c13dc45a05cc3fba224","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-cd15133.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcopYiCRA9TVsSAnZWagAA3HMP/3MstCHc1xXaO44p+R47\ns4fpjILSRY1h+VSinJZrAJI5k1iX9iwvXGwh5ZdTCgIz84IPZMtYJQnHggIZ\n8Vty9qt5H4oLsQ6jiHddNl3vyuZqxGfCdOYcYf09fkxFeaaY7mPxYX+16VN0\nCpSazyfiZmcHlV0BA+rluXV2wX5f1Om9HIE60LzCNYBo3Bc5IrhMx5qDLBzs\nI1BuZaVoLISeGDx1PAMjYnatH+4/VGnRxngAsIF1bTIKfQABdo10TB50Bt4Q\nDfS2mgI/SYLoLptE/C6lAw733x6EzL2nDopJ7mnDtnbxXLYNEO/vbSDHR66c\nFRQAq4Edu2dxIODdOoCqfM6ZXPPKH8FQglrFvSMB3J0MTGcTOpB4kAgq14Ob\nbk9AzGhhOiDMWSoV7xzzZ6K47Nei68MVI09Ch5zZz8pPiDx11fMjmRCVhdCC\nOe2br8+0ttveMqF7qfLGa5sVq1mKEWoz6aZ69cEb+ORk0J434ImNDX+nIgzC\nYnnbyghO7IUK7+LZn9BM38AYAZ9mp9aFBpjJFteNmzJTsHOXxdvHCsFf+B4l\nsFE63k7eagh+fkREpbOEjTHlehxocDuFQdK4snyHAodPhCaqQA4ryPUgIrKn\nO7uaSIMM+QiVqB67RSbggBM9YADy+SXia4XOVAWnAy6smyckmeGhJko4kcCQ\niQQj\r\n=vu5T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/WoiQCupjLebbxC9Xpv0NkoZOU03Ahi8p2IO1MhQqrQIhAKOaZcRkilady/kGybbkgq8KR+3AGEVy3vrCKGBhSWxo"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-cd15133.0_1554159137832_0.1575651163073155"},"_hasShrinkwrap":false},"0.2.10-4e97a00.0":{"name":"graphql-toolkit","version":"0.2.10-4e97a00.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.6.0","semver":"6.0.0","ts-jest":"24.0.0","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4e97a00ecd9b09e77437e098d774379eeebf0869","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-4e97a00.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-MzId8cc0UoWOv4rH/TXtE/+POtdPGSVgxyJMzeX+o5M7rm+OrpCO3mqVaAKFXIT7GFLmpnFGAp6nyoowJYGGyg==","shasum":"deea3a31de45e64cde4d4835b90c0206b26caf35","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-4e97a00.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcovKRCRA9TVsSAnZWagAALkIP/3JJb2nJKHZJsqiZ4dIH\nWwQ6z363NusLOu+xpwr6Fh9QtREd6We4q4zKwQlu2pLsqSSrkzqgX/sCLOTk\noYW0IqRDPQuw7/mCHm57OqyllveE2X1ZDtJUJ2tEkdxtJ6nsqUGrH8Y8tas1\nRFicn6W28sEM2LVN1RRsZA0GUcfiBFSolkURSKmkvCqpTGxrNjBz6leGmHnj\nA8cCiMdMazgDHuX7aM1pNuOw4wLX26IKtJgPuFZRausD6KL5S7vn+4QRXxgx\nKIg0f/kYUYlEa4xnpbZA44s1A1F/nXoQfkBjgx+GJH3d0TdfeEIZ7eu+z4JG\nmeUuZhX4ElPuiN5F5GE0tBYwmcjE92P0CsVg2iiKXgq4nu5LSQREB3R2Ur+7\n0ax8mY8ztPjZ4soMqsDDAiUy91o3XVQSAyRRDUEVTqCOT+nuLLzhiALH3nGV\niiU3etdGHr9AqZG99yQH6Qstvb4F06vALc69VWZT0ZGF8lo15z1JqIOCFVBF\n3O4TmpvwV7qZxm2xOp0+9mplLTzC5KA2gEuVxwJGHXLNC8EIG/ZM9olrK2NM\nEmgrBi4T4cOrK7Vm+IpRdfz2DPfKnoE59JiImkp14BLbR5LbXD6VrEicbH0V\nfFjzZiodGfl67rXIi0U2XzgGWn7fGq1tXaGJMmIDDD0WaLlVtGCs3dB9zMyU\nDHwt\r\n=LspA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCII4a6+5b6wni/ZyDbDXKuwGTtUHCiBRFO1ZH1HyaxpwIgH3RvQ5Yjv9FQdL45vV5WCH5CziCoAfFsduVw5L+4xBE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-4e97a00.0_1554182800945_0.7872033767700477"},"_hasShrinkwrap":false},"0.2.10-8b8f644.0":{"name":"graphql-toolkit","version":"0.2.10-8b8f644.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.0.7","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.0","graphql-tag":"2.10.1","jest":"24.6.0","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8b8f6442445a104b226496ecc82d239c52ed1595","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-8b8f644.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-9QVBzddUgRcCH5MJkl9y4y6DzPVwI5RMseWA/kFsjoodaZKDM9coF2PY7udSer/kljqcRbflCBSlBTtGBXt7qA==","shasum":"b46eb7ed17e0619481953f45e9fdd370236185bd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-8b8f644.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcovLDCRA9TVsSAnZWagAAoBEP/1aN5YGQ1UflS0qrQtNE\nVKmvcLVqRJFxGtfz++mxM6pfGQfP829Sqh8+66ka6xYqfdUHUBt0nMa7dd35\nhsWmQBjF/0v7amzz89lD6kWmQXvbXMTh4qRsyTf4rYNBF78z07ZTLh2FN7Ga\nOYhdtas5GTkMHIpws1mMHKKYRq93p4fEaydtwt97m9fJDJNZAu51Le+81rsk\n8Wjzl/cE4qoNmYNRj7eAUc73gbiKQF23kt5bZks04dsx5NkMw1EL5zkO2RDJ\n1xhpsb/V0OWSVTB3CXu670xEFQvYZiMmxcKQmKIRVymyXmGnnJ+NcYQ8Pe6u\nAKQyElAAPSv+Vn0gFi4pnSRNSr2TvjQXQ08mzx3z+4ibuFy+c/rN5oBWGspA\n2YZncZ+4u2Dn1ysI/o4YCIY+k73V8KIYCwUF7UQas0IhWAGSDr1t2luEsRp1\nkKFbCoOHz7T0EkqEvYmJyZZlE3bzw55Z8IboGcPqKJJf551QJHW+uDvnwVPC\na579Q3h9tU+oV0ByDI/esKM3VDd4LO4mVESbY01XJtzuyWWDhSDmx0HwaD1I\neX7ytNeNLTvLLMCGnmhNpiIdEv8JwOOXECxGaHX7cxWim8Wrg5NHuJfo7FTM\n3oNrFO+iSDiZRjTKtEIILT8H+YelxbFPtKKk5b0DHUvxniKqzACnNaUSEq/I\nyrWY\r\n=2EMQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDv7WVVxXCneH8Iiuw2vy4eUF+IqB9pwYUzvygeeVbdrgIhAMptmKiPUIFR1aewm54mJgz7jMpt0Vkure3ZdIXCNy5J"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-8b8f644.0_1554182850285_0.475072607172603"},"_hasShrinkwrap":false},"0.2.10-b2aa5ed.0":{"name":"graphql-toolkit","version":"0.2.10-b2aa5ed.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.0","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.6.0","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.0","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b2aa5ed7c46f3d43f51a57e808d4226a24d06c64","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-b2aa5ed.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-xMd4cQ1BSb+oSHyQJ/MHUSmN6UBWkS1WpOo9Hyw/D7hEyncIX97rJoEXj8qeFXScaokJaEdtBzlv4MEhIk+udg==","shasum":"f049afd252600c1f180e048bbe941ccf12ff8ee3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-b2aa5ed.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcovLHCRA9TVsSAnZWagAADGsP/11lr26VsEO1uR7MEfjr\nPT9JZpMFXHHL/RqNiPoSFrK7e0rDnI0xq/h4FGTWq2U5eMALHz64erdq7J2I\nBTl9vmChUigTJkq9KkzwnLK01F+h/LeSjrIMX14xXJac0ORwXfdwiqX7iFnm\nwRTc6DdVVZQkzq2WRHbD+eIQjb0ok/G8a7v5jSuD9w8tNM4shRyF5IXgspGL\nK5upS38p/GRSG6CXaVU8nW0XLVHAmT8fg5dTtsLKivtXAuIlg5thHJ01rx27\n9MZjJ1BKcWjcgP7ebG+f+47WG0TU3nwEnSKbj3suHppz3tNB+klyAg6iF+m2\nshfUueLx2pne5UtJnNwS/7hhXfYLFo7e1DIjxNHeilfm/OveUmo5Fcx3XBPm\n1Cwy8eagz4oATpwuvdexkIim3aqTv/ixuKXfjix0a/CaqP9maAmTlNfxva52\nZlAThtqKpIQKG3QavqlLuaPv/HkZMtlhA2y395y1cwIruFC/YV6XTWwarB3t\nMfE7lpJhj6ihToUPVfqIuSZJqS1CjjhWZplcquxl6b7aoM1qyLPI8dmOCMGx\n1CqiHevV3UMGGZos9MmMA/Il/1/czry+IMHtLj0ZAFQBM7B9oFI3IKssoQjL\na4Y4MwORpZ8gt+XdcNFm49/pS8v7nNHo46uBeDAYW/jgiBgYrpCWgJLsTMAr\nBRdH\r\n=uGJx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEbeHNqevXpb6l8Y2QGtqpJgMXbKluiarkRfH9y78gOgIhAPvXh4xgpQBdCtah6spp2iSh0L2k7QCZeae9YO9vZLDM"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-b2aa5ed.0_1554182854440_0.1188448572475247"},"_hasShrinkwrap":false},"0.2.10-7c2abc8.0":{"name":"graphql-toolkit","version":"0.2.10-7c2abc8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.6.0","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7c2abc8eb9770992399d5c1fcd3461e03e0912d8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-7c2abc8.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-pnE9zdV8R693cDuyd6QHdq/HwG2NDLFy8uS6nXdKoCmIjRKlDDLOqX14h89QJWfRqkMyt0qU/ilpw1CE6K3HrA==","shasum":"c7a25d7bab46092524db27bd50247bf117e927d6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-7c2abc8.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcovLrCRA9TVsSAnZWagAAMooQAJmiZl/pHoe+ZYX76LsN\ncczqkvniMexNyrdkY52LOkkFtmkXEBDNT/6O9fXcqHQCD00dhOsrBKfDauiF\n224M92991WrSJPjGtLPCqfUzsj7GWJpAsRsDgLiQvJ5lWdCn51k34l1a91L7\nLkME31QCvRLmQ34jkf/d64A1cSTlpmLO7/hLh6Y91i3B5AgPc7wZ8V0kgfxP\n3TyZXbnv/5EF56r9Y1OtkqZ8+tzH5tJFDW42vuBgwJCQCHkOYNqMFtvMloMk\no/Fp9sIZlNuS8e4y0hxUhPLEr6Zc4lSY4gAKzze0eL3v9ZSwEbTWX1thYPnR\nxAuGuifH9sPCGC5qek/c6vnOjsjymJO/chooMbPQznAYij+s0kH5mFB3d5da\nrpUbCJKiB5A5SpUH8Yc2vYKwus8DNZrb754kqe7yqJAuQARam2reD9p1gInz\nSgzVBuONmYJOoIFzxCO039bnTWEh0XnhtI8oovv4iMyPRfiw4tXCZkZm9jQo\nfOmhP741JhkScbVDZgGi/dzWT+ZAKdEceaCRbX34Z9ApIN2XuJk/6uqwNAjd\nc9i0efz9a5QWIXKS+kWSx5fI06fXVCdGeus4ya/4B3tKUBmhXHBpAmsMhztR\nv6FgJItSu9L8WhpKVeZMSdNxjQ6L2iYiYEr+4UUmc6cUn/4Hd1KhdgCDR1zj\n0iUP\r\n=/s3u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLjyOVTjYM132TQ0Sfen9kI2iZmtKoFMisNHvjy9hObQIhAJW7ML66nDcBPSJXXveI+v4/xMSOCXZmSDovkVYn80Tf"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-7c2abc8.0_1554182890662_0.8687463846979011"},"_hasShrinkwrap":false},"0.2.10-28db527.0":{"name":"graphql-toolkit","version":"0.2.10-28db527.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.6.0","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"28db527965d925f549ad53727f0b86dc997c69db","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-28db527.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-LFt/UvijF4YnpcS7Jh62OxoQERPlpuuGQjsfA/GYFYWs5hWJpeYVFnLsJ7KLBEyIJ0Vzg0fDu3FacjFnGGdfKQ==","shasum":"15fd0d464f5694e839386f99c64b43aa40384f10","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-28db527.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcovMKCRA9TVsSAnZWagAAAiQP/ixnqFk+4WsLj5afFwiS\nrce04tsnbGnIsToreMnhWtGw/CzOFuiA7yVkF0Xc2Ygyu94r+gprp6NkFb0L\n6B0lIUJvkIEkgyYxAPjg6cyxpUHtH+s8Sx29UKRC1X1Fx5wTaBWiU8GhcMaY\npsgDLCSOVNx8cjxK1WbLVfaqxrg8gEpAN5mGcaVTP+Hf9r6+GHs0UkfUiVFt\na1y20PPnhPJw9fs2J/keDMRl0U25ozYtxNZYLb/hCZI8zxxElrrH6AqvwDar\nckrMpnOHBeGVEuOntBWgMmu+3ip62OVUugcN7y6JZuLPennbDd8/jYi+1mwj\nmgsTJvGNyGy45vHPqs/KVqp6DNNRr6xsjYGZfWXdgqA9Al0L7Ho8EbsU6ZHB\nZectdp5OnliqtvgeekyNOnB/1ApLFzgK0klJ8Af4VceXeNAE3vk40exXnPDg\nOP20txOGzeBEj/MeBXl7tZCgwvphuqQXAUqk7KLXK6/U1Mde1L4ZoobFHULa\nYFc9GweOyFbYGVRJTT5UbUWC3w12hSHL/bAYEw3t1YbiLRK3OOkEvMOPhtyg\nSDWCm82kT9fAg3R2Mij1AXmVwfhe4BKU/9puJwOEzsygRQVM/D1o1AL7Dsdl\nEEfpZE5P2R1xLX/M2Z4gUtk3zGGtuSf2tntE65uBmRRckl+59JSVOcRoH2GR\nCuin\r\n=h+GO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0Kr7IFYOAX9pN3A2vkZYDtlVBEqHDZTJXIdM+pLasJAIgbRwr9jAYnCxGGwn3qJbSzNuW3udD8NXUrpOlLY58r8s="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-28db527.0_1554182921904_0.5699416446243439"},"_hasShrinkwrap":false},"0.2.10-7555507.0":{"name":"graphql-toolkit","version":"0.2.10-7555507.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.6.0","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"755550704f0d1f8db4bd1d233a79511459bfd366","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-7555507.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-37SPWIR7elNrbm8bt6mUvs29+aEiok44SzIKCEiaaC9vj0fBJROty6bdXgqbNH8P1b0+eAesaV0uS+nygETOqQ==","shasum":"4a350559b1c7a3c38b52f341a4477516f323b9d9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-7555507.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoy8FCRA9TVsSAnZWagAAKKEP/2hV4y4CbAHSyF2ovBzj\nYt6CUYPO/VFQM38Dw8mG438RLjFT1fbXVqQMhxyNbLzmMaHl+93LUCNPmYKz\nzUuOMI2N2u3YBKEwcpTs3s0/NYy6mNZ0L76Vs6/dMqKW68S3LMGdpZsPVF6Q\n6KF6aklPDlQf7s1h4fzK+Cu4P8o2tPOVCDgPbx4VknCmfdoEdTyV204l8BUz\nbuDZoAPfnnAEZathaxqxXGRNrtd5VxiaDguRUf2lddz2swA/RHVgr3Pm1AM3\nhda0LF94lE4tlFEWuPyH4sXcfCeZpAgp0NF/WqbHGqiImie2mEVrt+4gUZh/\n3wGSJB9z2m/sF15W4hZDio66p8NTpdJYVFRBy0YjTuOeE/O14gAGC0wNrWln\nrGPNB6RaUUmyy00+g8SQNHBNDgJHrGPtxX3MrZizVLK6KtbqevkFbdv1BSwn\nYgzoO1Ykah8oxXovWWio3ot0MMp3t5oVUj6EZwmyGjBr4BK8DeSz/H3wJAhs\n7lSuTjIEJHeQNCz7Dfr0W4NZZ4fMQ7PHIA4BHty5swiw+wepm4uGy19VmZkw\nzYgMLq92riBX6bVphX+/qtBENr2TeHBNLYuZ98c+8kF7OhA+Fk4yTYZlwGRG\nz6fPZ08qbvZ3we8bYLLR7V/jtDXAdTurjmpOKHZfUAFqYFCqWnIQ5D3aa8WF\ne6Jh\r\n=3sT0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZ4TjTuoDi0cQpTUOe0fsnEcsECUCM5MhMQdeDLiU5EQIhAOGHL14xEP2CN5zC2Y6Be+qPd2Y704aD/PGIFezHo5Eg"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-7555507.0_1554198276998_0.017221704729011744"},"_hasShrinkwrap":false},"0.2.10-9fc8c89.0":{"name":"graphql-toolkit","version":"0.2.10-9fc8c89.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.0","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9fc8c89ca1015d77d43cdff76ee288c868b34ac5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-9fc8c89.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-7xoypoLez42sNOPrZVjWWuNDC4ddNsaxJ9DnkhFWfaSdpibTAosq5ZgQtUbmJa/92tYyDEmz9hvP0l4Ysxl1vw==","shasum":"656600463f1bca8ea56ad8d8b2fe65fb88c1d806","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-9fc8c89.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpDq1CRA9TVsSAnZWagAA4OMP/3gg7729frMKCCTO5YfM\n6uaUI4gn3K5SNUcq0cu9xT4/IhAgn1aT5+/CVblHkFbvuDHm2BpOVH9B9IxO\ncgWsC9G+MckKtlkTo0OIf193cPPAqMpHKaUFiQFinwZJYIZIKzEwMYLukscv\n73Fq6JJsIWYW9fC9wPPHrBn5oA9ZvW+x5AyVGNbpRLS/CmfZXY95FNyC4qig\nXnc0C46Irw2ZN8lp1dRJ1b8H2xvRf4Doh73uzyFx4Vrxbk2ElSipXkdzsW7s\ny9R1fUC/VzISHATWS/s7rO9PU66TQiAy/VzTVilk9VqgPCHGaenv/g4Wk4xM\n2i/5PcADBOczfYzURUenZnxPjsc+5ctQuGibNH9yptCqy22hMgZC0Hct7ZzR\nQ6IXmxxqAgDN+hjM/hn5wN6jJPIdCLycVTljhN3oGBXf4bUymoIUShascYa/\ngTfDZW1AAVbEOEjgCTRAxFUggIyER7G6SBLLE1wM7y3qKNz1f4V4pRDsWyB2\n3hWzPUyAXu1cqS/P75xZ8QRNFdz/fN9V1NN/q+TR2dR3DxyHJrMQTq2BpXu7\nIDqW4ruS0xfFUEBRpviUy7EeuYoDLx3LQAftUGrWCr75tIwZPPtApT8QqNoG\ni7//QRC98KcOLz3Ez/aH87hxvYqmElSAe9jfhFQ6O/zo1TaXYOHo1dbQ2giw\nmnDe\r\n=09hJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBjs2PgIzdAQ2PqbAIvIPTrrPWBxPa5SEFUiQ1MRtY/mAiEAwjFAhA/+0rSEz50L5ZOosR7IazBB9nosbuQWFEPbG58="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-9fc8c89.0_1554266804573_0.8870792377976371"},"_hasShrinkwrap":false},"0.2.10-3eb553c.0":{"name":"graphql-toolkit","version":"0.2.10-3eb553c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.0","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"3eb553ccef200356d0ff569e852b44e8133949e4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-3eb553c.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-y5CbVtxmYSGg4up+Yaukcc5iCiIxSCH7fgb3k82wIiyKYTJUctWGsQwiNACayBM4VHJhpy/FUqedog8Uojgedw==","shasum":"838b5b89bcd2487c8e927543f1f5d5217b10def9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-3eb553c.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpE+aCRA9TVsSAnZWagAAcHMP/jS2LbGRfu09KNsCqles\n+ZDAaEOPUrsO3XWezk8b4gxFc7SXeB6CY7ckw20/AR7ehEwkeL9C7wwaV4Jm\nII0HmZPElCWnflexpZZj3ja+Y4xvZWRCZx7dv4Z+KkrRagcTbU93vlWYz+n6\n7T7oNVHEvcV78cMrXlfMAUGEiQPZYdQv/7xPP+xvMKNmwkqLHXyk5gAgPpbJ\nyHy/+ffy/lAH53OT62ALURn3ZTOOIUqrDU1htZa39HP7zC3Q5ClDI9whKs1N\nlg3CreYVdbVwFozPncNuMDgHcZIcIFFd1nVSQ//IGvn9x3Q6Urlp1lW6dkgg\npXqonEq6j1jd46akd9ZLNqQki5EeLmmIb/slfOIDdspCEd5srqTNMmgY9zeJ\nIk7ZTRuxJSP8F+OBy+lpgVmVY3/mA1p1iMvYmVMHyWsBfFa24z8mjsOO/3Vc\nJcpiOcltXchMnX54x43syfUxn3JOWiyu6n1juos47kvdBj4xXPlBlBtkPnYw\n8Lx7W81e36Za3QrY2cIG7OwD1rDBo3gIgU2FvFA+czeRDnSwEemT15kxqEdU\nMJJjFEI1/uNMZ4Kbs6SutI3Th0mdpV2vkwztgOy8yrULDdAYAGaXQNGK6TCy\nZrQh77WC0IorNWA2nTOFy6guhgtTn7Au22DDWXkpWEXFknZz6lcpuOMqD1En\nRf9U\r\n=gv1N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnwZPTbnCYuDLvAazy5FHjX66EPlDJ2I2WDxz9voF16gIhAMYJNPPekdxxTaqwmtv4yYD0hWGmkrNXyCLQABlfgEtd"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-3eb553c.0_1554272154007_0.8116510862174295"},"_hasShrinkwrap":false},"0.2.10-9ce018a.0":{"name":"graphql-toolkit","version":"0.2.10-9ce018a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9ce018ab3565d20d885de32b43494583057982d9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-9ce018a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3n1kH/AeRdTBS+ACeF87z2WYrClPJlxE0ynRjmSKl2PRAvK+iM5cbk3xiVLF1K06s23lil25E+owG6Spn22suw==","shasum":"635b271a342e8b444037d38f4a0f8a0ba91db2bf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-9ce018a.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpWH5CRA9TVsSAnZWagAA8fYP/R872eQ+dpEi0B48k/Lo\npp4m8c5TJflIeit5z1osp/TcCfxqZZRa6p5gOCPy3nZFcZH1rIuFooqXJzZw\nl3XVFlByoRcF+rRHlpkOolBmFStOlfOzNI3eCs0DuHw+rVD5ogmx3iGHNBoH\nfPJnLHAiUzgS/b3aqXp2ZxYvyXZXzmrXChrPKbBnVtIv4GGlT1UwGoBHSWpX\nanVzx80aEBSiEtQb1A0f4sFtk1fjfGnyFC/PiH44XbpX+vrWQ+jNJXvo1TUh\njKUCVWvgnvHzMQ/eayRBvItBjRpohONyFI/KXqNvxTy8NvaGEpos754wlZjy\n3D02kIqVzetxYB2V4sfKDwyjNOJNp1b8oHxcb8Xs8llfidr4/ldFLHLZaKLW\niuf/QPZSLzqlV31JJqKht9sxRLGz1NhWQUs/jzB7B924z4sXfDqrrVHEinpm\n8JeSK45QGjDex42gntxIHbR17wwixiXqXYhn8GU+vqF3usHD4mOk/OBOjwox\nZ8oOl2/mrqzMuVpNKaZVjK9j/x3YzWaMJv/zwUeqCN64oMR3cR7mOr/MvOMU\n1/3we+noyQwWzTCly0QPIdNAuWNi68kRB+/9RLEGRi2Cpgd5yI4KLupnMsty\nMKlkGe1VMawujf2NHUHTGQZ6rMj9t3p4/wk48cUNCRAKsy2CKko9RUHaVxeo\nIuP0\r\n=UpKl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGFp4XCkcZ52rykxqiKLJ4PYjoVn3/4/HqS4GckiJryZAiEAv4wXelDlz2YvEdLibHeOLiFAqFlN/NfKXt8ZNH71ZWk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-9ce018a.0_1554342392744_0.07176235236239337"},"_hasShrinkwrap":false},"0.2.10-2e8289e.0":{"name":"graphql-toolkit","version":"0.2.10-2e8289e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2e8289eff3c8b774cda4bb782f9d4e0cbc6890c5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-2e8289e.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-fpMW+KKwe85snDALmvuYF5E/bnYLv2DFTqDJmKcL07FYhO1RSkiJF/Vw28DV89WP+4eFKjTLk7N57++JuE9qBw==","shasum":"c3085661b0b88d2a3a0dedde0d9170d22a2dfc70","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-2e8289e.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpaVrCRA9TVsSAnZWagAAfnIP/A0mxFiEycFN5rEod0io\nVIYR4MU2bKyiLStLnMAl2TRRQic7BfHMAp7A99XlTuQsrKRXDFXQ3kRB5CJm\nbcnwoiM4chhjrAg7QKxDNrZRxLUpJwOeocyBBt9tLQsu24LPS21ybWzcPVhK\n+tisjFQZ2G6Bhcs9pRavF7ZRIjCBROK6LwtM6ro6EZM6nBdOvvI5a5fF44dd\ncLxmbArFfDiEJwjW39CdoTeLwQW5TR2tUGkfW9fAL0MIv0rQKpDr5X5mYynZ\nZOCvVi29hINdKtroXFGqEA8ar8ZE4tVZCKhWv9FSJK9yfTOQhRhlLnUqWVfu\nxuscsSKLsnlXyF8Z3WYDxFwZKSjrIyCh5TDttBqeWPPXPwzcFZfRPbQQxd6I\ndew3XInpso3eXCOjs2O9m1xxaCvFgJlJbXTPE6HFPbXdNYwRWGieujAX53bn\ngkwezIoR6oRQRLHpZdYi2NYYjQuwguTE0uOoQKA7VB4CPmN1M4FKNZ33s7Ff\nMIPRv5KEZ8JRajWzr3odkibnZSYPDBQvB1voAyhKuMpdFnz4BYLoC+XQXTTz\nPqvWH1yD7WqehKqqQDmhzezIM8OFgkEExLCiqPFpBy8aDPUIcIlxESy8R+YQ\nvsVBkEB658EvxBsTdjsWqffrRY5yO5oSHO+JWWUiKhMwCAkjiy05cSNKgLlZ\nZeUi\r\n=BG0P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBOdrt5b5mUpKRf0jFBqDUKLJ66MOa3kCXrupBu2JcntAiAU8VO/PEujMOr2l+WShRSh4StY6hCbNCoU4ZQo8KMEMA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-2e8289e.0_1554359658571_0.29812024990339814"},"_hasShrinkwrap":false},"0.2.10-48e78eb.0":{"name":"graphql-toolkit","version":"0.2.10-48e78eb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"48e78eb6f619918996ad8a941b0c086ecb7ccf43","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-48e78eb.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-d3hSeJUg22vx44txhDyfsXDtrz27dYHagDcQJZnjq2B8oI6crdXlZ1IeF44KltEsjbFTxuZdcE5vOp1TzAJUhg==","shasum":"2a7626c77ced469ffd8bcd8e1b4e3acdfaa89cbf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-48e78eb.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp8Y7CRA9TVsSAnZWagAAWEAP/ixpm0H/oDnkp8jtFaho\nbHtp75VB7b0ArnEAKuT5dHkSQH7GY0n/CvtX3VWzAgdCZ5h48H0M96qJfV1o\nmzR5PiYdD4sPywESWEjaJqQ5T5okQmeBz1o23rGWVhYyyhQAHeYO1MPXaK51\nk2BtBtKsSQefrSixCZ4Uc2cXRfsZHZfffJivKPWgSzSs8FxGziqwWyw9Be++\n2v7YHlt+Tu+6HKqXEF+Olu0OOXkylRpEX3A7BUAqQhycDP9mJ3BU1EJyWL43\nDunmAxrV7Nu/On/vt7UeZG3dva2ddSf5q/DpM1KUka58Fm+iPtlP6rou/buY\njF1z/HxVGqDEBg+ZQSbPNrLPUP3Clksq1ec/8Z/o7NVsf+8NA1HpdMwj9bdf\nLV7XzCpTa6p+mrJ5E4iGaQ9TlifrSLubGcTAAxrk4OsXQZq76lHWeAOyYycM\nkdScojiTyDk2xzzDBS/fXxp9FIaBLMxmvztE1I7CC77XAtcbvLW4jTs4Rk81\nGI5k/CdwFMI9bwkdZolU7jj+rMdqvBFRZJbXVg6KaYvR3lQKCA5nb1W1/ih/\nHYsajRVv2iWAoqr9W855Auz/Gd1kCFrzixOyORBEJ95DgJEvwh+PyxQ6pt2H\nNVb5JLuChm90nNPaKOO0zm14URXNtCFnXKiPL5joD5y5WXhTHULg4nZTUyFF\n/cvc\r\n=J0qa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2bV4H1Rx3Z6J1PXUDt7IANHVRsImYmSL/ymnUi/pQWgIgZWiFFLzjDYWfGvC7OR5jq6lKHVNnlWO1/TjnWtoIQ0Y="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-48e78eb.0_1554499130416_0.048758911780871994"},"_hasShrinkwrap":false},"0.2.10-0ed0203.0":{"name":"graphql-toolkit","version":"0.2.10-0ed0203.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0ed0203d2dfd8f3883286c0af12441ec97002b63","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-0ed0203.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-0uQmzKY0sRiAt2TTCAcidYfjB8ABrng0Mdh93iE2DEtFH5BbezALIZh+2ROwzjZfjV+mz4JukQCtJlJ9tP4iCA==","shasum":"dd6d0d8e609455c03e352f2b84fc88677eaa73b7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-0ed0203.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp9KtCRA9TVsSAnZWagAAbXsP/1T3IPeOu3OgyfOuIAYI\nniA3sJ51fHkb0YlUpKhrUdRyr+S3vtNBV0Q8goFMMsAIIicBDjNzBPPjfsnw\nFLdIRTGg9tc08cwMAEYrVyd7x1ob1PWihOgYiYbwjjKJuxLtLLkWF899vCZ2\nGNxTSY9tz/r6nRKBNJr/0f33jU7zwC0Ux7SQnZCR7XdQdsBq8I5IF2vaXgx3\nCvUQszTGdFcK91BQj1CKu7kEkbJtv8Uh8aRbi+60zV97WkHkuqW3PTeKA06c\n7s0VPT9Ld9yqD+wUoLwoaD7vbTU4J0+ql8GaPQLfTqC4N24AEdyYwoDNf8d0\nxdIcac1mylrL3n3K2kA3NkGheIBYz39Jrn+Vxhd9gDeyri0LGQGDRYqDHoLN\nBnGXpfr1OUWL78eG/FIpxq6z/lZXR5MJqqQzlYJaqc89KpEJurKesobGjYoD\naPb5xH0GX/HpRuiMyFUpmvrWZUg4vKSCShvSOyrckU8SIY0fHeUuzt3gU/Ho\nTtJ5FNUj0W4yDqfPreVm6ONHu67TY1w5VxbB27VzK3686cgt2mXkBACsuiPN\n3CR2lRhSK9HrRgeliQu4RIJWiwizALUHo2fNYPmBm8ykGwREG0ovNg+Wrr6G\ngV+NpdljpLtPVxRZkOy22dQooczAQrJ/+MWzc9LNilS8kvCH6MLrW5MwpARD\ntndV\r\n=3yRj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8HsgPO6p+m6gSKVDvdXa0Hb5c9VzMETxUSUB2DayWGQIhAOpMN/ImpSOWdSXOIQl6tRkwpm0lipbfcK5RHSUpyy0O"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-0ed0203.0_1554502316676_0.6177419235767001"},"_hasShrinkwrap":false},"0.2.10-87d0564.0":{"name":"graphql-toolkit","version":"0.2.10-87d0564.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.1","typescript":"3.4.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"87d05645a65e4a86f535a61450507dd295130f16","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-87d0564.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-k+b+aM1/Vr+cBzyXkU8Vc8dz2Gujex8fpwL758LeeVhCYzTLLPgqOBZdgt9wggOXC1MlTCu1CsL7HFY9PcZVxQ==","shasum":"954669eb3f16aaea456717a351c5a7ac0a77061e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-87d0564.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqACpCRA9TVsSAnZWagAACTAQAJ0oFSap1FekNWFp2W/H\nN6GZT70r5CiLxf3i+TNtmV/HlhIYet5zQpIHJ50uyVTrcO94PEqZO5rQVfGP\n51DKVF/0HnTPIUOqTAfw2HquP1Umf/cch6PvI+XhzNzBErbPmvUo/V5BYWh3\nTHnQMbCN/f4X/rXI5LSxp83AREoXQJHGdTPGZdXON1dqWaeXBmdz2F23eeqe\nncbWykh1Dw6YMV2CMYQWqaHzpoyqym3XxpCFnVPPeo3uLJUDGu5kpYRouw8Y\n3gKmUkwmILn42pxteZCvO9eK7rHuA9AltVJDaV+e+icAimi2RfOSU6ZN880P\nDkxQEBDTsivVTfZsjG9dCE/6BRiPk87IM9DYYd+ZHxANvc3eHaUgZ+1wcQmw\nCPEyKd3RkrXt2E+7ZrhVB3kYnGNtsDWTodUm5oC3hM64xfTbHCkkoki/aXOf\nfMR6HEPCZnJI9MaGMRuf2O4zP7lfnutfjsgMhm6vE9+xK2kuWpwBcXsGhO1A\nNIqxifUDYNiTIpp18Vs0rLx+smAM1TdFT1vpAzw3JyWZjf3Dapw7EgQN1PMV\n9sBIc2jFz/qroTo81CQuENlvnsxx1IkBhg0qE7O+lSpKftWvVqA/3IcAh9/g\nfmw5Q7enr4Lz+atJdKkBRuN9Fb39HZVuCzN/In4WIbd7Rl5JnCjTeF8ckVcn\nhpFc\r\n=dM6G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNAgssbtMHMGRvx3sYbUzUJTATKBXFMq5Eq4CTFvTLCgIgOsUa9xA9LbpHqE+SiAdcjrYx79+ztSvsZby6CtztN+0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-87d0564.0_1554514087777_0.841888773128602"},"_hasShrinkwrap":false},"0.2.10-c2e69a1.0":{"name":"graphql-toolkit","version":"0.2.10-c2e69a1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c2e69a194007424db6173c2abfc20abfa80f6e2b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-c2e69a1.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-wBebpDHUzNw7mF+i7L2znkagbwlfXVRPWIgevOJ0FgNqXnuJUQeGRRbXro9U7X8KZEmdgapigxiVTz6jYxF3Ww==","shasum":"1f041ab2fc8eb9887c5c1ea97a0e6cc7fb91c7bf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-c2e69a1.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqACxCRA9TVsSAnZWagAAjbUP/3dyAhpCx5RHKXMwzgJA\nT49+qaS5Ntz8I5ngKyNiy/kQyGnuGv+/7+G8p425h16+hO++JCN9wsYUUiSQ\nrsR9gOcF1DLxEh3uQF7xSMqXahxPRdiO69x4WCjP2AD29m/FBue0c0W2hVgq\nTLYKEpLQovq0M1lki/pfTnlHtbzZ1Q+6xpg3WelrpsmFHjPhsvZdnN1+B+g+\n7K3te6URoJSoHj1UEOod8JOpsPmKB4rPh6Qz0nT6NK1NTEudKxbek+ZaFhj7\nmqjoPuZy9NiFCWmLqR7ybBXoFpXeJdmjPVWTtDym/IXz4dYHg5k0NWRpQzE9\ndSV67eYBbWThsyThu5S9CO/GvC4lU4Ad6IYZQb5eDIMhNnA4az1D453dNZxl\n6dJGFuZBjjLSoBhKnrx17FivT7g3kMBdMNF2ntY4/cbTo7J/0L/vsUEg8mdJ\n0esxFYDSD8r4WxpZDr2qad8+zCqc8ETm3hbZKo7vUeSS9mKRHSrn4OJiVx3T\nBXUpR4OFyUn0exbKBihXz4j0JB+U2Jg/gVPdKcAVfyo+O3ogrgBWT7vqG9XH\n6UxsQ7TWBiJB63ETHRXFC0/u1CLPpjZPoyNpRVNkT65AlBLiHtISKd3m9aM5\nfj9jGA3okG3NnUF4ex2ri8ht9XitjWUYTKq43ialq8IFl2tO+TYBO3iSgGw+\nO0+7\r\n=iQeY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNzNysSnz24G7aiGm40N98QCPpIdBoH4sTbMQzganrQAiEAlQTxZeL+pxSbIHNW+lePA8R2D9yKBlMKVkJjIW9RRf0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-c2e69a1.0_1554514097013_0.7040536942064322"},"_hasShrinkwrap":false},"0.2.10-9d60f8f.0":{"name":"graphql-toolkit","version":"0.2.10-9d60f8f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9d60f8f6c951b2eeacd46f6e74b95d5bbc734d6a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-9d60f8f.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-hBxajZY5z7TQ2z4o42Sc8qHpPO9qwGHQr/FsYG+xldxf4QH/OYAhdTSvgI3HTRTF62f4tacM3v2Yu//9eMSK9w==","shasum":"5d0a1b9e8163abef55562b9141badb212146fc6f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-9d60f8f.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqTRfCRA9TVsSAnZWagAAULcP/i+s4ZnRogSadbjIPkdN\nHee8RS6r1rm14CuvD71lm8OD0i0Q6NURfYE6X1GOprZrcaAzYRwOVpy9ow9t\nllwdxzxr3jngQJHbLzPWrOPDv9G07yf62tDoA9zgjuIPsJ+p5ddgSQUHV4+5\naSQGFUTrKF35aiSeOpkm6uyRVnCcB9LuBHGwNEdqL4ozP39Qvpyy6gPX4FkR\nBpfECEbcjZLG3lezJpnQAuxRVT6n3Wj38mTPrH1ED9VMFm2RQsFLhxy0GPza\ndaAdzEliej7KAxDEH6tnE+1aYB1RtczcGWyZfPpS8tnYMqlrVyNsWvZ0MPeQ\nSvIEEM0fatfdyXsZgUM3kOG5lyg3rCU4dQ68by3imG3+FFSuzHBCkaf79ALy\nqqS9sxQx43IBdL8jOYxaiJyRKDBrAuBR/BBOGMcnHlylHOh/MBpM8DNvzfWC\nZtxXao6uZ9CDx4lk1iM/yWJBy1Ku+Kh3DEDlHk6Jwlt6iXBVTsKQc9iZZGB2\nuNntp8KetYdBbtCyyNz8iB56pyLaallQDtkoO6zcXrYY7vtkkn4S61xJ6pm8\nsIR+joOpWbAtubGyXTq8eznlsgxRXpmRFDnh42NB6qzueMNhZKaBw+jZBX5F\nGcMjbf7rzC4nxQAok3ROw0/IUKmV61EKu80IYAITywexLQEnaMlL3tsBfQUE\nhjkJ\r\n=H6eL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrQfvt8V30Gox/wn+h2ypYp1/kfbUVGsYaPKdlz5e/8QIhANtrKwDT0LSfphZ7KZNTafS9he1F2oGRrIXReVTneub7"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-9d60f8f.0_1554592863036_0.142340354612303"},"_hasShrinkwrap":false},"0.2.10-f1393c3.0":{"name":"graphql-toolkit","version":"0.2.10-f1393c3.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f1393c3e172f4f2648d3307120617ce87a7e68c9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-f1393c3.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-NaC3/Ij6AkMo6wXeFoDdDf4Ocxl5IQE5XRGFRww3d1MpHS6YJt9jLr0EYbGn4f3aqcAL3CqChglwHeEs3+jYYQ==","shasum":"36770a1e7e44d456ac2255698c7fc5cf45801442","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-f1393c3.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqc15CRA9TVsSAnZWagAATxcP/3qam5b6pCbiU0SrZX4t\ndaRije4mYzADiZmq4Mi5HbORzywY5iB1kXVEPSCgrjtI9B/gI3NFPO6+4YRL\nxMC6aekbSV+wWxWABKyxp6gNKUsKk/htvl5dxKq6UouqElZdPjtoyx3rbpna\nE+KUCuoCWw1y/qXXDuxS8nAck7TQn8RqRm0Bpz8wDTQ9o19pSi/XsKvtufPX\nyTdarAvKCjD5SZw5uknwhIDwdwIkjYwe+1BTeFTQZVGsIkSsRyRHwnYhFYJ3\nZ/lWStCmqBd8dASEDr+VnvmZGuUp0TdJKHAJs+2+0Qm6Wuh1uEt656kjSJvG\nqoi+yPk/2Uf3FJcadioQjsfeJGVKU6LV7+96SH1cCuMSXXn924k0H8UPnm/r\nq5B2o9aT3fUqHQOCLrKhDPyJX4TM7FTzmzQn3kqXS/6xnWATBg99JpUQN2Gl\nlgfodOsOIdVPnuHDefD/YeqKmh1yrLtfc6YxnqTSNY34oyr8m/wkeCNVfn23\nMipRpSBRKy1VSMIpH2v+sMwxgUpH8QO+Z2Jb7XnVRTTE0LTyvfa+E4ANobT8\nkkWYO4D5OqegFvAsiveG/z8vdLZeNl47dZuryj0JLE3Vzjy0Ro5nZGLgh4CJ\nHh0sVw9+ejT4ypMk6QhbZK0IlW6gZtBeH41KteDLwhFbmzHLdRQRHsW8Znij\nnzZq\r\n=b6t1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzNwru0jLL8sAYKV7C2nFd5VGk9p8nQIEFeAVib9QDjAIgCV49ZDKI6o/wcrbyG/HaMkOzIhwIOdmcbvS1Fp738jA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-f1393c3.0_1554632056605_0.9311416343923222"},"_hasShrinkwrap":false},"0.2.10-31f80e4.0":{"name":"graphql-toolkit","version":"0.2.10-31f80e4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.3"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"31f80e46c18b321712f799a5469b47b56b052a47","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-31f80e4.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-4s36OS1PEHId+zqzkpMiLpBRHZR0PbWTdICQSY7OUnoTb1MyhCbGRpnM9EleTfJS6JYsSvnzTBxSiYv0PZwkqA==","shasum":"64984a3ed50aa343195ac7aea41bfbd1fd24ecb4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-31f80e4.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrS5ICRA9TVsSAnZWagAAA+oP/i9u2bvGQC4VuXmhhCDZ\nw7vMV82QvGKeCnj82om+l5RUV+5HHPFg8a/YwFBlhuAPg97sSPdFahg3yzqI\nw318hfP6VM88n8ckvir5XyAerX4IaWKZYH8XKz1gspXnifBwR9DbROCnEx6k\neRTWpc62nlcqC6eq4XuMejC+bbhbVFz30P0IntjRi8cAZbjpNr4Iz2eO/EPi\nkCKq07neQMzeyvWPY57lvNclAOan+y1sLI5c0nzTouSiu+nK7Xppk+Kj80qP\nhKg4h01DW5XNOq0eLxMNdlaqv1cyo+RTkLxbzwPlfgFFFtqMq0lU2C2C/bVw\n59co7j9IyCXnlBWYLcCY4yUnl/80e2R5kUVEcpIbKfNrE5rs78ite5x9xxBA\njH0AWwRQ341fS5UPDeb/bN05jJxim2y2GE1GGwkIWOjr4zrPxpuA+hv2Ax1b\nbn5w5cDDvbNw9ahY2uaXwHrb+2a6pdOo1cbn24ZOVsfQwGM87XpRmgBMDg1v\nfjrHo9rsJ15igXZYgQ+7O7qBHVGnY9SjuTAKuJRZ+dVKUNbMtsG3P+z1R1Hw\nvrXT+dMz9o/fyrtGEZ+QwM0aRLUqAnSoeFHxkLHiza9ACwR4wqTwDYbvV2z+\no5pPI3wqHuqNZYM2VpeWOMn/xyUITv2RQGTfFB51tj9DttS0lQfYy6pF4S8/\nwfcU\r\n=TaSn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICCsyaoFNIkiHSgJV9U/a6w9Z4XkxGrhTb9PYZ3KF7uPAiBgTMH8ABa2S3J/3hOnIhxQUtn/QhwuGuSAuTd3JaYkGQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-31f80e4.0_1554853447106_0.45099279890283994"},"_hasShrinkwrap":false},"0.2.10-17b1021.0":{"name":"graphql-toolkit","version":"0.2.10-17b1021.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.3"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"17b1021b50f6fccbcf480c9480d740381e09f3b2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-17b1021.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3a+LFLvIjAHDgsgPSL7eYQlZzab4I8IdLULLZk9SDojncqn6eYZV74OMrH3bjzT40Wlu6IP+IhOeVSgFp5OY/w==","shasum":"c6d7617f7abf98937f24c99a9341ce92a89ba9ee","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-17b1021.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrTTcCRA9TVsSAnZWagAA3E8P/3k9izStNd7qhkcTxoxM\naOpV92TzhXRjhCjA+tMMfTLCQ8I/gDKQ0fMrveL4RMu+I0BiL8sObYiU+DJ0\nSVYSfZD3qo2izJwopQYML6LexSlXBXucxkHYNul0wdyLjhhrVw9VgLALKLAF\nPdxeCJl7la09E2UZipS0xNs/Bnpd6tkQPIcr7eK17Rz9OvcZXGSo8j1/9yR/\n3gdA6vd2gTnv2gDkWbnril1NTw4nqkp3wz/upw5CIJlIs7QzDRWEYWR1bbJc\nnPBeWlpDARj0tsg6ZXgExLA+emd1rVFigfToiyOrUYeYvM+ikViGxnjBfZZK\nggthtop/LTiaJaJCAF8wBptUR4pxA4GokVXNrbImOKq4xnO70A8BrSVeK8pK\neNV9pCiBTs7v3nTebWnYhMZ08QLD8/FW+HkLlKALQCFleqWisFWteJ5E0jPj\ncciMjOilAjYX4XC5a+r+izE6wsCCM8HtjJ6SFxd+j8wrkoD8253qeVh5cAjJ\n/GJwc2Hu09KgzqvOUxvvFdX49PuUA/a/BpsecYuGJUcbvi+V4IP+RIQlK1WP\nHYw2uPXv9DdN88vAUFr9Rte254NXiIScXkf5pL7l1RK6blmKxYbYhd9pkZcP\nulbsz7o4PUgOlWUP/wJFWQ1AuANJjOGEKAj1cJ+y8JL1u0FBZuU+kBuy4lR8\n1EUn\r\n=JL8c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1t0xwz0m+uR5uaTQENv/9j31aTluu/pWa3PbrHQsQKQIhAPwHrKbP96ibyMhBKmb1EHutbt2s4satrsnwdryhtim+"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-17b1021.0_1554855132151_0.25199057013760684"},"_hasShrinkwrap":false},"0.2.10-fec4e82.0":{"name":"graphql-toolkit","version":"0.2.10-fec4e82.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.4","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fec4e8238362dba8e7b7662ff9fbce0466d25fb8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-fec4e82.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-LXgokW+thg8fZ/sw3fBwRoQrg+rSIMUAigPtpp9puopecL5r+W4bpko6cig5tLFeGw1qvHxLl12ogmldfmHqCg==","shasum":"929c979fee7711e79a8bc907db6ca513adf0667c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-fec4e82.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuQoKCRA9TVsSAnZWagAAJXcP/RSfCiloqUyMZNoNeQNh\nGh0yj0Opbxb5yw0E9j3FmwZSgFUXK07wrsoXDSWuBOIt74GEnpiUtHZoulqM\na8lmL2EGq4c5YnvMn0J3bBSwnJiuUDxIj2KvGHWmEUMb7Wr/ocME16c7uzWk\ndvSTxguC244slbixIfnrVd+WECSv0Xno360aqn1RPXUU+IKkEjQn4ajbdas2\nxV0zGlym/czqXFgUITruHxJYqknR+Oe9xaoorVTYR0uNTBLj87IbvkB8BXAZ\nKsT/IbSrQzjBi4FxBBuhm+v2lbh21sfsBuOf0khgrsGQnYSxElxVewoQPMNm\nCfNxuspKyVW7My2laKKVZ2CLyCQx5bmnqL3OK8nCdRFEA3lFRmPd6Nvbw8+D\n2GrdFdi2JLIJ9ldEZvKqUDaRutuqxTtq21ezkWQh0k5/wJj/zRMTdFBkpe5R\nhp9k/6Aa7XFmIveaOh045eP+Snr0imkyExseNj3EMbXW4HHpFPvQKJUO2KCs\n6LypafpC7p1IEy0YhmuQ3EQvFSLITVZAXinpkVB+yy3dBnIRZYoVY0HjA7Jp\n6RRPRS3XRhaXCug89WXjRvHmJlf9MYlAvTG/Cs65F9DgxYKGul0CxjpsDQLF\nPwVO1WAqxV/CTkX9vy7K5yEFnS4hhDmPBcR9NHIOaD3PPV1aqTchuTsNZqmP\ntAD/\r\n=vy41\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDT+lO8S7I1rUlH6UzPdLyTAnFRXBdxiNwznbMNJtJHgIgZoPG5IAzqBEOaXZpmxP6QYErHVM9RF05XX+fvWZOEPg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-fec4e82.0_1555630601453_0.31975897178249424"},"_hasShrinkwrap":false},"0.2.10-8757451.0":{"name":"graphql-toolkit","version":"0.2.10-8757451.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.3"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8757451088bbb913385a7d55af3b7eb58e637eda","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-8757451.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ReaPo6IfzUSVseFOHIwqFSC44YnuVsd3CXxCnxoqBQ57OdRiln7Js7c66HDzwNW17lYg524sB9Skelen2HISHQ==","shasum":"b87abbac3ff459219c1a57ee5a362fcec9ade80f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-8757451.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcujRRCRA9TVsSAnZWagAAHwEQAJN6hSVffSWP7vBSyxTq\nU+0EBl/wS08uKS8Hupk5Au+/doIJE50YNuVw+vNSVY2jN8eQJbCaeIYLbPfm\nJkA/yfSRXssNMlKkcReqjP4HQINHN6MaNdWS/ytFtWwV4PpCwCey0HmGg+Rj\nmFX2qBGaMcFMWpfNptyinq3d5emGEefvEVCP0ia35vd7ZqrRXzX/rQTt14NR\nj0tbyjZg8LDYH2D0e8Q5iZXIm45N41I5W3dTO802uSW/+gRtXBFqZEUxJZQc\nQUrbcRezXDM/HuFuIhyRE9SgXp3B3BJfqxbNN1VOt/83TIkPyRCGuuPaUfzm\n2Lo+H32RvHv31tK1BNFfy+ZTYPVxrFW4w+W79a+2Ktp2BFm0Pm+EPykTwIZq\neaavQ+rA82qgOgk29F+FOnTHwNvLYO7viCTuibq0FFXWJ+Fa0KnoYfnfTt5F\nt2EcvYDIjEFJHeftDEVUlAWGzkJh+DdlPlZatdJYY11b3cOOluUcCVehHvh5\nxjlyAxYerG1yiAIk53/QRxo7llgUS54+6gSMnuSCjxvNbyQayHXfrgzsarak\nsX8TOZ6yYy6t/R6BYeYsp9EXErTcfSEdQdjuOECbHTwUwT79JABYYmcoCU7Y\nccaeXpT75chwqKBrkOxVF7eNvSHU58IetIHc8N+Im/IaDcNisrlc3ORDtDA4\nTr8k\r\n=oXiF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBOAJY8pl2K1G9Ngq9RglBfP5c6uTS2detZa4ABkDWzWAiAr1rnMDosbDe8VyCdC8FI8EXRXnJwp7dyERpHF87JDbQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-8757451.0_1555706960708_0.6964662712445961"},"_hasShrinkwrap":false},"0.2.10-402c329.0":{"name":"graphql-toolkit","version":"0.2.10-402c329.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"402c329057354e8f9215571a8b1d366faaedc51c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-402c329.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-Wii9sbJ0ldIClQWv8gD2MK/+cxgA+79ESdk0UYrM3QmdOT/uRDSftzbApfYPjmLWbwUYmPuKlDekFjAOW+c76Q==","shasum":"ad355c6c20fb35a08cecaa48d45dd32a1878f0cb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-402c329.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvJQnCRA9TVsSAnZWagAABs8P/2x+BEpA+L/djk1yYI51\nMvjhacN4uCZXFtzEwS9SuEIPfMFfAg6ZXHCuBLTIL72m1Kt1Bn8KO67IduQJ\nhcIbsgPZPrteQkK+0MdfsOjAmwS2twmjNcBR4Kd+w7dFDu8FAm5nZ1t2bvFz\nQtmqdHxA7IdXYGqIT7p4hm9M0e7WzpWgnIiFbwOZnXX3t9xe1JK4lRCFDBkh\nRCGcVdqgVxmSQwCI/pbfSwnv2pc5yobAnnXgunIHs3YLbGxJMTCfPnMikjWb\nB8b7rrGfBUWF8bKEeO/mGcrKWq4OMam3gD2U4AH0LulcHGlfIagyBuObSi6D\n2xcAMTtR6QIZl2BTgks2amNah8YZ2uZvC3/635ZC+pZKLPideRhSwj2mAslm\nL/ixm3s/YOXg39QE5rErRw5ks7MrRHQhtS0IKJuTS3MHP89j26fumJZLt70Y\nttwrYA/KhgMipMs4GnyEHjo1886Ev5r2lslpKL1hjGzDPNU/gOHcPEIKUwOo\nkUlLtPiC1PzxlA7F0ksHzlgwf8PbWUJMeKGGRIwSR6Vl7JF8BFYTaxqJEi1p\nIVYjtW0+h0i/3M7kKA2xnta4zo4484V7jACwCi8+kQJCcqePbnSZ6mjrbC54\nRogQt5jx+ybodt6ApHiFtvdLKWZyoG6A1TE/BlwOYLjUyCm5Y0phi2v+CdWh\n5VOx\r\n=b0fh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDCcDEB/5ch9O0ai4gldkj5XhEKVIIHi9E3oQUt2vFx+AiEA6Ja/307C6nuPlsBFkGZFX4cJicxI5vB1oT96lStWLJw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-402c329.0_1555862566671_0.4054441520116743"},"_hasShrinkwrap":false},"0.2.10-1aa5c9a.0":{"name":"graphql-toolkit","version":"0.2.10-1aa5c9a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.3"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1aa5c9aa07f8dbfbe6b3db8988d0a207d7443476","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-1aa5c9a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-by/9x8ZcL4Hl4lm4NocgsTNsP8mJN6tbzyJZJ7uyAtVi4owiVnjTQNgMhSNpa/WzZGR/v1UpfNOznGEfP2lzDg==","shasum":"1bc0ee9582a94d620481b932d11a40627d55501c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-1aa5c9a.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvJRpCRA9TVsSAnZWagAAhmgP/i95J49UOAxY7It4JLGU\ngtABGA0LFHePUqwSlPQKMofaNOJqeiMJy4uC9Bo5ZEDIFBQhwG296XAKxf2G\nJHZqUhhHkUmSTLJtDtdkQ3KBYMxICbcZ+avZf4iJ1G88G6Z+Pe70DRltL5qa\nuj428N5BVpsBGGQxqUPQZoB3VjUaE26ipOPNDxm6lZMRq+LG9Av0KVhAAjwI\nOv+HJSnuM7NMjpikEfggAjtIMJEqyarmQJpd9hVG8gyo2eOLKbat1eE0dmVm\nRTGFraQVUPzLdYsuwjBI0WEZlnqMjcfcFyjvVe+kkuapM2lFHBHTsD82WiUR\nzuwpFm1C4LXdCVASkRXUDsxmL5D8hngVuYOfDSb0GfPON3cBiGjnExq0D9cN\n7JBdZORrjIC/wxdxonlcAE9dDEBxtAARDIzLTWiLfwBBSqZHjEz9Q7TBcNV6\nK7Jazf9PBUburZQtB7/9bbuPTrs08kCqhBxILGfZBGMzckrSv+sgfRle4LOI\nhW2dN6Xz511E9yNJIr3LtVNAKC0oOPNDlBDAs4D9Ue5sorSleR7Ar+WHxhvr\n0PvCuIjjGdG3P0e529Jq0RLodGe3uyzL8lL12T3Gzuet94U6attb3Rx/PLXw\nt+eoF3jOmNmPiQpDwDGZRTQ475K2LgeCY8CNFaLKt3Wa6Bu3qCEKDFB/jGFy\nWt9o\r\n=fZFv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoHPPmmVgiwcOXcuo+YGvRT6R3yeHaPp9nz4J/RkpWLAiEAzjaX4I9etBGDzp7m2VnHLoJdXvwSvqmIcESvI/e1nm8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-1aa5c9a.0_1555862632324_0.7339686219564641"},"_hasShrinkwrap":false},"0.2.10-07d83b9.0":{"name":"graphql-toolkit","version":"0.2.10-07d83b9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"07d83b987e069d86160aee3a2f32f0f4cf437b96","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-07d83b9.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-8gu3FhEN5q34n+F8Mv5XgdIgf49XXRvBSUQu5O79z+Dij9SXwy9UTScngguKUX0N3AGOqDqXWrtf9By2Zxw07g==","shasum":"56055bd792a8f8ec165c854d5ea88d050127f7aa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-07d83b9.0.tgz","fileCount":251,"unpackedSize":295654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcv07RCRA9TVsSAnZWagAAMgwP/27tqopJc2TatMnVQ5W5\n7loCRb31wsVGfIGjyYyUS9dalvaXroV3tlfxA5seB4nii5hLgC/blUOJXucG\nzaTrjtr5Ahx+ZG9pZSI0I+NdS68ywFZfmrQ9UWyZ09ylZJbybLIU586waQDG\nEkdyfLMlo3eKDZvYIuOuq3DSYiGhBrRgLCL7STwmepdeyJF1XMhdvb2xzL1i\n54T7NC4SYT0lnB+A+6qzqQjVS6NBtOwVHXBuKMB3ru+Ih0CLJ0nO9acsRQFc\ncHpJKwhrrUgSi+AvLTUfG2GC2CEAUnsHzBl249KoHA8/dhpURW1nm/n/xPel\ng4i7WaEd0fk9Pf/gNR57IaaZZrmCRyktqNuioqTZns3PcfnsxKk7WCfR2e74\no2gau7Uh9MkonFagmgt+fwueOFfLvcSYRApyqwSH7lxmdxS/UQNrHUnXmTWx\nvJAjkH273BdekmXpHKcfWDJsmsZjX12qf8oIPEcDqwpVmp1kNdLGqkCwruSA\n5U/CBcQbxMy+LYeV+u343s+aY/+Nz2AkyyU/1dOeMeCSe0sMbjDtE6S6iKa5\nI/Y7MHtU2m1Yx6jOKETVdtTHSdkhccVDtxC8M9r+Tf1ZYUg2/+Fv3KFVthb2\nlRWAvjBnXv5dNgzLteToCXNnrKg+GkyGAgmi3ar8zzlMWCu4WKQ7id7hgeen\nnSGy\r\n=+OiC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIANGxVRysuqAoOQIvAWHr0Y0usRg60Q0IwHhGFqCYLy/AiA7+KYD93BLNsJCnaI6LgIQoCu3qXh+JgiYiLM5VEFQdw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-07d83b9.0_1556041424897_0.356229904289203"},"_hasShrinkwrap":false},"0.2.10-a3a80ec.0":{"name":"graphql-toolkit","version":"0.2.10-a3a80ec.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a3a80ec791c9fe7216fac6d7e4269e65bac62d13","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-a3a80ec.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-A4cYA90S5GeUy6jim3cegVRDW/GkTzeskKbqDUtL8J9AzhwEeygDytUnhq6gtP4S5cCgIMnhIiFvNGkDbYA+og==","shasum":"50b6fd8d47854bea913c6860afe1729415d42608","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-a3a80ec.0.tgz","fileCount":251,"unpackedSize":295900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwh1kCRA9TVsSAnZWagAA79kQAIk3yoZt1MYtL3hNLz3j\nyziJBfNadfly8I5Lfu0676pYRHYWJJSuwXWCaUynPMsHlo65z26r/zpt5pUT\nUg8TMsixZ0xz6sYnH/Cn61B0YjNEkq1prT4eoGFxZPcWDaX3Ts//pLLTiN58\n7gqajzgJOMAcXddLUONO6YZmBbbW+ma5rMP1Hy8B8UnHqNgDHSFnyGvQ6eQN\ndKQudj+eKKFkvz40av2OpqSBIFQixeXmC2M0h3BWxrFNM9giz8cIJHrU9jSR\npOWUyOstRN/6fKQYs9G91OuejCqgAIPtjLh4fHZEXMyHY0RInTjQ+mQlFikD\nKtk7+WtSbgmmNHGHrLfoL8WkRU+zpvdhSK3yAxSsNAvEMx+HMCYmEAcHoeK3\n5u13CSuta6einN69zMc9ujzhte3W6YQST1l37PLlZHs4eQP68s7XXZVO87yu\nv4mZw0opIB3yTslgA8OeXZhw33DKcb2866VA9BVnKT1Yl0tY39p8ZJsX4zMK\n7joGNRaxtOmCpHqU3CHE8ciTUPF5Df4h8wyvDNvEncpyVCSdMs0ioMPZNadd\n+YlqPWEx8hEA34fe5X/pAh+YuRglH0I3Vr+7VFmR3P3nKxi/A7XVd2hbkWz4\nO8kVTlu/UG9ZnDiDtO/KEmpWhMPR0qSsSPLImpO1/oAHL82SabrqDJu4SBG5\ngxjh\r\n=znkI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzERf99EJzLihQtz0sxxv60RkBYrEromoNR9c7c1vMdwIgchPYmuDiqJSkfNDTVLVtQfBfmcsTMdRSXDIGU4mXpwg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-a3a80ec.0_1556225379857_0.9847462196765526"},"_hasShrinkwrap":false},"0.2.10-39e2981.0":{"name":"graphql-toolkit","version":"0.2.10-39e2981.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"39e2981ab1321d37696aa18567849d68bfbf74b6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-39e2981.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-R18kDHFUAKgigXbV64ZRA4FhFDTgnVKEuzyFRTeRliu88909KDkNtAq9DW4e/8BNig15U5xaZD0Qq/No2msjXw==","shasum":"2201ec88821289835627852d8763ed66026a8531","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-39e2981.0.tgz","fileCount":251,"unpackedSize":295900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcw2HICRA9TVsSAnZWagAA1mgP/Aj96WE1a0q3Fs5mzAGK\nhjCI7WEcR1xu5RJx6He8sg3qQviHZGU0piYos8xL6McsCQkB2NTNSWKArWWi\n0qrODHJtr7FQQBFGcpC/lp0QxZzfBHAcxBznbLbj60uXk+DoGXztCXf+nkjr\n01YOgNpoASYWvIsWp/xyOeeGJjtxjyaMWKAcBAhwkUDo9BDVYDLzXc7qDjOp\nstIRJSis8RE0dX/h2jwoJDYZ7SH0g5cLH8Y/BMkhHR03/MUZfbThbFFKZHIo\n1D6HqY4uYgiF/5PWPF4sIE2oDK3IqBPcE3jys62EMiM3nOiQQxm5IFbb5flU\nYSTeW636yNf28WtqAcSrzUioRmkivcT2nuwam7nwjpD8Jo4Ztmd1ilnXnZDV\nRkCPlKUebKXLShWa70M5wMqeN2Eg6eUN4k334Ml4RCAx/7WrNSKyvH1XyBZv\n2FceJHoP4NeK5KU9KqqE1n+v48F+lNHkMmjHaCCkheOtXPIm2twtyCtq0VTh\nHtiX/78g2GcIynsmnsLNUJgpQB88oWV/hczKbFT/eheYFtqAx+EbqfP6Iyk3\nh5KSLWjcJSZMGawQH6vUacofOhXJ8scNLNawzAgxpREINuoNrCzy+PMeTV+L\nP9dcOclkAu+OGc1AbJfH/kXQdufWT6/mnvkBpKtu28hOwknPqRy7vK7y/yEC\nevhg\r\n=i526\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDTA8fPropvjjq/cr2ct5KxqbCyR9euYK54wY/cwymXFAiAxppwnHVgdnXyCLFXIYV9qAXOPFNLplpPByPaSb5X6Bg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-39e2981.0_1556308423653_0.7800911971405708"},"_hasShrinkwrap":false},"0.2.10-4a336cb.0":{"name":"graphql-toolkit","version":"0.2.10-4a336cb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4a336cbb2171649ad3c4b41bc14c4def3ba7f1b1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-4a336cb.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-PjoEVSZNT2aU3F7HMYtVUEU+yg8jEbtzAHIoZbMOj9cNa88smXW0qeCE4bcA3SH51qOvoeGJr5Sbc4gvRy59Fw==","shasum":"6d5e1c36c0417753a59528f90a2fbea790fbf25f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-4a336cb.0.tgz","fileCount":251,"unpackedSize":296616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxoBzCRA9TVsSAnZWagAAyjwP/jk7k2aJ1uTzc2Tr7oCM\ndyclPGc+A6P82M+fJiXA6HpYJ9Fr/yEmJZlsux3NfNPqYEiUQ2NkoxNJk0up\nc5KnM1/aY5MaoyGnlgWFKH/FsO8KfIPKhCsq2cvBA90k9nud5z1QtT3bQLle\nfcZEko7RTQVPJgHLH3z5YgZqr6joS5xV9F1Yf1pTeAnUIeQ+wL97z+CksJqY\nRKMTgd6jTA+ILrLwmdLwDw0vA659/m49yLCMplMykI0LZuMNXa8T+TzQJr/5\nMfl4gk4Ch640Mz8aB4ijt2nkCTmRGch9WzWKa7kZgkdmxKK/puWAvpCWKFgC\nL9M4akNmCdZOmQ37WDJv9QE7ogihd6nx26u+JK4Di4YElga5rJrBY4MjWSRe\nm1v6Ukcj6mKNc0qjxIyqCGaun4DJxFcJgVN5VKHMywUerF2SlZujRD2N15vl\nGvbhQFwEtL1nvrSwjDdQl1qE+fPmFlF5x5oOl2yGVTNEUGYAAWcAJXMOoJ+H\nDKOGfyr3ceKZ03E6ItTIxsQhsn+az53e0jLMMsTW2+dJTK30Dg7K0PCeCGsV\nB4bor4c1Q73k0QZyOiSmRhjiuobslkHI/qpR8VWURhze+lDviJ0GlGteg9kt\n5s43RPbtiAsCspZFodhWjtJYMOVRR0y6V10jgORgzAw/Z1aAtBelz5vYS8wW\nLSMT\r\n=Vll+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwhnpt+cqDSzA6tyJ8So/+kyDfghSfl+QjSeM3GkOnRgIhAOV0/oPDb1sPBtOEPipU8BuBoRE5GOQticX5305hUDnI"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-4a336cb.0_1556512881658_0.5655001089358382"},"_hasShrinkwrap":false},"0.2.10-ded7a66.0":{"name":"graphql-toolkit","version":"0.2.10-ded7a66.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.0","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ded7a6670695a2f86ad6f2e40d52b37789fc9b38","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-ded7a66.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-fFK0o7coWTolHP006rYHpU8BRG6B0Tq4eBXU4Pek8P574v8hof3wSFa/uiDeLPdbHF7tCTYVPyVbQg4Ljdo1Sg==","shasum":"f5ce8dc71c36a192f89c5b9ca26ca30d133a0e91","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-ded7a66.0.tgz","fileCount":251,"unpackedSize":295900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxpsCCRA9TVsSAnZWagAA9gYP/iB9J0wePjgakQPcGPtc\nGPdJp+8vHjowkRHFLd6Q8T+Pr020T6fFhGY+tzDADtx1vRZ/uYBl06EYAhxB\n77jFgrT9NxBy/z1B7Un2rT/Z31KnvEWWYLyoz4awG2RM2IUmjQBX7mnmvhRP\nOVmL5UVqznrX7itVcw+F+Juc3vCUo1CZ82DQ5MPN5W9QdwThYinoAZv3uysj\nc8j/OdfFi47x80+VgH5mWMiSKT4wvFWNfNwrTeTwcm9MGfVdHs82N+8p4zwh\nV9RDRkDVGSyNAkBAk9COz21rB9PyAr7at98pMY59kbXUL68/MeG005HsM3pL\nrf0BvxWu3hvtWxt1B83t0tU/dnMoH5IXF/uQaamHe6S3mAE4Zbj8x2Wyg2n0\niEOszr773O3F/DlhpbEF6aqD8GNodcVTvrWJ9+EOQLml4iA6P6rIA0/xd//t\nuWrFnG1RX4Zf/w2dN0lAEwIulPNkZDw/+gz2is4+92MLD1BN/vEi9RUbTS1F\nvP4BQU1Li3JdRNzQDuHktLxlFIGH6XahBVtgoOykt+LRui+HM+K06LSMIZsn\ntJWYjGWA3vVLfERWgSfm+HWKf2yzOM9YfSOUywFcp3mrGZoV8uxj917f/8Ix\nMOneVTPc8We6TYjY+iatuqu8d5199KIU8HiOcroEaqKktMMUIxy6vznxX7tv\nYHoJ\r\n=juyR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHjyEpu30x9DUzch94T4mENsLz+mJ+f9g8VXMbc130WwIgMe+z22fuwE79Kp/VEf/QlSlTmW/bd1Sm7vATdnbiAec="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-ded7a66.0_1556519681297_0.7569025964488898"},"_hasShrinkwrap":false},"0.2.10-6956f44.0":{"name":"graphql-toolkit","version":"0.2.10-6956f44.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6956f44c6f63fafc9f623de4aa42d64af40e4ac2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-6956f44.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-HZnCg1g3c50C4NTOzkjXUHm6x4l98R5UcEOq/St1FNH1biEJLdX8SOoflgL+M2BOswKHcnukINggswsOxNRwrQ==","shasum":"d78b41e705468aac3a2cda64eea3a5d720bda6fe","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-6956f44.0.tgz","fileCount":251,"unpackedSize":295900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyBByCRA9TVsSAnZWagAAHzAP/iWkS8PTSNTAUk747iBO\nkW0vVoCK+AZbeC8RE3moLCULNKAJFdU2qteOFsckC0X+Yx18rEsHRAcG/OTR\n0xs9mCdq3rJGP6CARpqOCvKeipW/MCanXBeHdCvkSAWLCMvmI/IhbC+IPVL3\nz1tYiWtuJSnW2emvyPn2QWyZ5Be5q8RnMOACySav2a7glNrR8BR37YunrPrp\nMGFQD+YsRlocwdEkd1X27OQE0xdWs2UQfNCDqN4rgHz9rMIrMrjswFNNxib4\nM/Hci2Yw7zy2p4Lz0iwa9AT9ptqm1cicfK6OSgewilE5f7D5l3twREYloiWZ\nDREEhfPTgOVosS454oe17pGxCelNSf82Si4lBomFbTBAsx0qQ+szAPOJgWeN\nhtaY28EI45AsIzMhZ2qEZLsqIDYyvLTgXnE1XZ/3aHH3AsMI6f4aeSCypsHC\ntO+PP1xgIl6p8cvvqoFQxpoowzbwt/FPtw+vTjROSUKo+D3GR32aIeY90TM0\nE0Y5YnZP2aolybmSTO7EKRTnqSU9lMMIMvM5BozEaXJd1dZLNGktlwn9C8Zw\nO6pPUbSQOeC6GFXJqNd2NxAu7gLCG3EflfytOLq321UWTFOV68ZRfK/4rPio\n6+HwCoHYdO8k0uo7Q5h7ZKaVH2HrhkbI5/MB4Qmyp4af510x4cmVRS/gjGkj\nrlL9\r\n=RAHi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJx2EjI+1pYBipiJypuFkUJaSd/Kkt7hbCdB40WuAczAiAhaMtzwzQDsOD/v2eq98CMqKmi2gQ3jZ+D0kpyu/CnZg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-6956f44.0_1556615281455_0.9044494547275648"},"_hasShrinkwrap":false},"0.2.10-eca9011.0":{"name":"graphql-toolkit","version":"0.2.10-eca9011.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.11","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"eca90118e450cab24b11577f019bdf4e577d10a4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-eca9011.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-N0osGUdGaREl5+HwWsVtejKS9W7cumsvJpwRkFe8l5+bdD7s4TYM5aFmfXDCWZlPWS60e+g9b6EBMhYk0Myatw==","shasum":"8c70e595f11ae0976d2f9b8c6db244d26e7691b3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-eca9011.0.tgz","fileCount":251,"unpackedSize":295900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyBQYCRA9TVsSAnZWagAAIE0QAINXhW/T9VpdZv0DoJja\nTq0lY8YPqMZjdfkG4fdcQ/FMJY6Ysr+RreetCveVlJ+RN0myYq8L+Gmt6sNV\nQvLi0LNuDJriJiiPHRXZ0w2s7YbvSwMm8341xoZA4v/ftSAi2LXVCipBmG/J\n9Ct84p3t0yKieq4ZDLABhpkIhXAVW3ZCH/2x5rsMNNvCqn5H0pfgB0eCCYUe\nrBB+TB67r0oJhMGGM/iRm7buGRR397xFO8JApO5auX+GMph8uerFhMlCxJTX\n/qKVbJhD/lYg+v4OeEn3HOMQOQXiUm48xMFG6g5B+GbBNi4o02rDfcbta+gL\nC0vsAXoZpTNrdeBkv3pq7Naa01n5Pz63kTzdxq2lWMmYR3IhHon191PplB1u\nNZee/Lw5dAA7XFvMyJT1OXKlKJ8wQSS9ZHzU0Lwz1vcjHJZt9fVs8t1WhTuR\nqZRUQixq5b6/EH52MXSDDeQmS25sSeYaK9FyV/vUQyE3BWrDHpZnDG6zrbp5\nSaAIyKsFDgyYrZZYizoq0iusrKWpElHuClNNHxTEs6dpN4J8LqaLH3B7uaSX\n5Kily9PdSpb0BvGKhubqavW4m+2EnAfxqN8igqbBFgXmzlvTt5myFGmlI0pe\nWZfzCj0I9eZJmHRk0b3OcYrjL/0klq/xo1SfsqswOnTqvtnXrdur4ErYf3xY\nWc49\r\n=+17F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBynHfkaozw46mHooH8m9hP1a7o7UCYA/uCeSh875rJ6AiBdXoY9K9nqDaaSNvoYr/v2GznaaYkm7hGpLVMTld0CuA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-eca9011.0_1556616216062_0.45356963580666165"},"_hasShrinkwrap":false},"0.2.10-9dbdd92.0":{"name":"graphql-toolkit","version":"0.2.10-9dbdd92.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9dbdd9271bbb0642c21db7d63785591e3b1c9d62","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-9dbdd92.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-GiGBHnZZ310JEva43zJ+mEpfDHxKZ7IBU3DGJwK85LfDtAUpRl4YMlcKSpnT6s5SMv+qXFKTaqKC/1v7A+xeiQ==","shasum":"e47d13aedf8113de4669db50c093e371c367f03a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-9dbdd92.0.tgz","fileCount":251,"unpackedSize":295900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyCCHCRA9TVsSAnZWagAAPBoQAJeZuY66HnmQhrmo8zoT\nsIRC58VXVs6y2xOolzIJAgOxo14Jcg4TaJDoc10VFR8fI44N8EWBx7z1rUWC\n83XuROF90kLzvFRGyGkGwcQXeBeNEsxTZYvFrqbCub5Uk1STety+Ip93gODH\noorUjY0PU0K20aSNxjVLrC7tVOCGxr37vy4lHha0g76IxNoylDDEMnoPZ3fG\nvuvlWGLbDua3eyI8QlGV0kRG2BANh/PFJtwhw0a8ZTLHjxSMHyDGnQTNCzOQ\nXB/F05zjbIIZTBj2NSSRyo64rknTXjdnsh6rqAM2X12BrUGxQyHBS7pOcFPH\nkmzFntuAHtuC7DNbpUKIhsR6LjTcsdqLP/9Y95GogOyvW+HVLR0Xo5GexkmN\nDHvroWTmLkNwybtND9/dh9eVJmzImhUCyF0lbE8+zoswinpIG0FCJomSi78+\ncwE1Q3bLI435EoFcAVZCzxghLVQtxFm38Pu6wgGRd+G+M0l+cE0t2+eTUtPU\nx1wYv3gzngajnqRa+5VsiZ1xdO99YG6+3AtO8pWz2v6aFvCoWeUko1oWtldi\nTSr8WV+iIyh8ZHRwa7YgZh9IFJaQP/17P+wUfb9kFCLkxSynO91Q3yR/395X\njABuSiK16cgtxOV1uquB6XF4d0nFBrE/nE027fMIQ/gPuUKzhXKMIfVyld/9\nx7w0\r\n=ef62\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFlB6ZkMyOA3AnhD8yyqD3YskNPVZTxGPIkNDRwDTgs3AiEAo3ipyGevKOth6B0Qnk9Mu0X+ypMCEjYRCOleH4A2PSo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-9dbdd92.0_1556619399219_0.9869137657251426"},"_hasShrinkwrap":false},"0.2.10-e9156ba.0":{"name":"graphql-toolkit","version":"0.2.10-e9156ba.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.5","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e9156ba131f5b084ff00816739b9bfde4785d949","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-e9156ba.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-3MDF6jH+nMHyvqbyVZy7YMvNnch6nEkacOMpsEwmRBfbjOqwixf8bHXDL7klFsbA6VwUqTPAQlLgLepgqyw7GQ==","shasum":"3767b1c0e2409d0a621d5a384732be304d862701","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-e9156ba.0.tgz","fileCount":251,"unpackedSize":296616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyCCiCRA9TVsSAnZWagAAw0IQAKI54220fQO3ylCmZiTv\nl3C+rQisARwUR8malvbP8fu+KQB+XqyCr6ct6Kz6+894py5kjSQZL0N/qKf9\n+UUT5hTKrc/g2kld1ZdrqqWJzd/U1qql2uJEefascjl9mNEq4qB6Q18fplHu\nP3COEORVTAtwRk0rUcaL+ZHaPorPgNyfXlbHlPRQCAYl0yHnq6W6rFv48zaW\n0blJ1/S2T0G06TCk8Yup0Szzq9wAzacj5Ya8X7FLfZh05v9yEZo9pm3GNXk8\nyefjmozFJGObm4bdtgxCD9uqUAyTU5niYk8v115wVJNiuSNW6cQkCYO7tGJj\nNAqJWYAZEYXo31txLLyTlDmmVz2t/vF7ny/LuRLNP6BjFgORHieHiOTAMu1S\nDZLnx3MtCR9vpmag+Pzz1KP1NLGdROQvp7kFtKK/1jUOj8UuhHWR239Y04yA\nZPkBuJITiX+/24jaaB+EzKQfwRJX1YkqN8iAVXjbR8Qcd1V9uPQNHUBPD9Dn\nhLggh5E4WsQx/9u5BNYNQ5gjhXLAsejBNrBu/titnw7CeAi3lZxAjJXqRhTd\ntFefCpWdsyIgGbEgXfzPYAV7HkBDjh4W/gxo0360rNe6A2gboKpVUvTY6Za1\nN8P7lji7oyGvVBx4CH5YIpAGboKgMwSkOAWLEfmd7zflFLwlmwbt0T87BGGE\n9kEr\r\n=I5g/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMAbXA2R2zHKfn55B5crFHz93xze/ev6334iOZEkBuHwIgYaUpykeY3Ay6PStclBR3xeOpIG1wAUS6q9D4GgmJpd4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-e9156ba.0_1556619426166_0.3861680906486462"},"_hasShrinkwrap":false},"0.2.10-f814a43.0":{"name":"graphql-toolkit","version":"0.2.10-f814a43.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.4"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f814a431a792281ffa99d5d95b6af1cf8c455ee4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-f814a43.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-u+UXXJBxLQx/hYqgTPPNsav3WWRBaYe7z7MQNtWRDUP+/IbixF06eoBay+yqBiFCBYGlHmmvWD2ZbHrzdULkXw==","shasum":"adbfb1161c4de1b4f6fa102c1d60b4c43d91b2a5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-f814a43.0.tgz","fileCount":251,"unpackedSize":296616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyCC1CRA9TVsSAnZWagAAss4QAKL2Z0eXIqObuPRBFFXn\nkBrnTsL9z3qGcr1dauOEdiR+N4x9CNku+caA528NKq6zbf0uvAWpn+EWRVxl\nrxI8IyoqPDm45fFirnYs92pTW7j+g6HI5CI48o9W9+wi/zIYvuc8D3L1mT7G\nOBwGk9dRQK5HiS49Ot6uFtVFUTFPbiqMtdWUlrw0sKUoCw5+8YxDXU1CoUrq\nJSyO/cz2AKLNNSjMJpSKZ7QPalf9p70HLnDbQejE4PmMRfo72TDNrs828IWz\nc16faneMa4hewd1TcrL5Leq+fhNnLY7t85Op49mJY0oPgngJ8qpc/WL9PIa8\neeI4MlQVnANg6HSBsM+4h8Fp63h13tZWmGJNKdGxotwsXyqgq/Lm++pO0RHn\n3+Hb4bvcUEGxgsR8bZV2v5vH9uIVbYX2OstqFRDdh6jgWkyifb5EXoYRpKsV\ns/6Gj1VtC4ELJ0Z5ql8LPoIlOuw1WZT5tFNopyzCKlEpZgd+hi5+qUpZy7LR\n5wnwDgW1RLgTp5AreQ9i7tS5yF2jO65bdF69bu/0WsKQ6i7jiXAbL0IRY5mv\nqR29vcsNh/RX+fSKxduLC1GYdAzjWr/44yJxbt2IxJ8xXX4FE0JziWi6SQJp\n0A9h2kksAvYDx/gZ2Ntnu73d5nOPMx5zP8nOQKQ8yeXJYegUz8vBoVi501Cy\nmOX6\r\n=YrDj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHtp4N+ix/z6j45EyiVA9GQUXK8CxrQncjK8s5BtyHKUAiEA6LU7On3hj6heN/1kqVVk4yD5ugKuDXtaj5N2y7xjQ1M="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-f814a43.0_1556619444482_0.3126373098710149"},"_hasShrinkwrap":false},"0.2.10-5916b3b.0":{"name":"graphql-toolkit","version":"0.2.10-5916b3b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5916b3b638a55dd5a6f12f5f38c5b1ce80fc0a99","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-5916b3b.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-qH9jQG2F6+oU8bJBnsaRRRwU5qJzCQTpz2oZuTZisjKqbWTvOOU5UPkZZvZauHUpbTMjBZuv+opQWMbqr0kDFQ==","shasum":"0353d7d7970fe7f19cca2ec282aab40125876e55","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-5916b3b.0.tgz","fileCount":251,"unpackedSize":296616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyCDFCRA9TVsSAnZWagAATDQP/2EsVkP3wByKPvJGp0m6\ni/gDeV3vrY6GTLDPlQWt6eC6zVKHFG0dUfusmIRs5h6ma84irKOuZX3xuQ9X\nG5AB7xr13xpEFKz8IwbzS1iHgLZiu8iHXu0xJKmKu7VF31LiHuVpM8gQj7PV\nRp5lteBD38f0AtnqENZkkkjD1FYrRXEAXNb1tX8gIUeWC0Bpuz2iIZAtmhvQ\nrWzQMjeHwejZFv4kYbJbc8quLznnnZzexRED3e2Gwssba2cef2QFxv5J5Jzr\nmdPZcs+IeU12x8aZq/6snqhTU8/6JU6r7fg6YKB70KMV6juu79u7JX/NaIa6\nxQpW+5kvql+4INVnie6T+T2+pXMRxHVC77a+YZdCnCE7ya0MyCT838P5MhuX\n0if7IMNbX47WJDMuVMdzKlfIj8RNIi/LXX99vfF1jcF2AQ163ONaNGpPedSc\nAHeQRwGHgZTGOt+398lr5TVYe4s4KnTFzIoDemlwwmlI5j9GEWp20ecSDx5l\nxkHOz/2aQHb6yzvicsG7FAtvQubqUl/7Fi3btDsmBGoW+a9W9EdZblFTG35n\na+IryoO2fczo0wS6o0Bmam/dZuo46rLsgebxxQc23CXfR0o7SxdE6IAwm1XW\nrCNM7kRB5tkMPrVkT9lgvptAwisdQDqb56PdfAK3EPr4P6/PGKdO5now/2sM\n//NF\r\n=poQK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDr2m91WhjD34EJKFNvQbk5lp6R1KP/KMxOg9hL5/AhdAiEAo+EzJ8k82eoF1Wnc5MI9IWkeN/qdbwpHzMRRPqKF6OQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-5916b3b.0_1556619461455_0.8141688259649"},"_hasShrinkwrap":false},"0.2.10-087a8ff.0":{"name":"graphql-toolkit","version":"0.2.10-087a8ff.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.7.1","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"087a8ff0b6506ea0c7173b66061292036b90c0db","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-087a8ff.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-82Ifhy44GhNQp7ZVhVP+HgmoMiqg3mWYkWWA8XUr80HvXMgyGtnC1RqqBrohykgicBm/C9UTC/G8lv78mAz0ZQ==","shasum":"626320d45258d67ef53516580ebe714d6ef5bbc3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-087a8ff.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcyUyrCRA9TVsSAnZWagAAEoEP/13baes+U+t//+H0k5q9\nKHCJKV0pK2pHqwHZ2ZpD9ircNLfIdL1atwXkReDnbjAeNhn5/3UJ4TgG4+n0\nlOIC3zW0BPUsawQ504jNfhfd2dHSSXvW4SHD8FY3vHnof8e/MfeaNrz8wo5j\nDJIR8NAwHc2rR/3MDLBCSsLVqxywAaWhsLAfk5LA5eY2lp9D6okLpzq01zZE\neoVLO/XU+WSw9u7l0RRt5WNHlvmkLblDb+3DW3lXJuPHDA2pMMboyn4Lf52x\nvwULMuwRMoWwd8tE4Y6a3fWgs4ZorBbZgXdaz3TYIAR3SBgk/edvWn2PZNxp\nVTX/a5jrgwJwBD3yWBW20dSg3CcGOwzzZ7/YFRYkTsGzg3HiFc6817TCLy/c\n7RUuxzkszLgf09G6hxZm+FSM9R1YbmcBF00BzEg4t/Cv4Xx0C2wuJUI0mwpl\nTeTCKEExcD97YHLyR+zpFrFYTXlD+MDL+iKOGSuJU1CwqMOSaVM8DVG+ApOE\nuhWsxa1FYwoJbVx0ePSTpE80aB94EET5VtCmE5JLaCn6pK4wm6BC4nJvHLnH\n2JhGF5GngB2/+a/yhW8KVWiWuQvqbcz89ayGylbnMT12YR423AiMeu8Vzlfp\nX8mep5nWeCSzol3Wt70qF+8HXfUfMee89XQQbnc/uehaqMx/vDCDuzu/vAuH\nNuRu\r\n=aT2y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAD4x7/ZicOi/pQB8utli94yMTK+Q9PYK4V11HECk7U+AiA/W8YSf3oEVym+uO/JfRQEoYCRvwIKgCiki2YBDxdCww=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-087a8ff.0_1556696234948_0.02702886735218324"},"_hasShrinkwrap":false},"0.2.10-fe4e187.0":{"name":"graphql-toolkit","version":"0.2.10-fe4e187.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fe4e187db537847956087cfa608f0ed2846e05e1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-fe4e187.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-u400Xcy9YZwkkkFT/HC1TI+vx8zB4X98b7E89bbpbgqnTls9VOMr4NzhlwnR6vAIIaa/Lxivr1pAMBeKvDa89Q==","shasum":"5b407a94d97435165b8f86f7cb070954ebc38b51","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-fe4e187.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczkjiCRA9TVsSAnZWagAAldsP/jr1GtWg99ZyqzcAf58d\nRmJuoImIXi45NGPBdeVXtzvNHihHX7WRmH1RsSUlvqoqd1GbJ2vumPoR180j\nOtJpRyTC70UERVl8keg3tWLkWIFaGPYsZk6DOf80fdmfhWu0whoflc2hVC9d\nX9+QKhG/lCT09WIF64+E9ROnYU8f2NB7OcllDgWPXpkA6cAJp/eNGiGgHzrE\natCMeMLilguIQGgLnwhTyxn2o5VcCReuU+OlFDROTDbpqQxzkQQDQjtrq8fc\nH+fvRMrn4LrJsvLxqetN79/nIdoQJk//Hf0f9v5cBq8NZyX6WyR5+cv7HGh7\n5VZ6542QxksuZo4alZbDaSciADlSW4r1csRcCUC86HgoAfCuiRoS6oRcod0t\n5CcVQb7VbqaxHDbwcMuSO9wlMVAutzP5+KiKgERK7Mx0Y7CIstjnyPdzK+lt\nVutr01GuIwyL7cFQEcI0uLoo+3ItqW74SkZOWoSyuBRyZ8nkmd9QWmCWnbqj\nE8tcB97k2ReDIuYFOPM69EK+tUbcPqWuxWnkNiUaMfzOmXpeEefDMDDlBayi\nhQGcM4ni4dwpjR66RWsUaX1uWCyHndraK978xuLXRLnL6NjSvTNt26AzWGVE\nJ9bT5aR4nO781TkN67ChwEUmeFCKQpeqwFoJlC303a8ED3dK8gLYVJc8sJVx\nS5R5\r\n=9JqV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOW34CfXR3t1BsNetJOoxCpf6wo+rGqNXOmy7UyVsYeQIhAJiVuYrWm+QF4mSN45wTugzRWfhmZmzNo6ZcDYwlCvpJ"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-fe4e187.0_1557022945916_0.44682721982314333"},"_hasShrinkwrap":false},"0.2.10-33f484a.0":{"name":"graphql-toolkit","version":"0.2.10-33f484a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"33f484ab059798e16af8a90322beb64ea467ad86","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-33f484a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-C8XwrvLnb+S27ygwXZpvSwJfkTGuIzNTiUB/KtwgRfUOD+bLBSqLFkOFS3ecy1gbxrOIDAfHRXQSbtBPpGZkvA==","shasum":"3a08d895b26718d7d6eee861b9dce7fd073eb74e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-33f484a.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcztIsCRA9TVsSAnZWagAAJaYP/06s81Uejkumt3e6IqsC\n0NAsme0FGL+XbbvDodAp8LXDigeBQkrPNOcdP1H0k8LnZtQ00ELYwVys6ziH\n7UK1bI10E8zOU7NKjMHLV5yzgYv75fRHYE4AbjFvkhpwhdBrJYuefw6TB1pv\nWUuj0sp+/Etc3LXYZjNALB3wdEC1iK0pMhX8EmxCqgSVHYj1Aa+Glqb8U4aR\n8nD3q6cORNruqI1adEkdjeuqStzMsf3YE2iPQ4u7YGu5ohW3PlgTVFlIhibC\nNOCqtV13Z/Hx6dgGlHV5Re9tl0QNsGiZhzzWk5RmOTpJNfKeHrVvFYoX0L+i\no4V5YYcHKy8rnJnfXaunhSR2nKBRW2WS65kb33DtZFqTkJ1JIQyDksicPgUa\nC0u3m7VL0+o63Bhl9YiEtr/awG5UA1nOceoHY3bHB62VPMPPfVIl55HFuYNc\ngsyUxYQfZFulNsnucBX7saiZrzzbbrmo78tT+QtkbGYyPcUvgg5+v472BZ4H\n4AqM+hxbtyWP2Q9tnqWFYo/HAGukVQXJOyfFQAG4xjxKqpcRW1wTYp0cTkkP\nuPM8+1qT71ln9L3NLpY8XYIruKbTWmf1t8l07wvB4IIlSwzFYW0F7wo79Aw8\nIgU2KRtMI9svTnS60wCCrs8h31niOzG8uZiuXUUVoN9Ggpx5i9ccYkvWqjSu\noN/H\r\n=0Srw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCswnimM8BG6q3xpRAgyjyAxAFUeLO/zY2M+iy5LuuhQgIhALuQ6mqkwbi6qhy4JwLo8p0MKmbXhKNR+8sD1mosMUNZ"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-33f484a.0_1557058091719_0.03847418529958335"},"_hasShrinkwrap":false},"0.2.10-abc54d8.0":{"name":"graphql-toolkit","version":"0.2.10-abc54d8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"abc54d8d5e5841b8202ed814e0d74d8c95fc4213","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-abc54d8.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-h68xDekb/G2i03EDz+5HSpEOrMvUVYSLBbfRcpFYbN5X4BtK01oq2Lra3hbg1/OXowmjC9FZgLQZ++H0MpzpLg==","shasum":"3ff92545a499fbbafbaaf7e2f1c8b357f5c35d10","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-abc54d8.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0VypCRA9TVsSAnZWagAARMkQAIBs06b1XRhp08Mf1kLe\nk2y4rVlko/baI7mFWcCqjKmwLsqqq8XckljQfW1hAFrpt3RzM9OMVgL0Z+Wy\nWuuKsTEeIXmLYyi+wk+y935bPIxqoe7XTf2Wu9aAeDm9uEr98+V1pkmBh0KZ\nFuqDE8yPeufcAd3ipP1hR2Cc7Ie6cAWDDdEIOy0ulXVF+eeEgmk0Nox0OVDq\nNN8kSO0/ScLM93n3dxTmBRZRzCTQj4LI1H8ZN5KxgyBX+bTOlZPAzSgyIIaB\nxiieetTPNg6wr6gkqSKgSA8XC11XdJLumN+31GYaIn+Z0Tsc+Sf1QbZGDpjU\n8nmMAjMuzdzwrEQxwWfTocs9SbmPEQO+rX1JyZSMloiWvvNVSYw111tGSLnh\nWeXGH29OXLYq4W9zeeZQYzEYRLo+4ovt4mWhtI89fPKwHdTsWZ30TGc7242i\nHNLABD/hHUr1f7+ISpnmAp+QNhUHNLmVnvsbQ4dH0ojIB/01ixUvJw+vaM7n\nR2q8qAEHobJwVu1aXJoPUkRYFlpndb9VvDL95KbqCcz4YWC9Qeuq+uO7HfBN\nF02uRDKgJvHhPfKqLzKA9sLAsp+HwZbWkEdtwUTq5pN9zCCj2VLEdj4tm5fK\nwq7sjeTbeRKbNqMLrHqZPGCsgef4/VGXZYNTic5gT9mxkIo659APW0EQiHmU\nV9Bh\r\n=gDLj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4dguUVxPXrP/xZ9LjGJPuWbWkviioJdapo+tClTK85AIgdGkV/WOQigfNyo1ACPc5V3D+LmUIxFtLCl6Vxzt21xo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-abc54d8.0_1557224616534_0.5500766192573727"},"_hasShrinkwrap":false},"0.2.10-6be258b.0":{"name":"graphql-toolkit","version":"0.2.10-6be258b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.124","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6be258b739db584c10266052a5885821bc12e2e2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-6be258b.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-9iVDfSQMIWoahbVR1FHyCjADhoBN+weRVfZIyw+0PWN3XhmtkEJrYFox3hxo31VAXXqYw/phZc/BzbEJVTsh1g==","shasum":"aba336d42fa15f9557a7020d679a22ccf652790f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-6be258b.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0hjTCRA9TVsSAnZWagAAdQYP/Rl6WzShMJ5dzdYew33P\n4LmNEcLgTF4s6V7LQsQcMNbEdZjUwKJijXKK/8TxryYJzy9d1+qib5WRMH6n\n47rbJi0p8QlwwEBmBtNlNUBMf5RrP53wZcbBM1jA0GHu4ABvX89F/YZIHSPO\nULtiWH31lsczrLPV1qzaWQ1d/36pXb0THo2+VtL6LAwaHvOFagDpkyrHz/Xe\nE44Xg1M38oqfmFcndPxRMONbSQ7RTajYlGDkukXdzVR328m6V7OMkgncPvvT\nzulU89pAHk5I82oLYMO7Mo63x2O0Ey5WMIJLxLZ3DbBa1JkIwBfAmtB5ebEu\nDXZbfGbxNwYCCH7UtIgC7VlDGDVN+Rx/jBqAwPvjU7wj81Z/fvI58iavqZE4\nTlXAi5bleW/RAP8josl1tnXyAcsv1Ouk613I2RZFftpgTknOWq26be+OXSWR\niGPx/vP30Dcpin4lH7ZzVZrX1Xn6mHFSy/tiZyk/dr+0eHFzIYD/0fQNQgBC\n/bZDCFW77wWll1OUBPp5pvgH02sm+2V/UpETD3HjnwKhKzhJSKpcxcH5Uuuj\n7QjnFdo5VO0kBXwyx16RbHVNjtNtsp2ZdmY7KnUFhjrFXWpl3O8PxSb2Wplj\ndKz69/Q5juIcX+7wtsm/20/5l7+mRm6+9DGdLHU6PTplx4fv96g5k9EZOBY6\nmir4\r\n=XU9K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDq3Y33O2gahkWFkhSF+K4nAtzhUgtnrFkjsUYwQAP1dwIhAJadHdmbgrBdW/LTc7KgH0FgPP7Ifm9ogUfAsMl539Rm"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-6be258b.0_1557272786923_0.40393874086795645"},"_hasShrinkwrap":false},"0.2.10-4f2fd22.0":{"name":"graphql-toolkit","version":"0.2.10-4f2fd22.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4f2fd229930e50862a36c10e9e00aad80cd9770a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-4f2fd22.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-33bB7SlFg7EIORkt7EilzccrdS11MLohs+GQTsjQYkmmUO2dq37FGoFIiovmb1IiKrTThbdUeF2YYOV5h4NeNg==","shasum":"f4dc0c735b4a2203f65d091a737029852b3c354d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-4f2fd22.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0iecCRA9TVsSAnZWagAAmbsP/A+HtMz7uCVRdKtwVkw1\noFZEdPn4mVYhmh0tVeg92XD4zoGotg2wAwiLUZJKJ2oCvYffzf2r8U79OEuw\npQsR3LfsDUZAMPZuEDLeeiKCzJokJI9+HmVPlK/TBII9u0gQ4V4QLHcgp+5w\nFGChh5QdXpYMehKy7T0sTOk0NQiJY9eLfKHxZc31NZDiCFMR1CUNBxbh+Gdj\nswgC3Trd032rtu3GwmBYHEHO0vMDXxShi/ENb2FTI0u91OhKsY2Si+b1t626\n5zINrCk2qcAAM8Pze2XbNI8jyJAjhvShpOW+pQhqej+ZKWechlXZQg4MqgCP\n6iE1SAgAhsk4LBjxtFahQwJSKoMPLoD4DBFG4YvOWEu4a68uRsAgNmnQy8Oa\nSU2NhOlKnNEwJ/5PVq+TywZYX6n7cL53e6yyFmrnUyIXvJPMVShDgzss8bqq\nBwfn0mcRaA6+xrqIAqazBCvvdqe55GdAfpodLExJDbGFff96MnVrZz+XDxpv\nxCmd2XQ3AN8vgPup8ySbcZeQbf4KHAbHjUaB/BwMBO2nnaC0BR/TtBOuyF73\n60J7htFoya34syWOCbbpof/dGlUpOpJqgCyaHrimqAAEBRXO8iizQYDvZuEW\nsuXgG0LcOjak36bXYA0kB4ccRjw4T66tgxl3wHWL8iPm7UtL0yhL706tfkvV\nUzxI\r\n=R610\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD97+3c/X8bwAZssgC8V4GBkQ1lOMeo137/ImxxeSJwOwIgY7ytcuFXuqyR0jy+Mh1jL04zpb3KoE9fat4Wfb2lhMg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-4f2fd22.0_1557276571563_0.6417755864362193"},"_hasShrinkwrap":false},"0.2.10-617f2e8.0":{"name":"graphql-toolkit","version":"0.2.10-617f2e8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.125","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"617f2e860b2ae878a3e34e6269842af0c2a7ff7b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-617f2e8.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-UpWhy3PxqH7F2FYIcQulixpVfvU+IMGhcIOqWggOC1Z/gF0T/5eA2e2dZ46WCncuJtVAYYXc0gXHTUaCU+CDnQ==","shasum":"15381971800081b25f8eb2fe0e5e8db7827365f1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-617f2e8.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1FC5CRA9TVsSAnZWagAA1akP/ilDtTB5nM+yhutmEiSt\nYtUqSwtXwqcBYM/PPS0dVH9FsJaS7L9bkaVBRfhGIcYXz83YcPFDDNiVzr7j\nyXvP6v4XuGNBAcyUV4byxBRRxMlr3CCVBRKRIf4DbfbgZOpqagfQOyeF2Krn\n+nbiOvnXJjYX8JS63sKlnzGJBdFvOpD49Vcvqwr72jBSSG9GbjfbKakgrEG4\nmbXWlrkbKfXFZ7fq6fEJ9SUjhRoipZytikjUcTjU7nG0fHB4MpCWsoseiorw\n4bcd5Ijg3FUbzFPHiNdWHRCG9dHHiSixS3UyqCkwbs1pEN/E/9N3mjhbWKZ+\nRi4VrVVQZk2XLnXbONyYec5A5Jm4oaa6uDGxRVdnXwzR315wwOv5/86qdW+R\nwt9lkHYyE+dhFAaunmCKcK0naNB/gMA9MNfRLH6spofV93hXOLmgPwjyPlEe\nKIuuuvbx+T2GNZHxTsuR9kr+D4bIeRQeaeVzh3bIEBg3YnhPfWuA3NpywMg6\nTyzYnn6QpmhLioY0xxk4O+X73+V1QB+dDeHQt4hKYw+i5tFQDg8dBMN+OktM\n5fqL6IyrIcXzt7WVQCIhAsfmRBrhPIChYVDccjg1mD4jDBQHrSLp94MchjAp\n9FlfNgKGrFAVc9NWLA3vJxC/e2RQ7dGh4KrP69TCEBAVfb/jmD6DWYJMv19L\nHoNr\r\n=KbiS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDZ7mqY22nqZ8UG+vWENspxziCClHVUOa2jwvaGj6e+gAiBpdFbgI6hX1qoWgA9o992EsFDiWIeycXkihcTC2MSTMg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-617f2e8.0_1557418168769_0.5017776242849652"},"_hasShrinkwrap":false},"0.2.10-126551a.0":{"name":"graphql-toolkit","version":"0.2.10-126551a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.126","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"126551aef97ddb7652076ca398bb58dde33ebab3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-126551a.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-JvF9k4i5CmMb9yxXuAiGbNjMsoIA+L8j975owrukr07T27npVIsbV3ziwtqSU6iH/xfd1dp3/gG5F0qLQT6SpQ==","shasum":"3b77033b56768168a90da2ae909df1e0ed0d1458","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-126551a.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1b9eCRA9TVsSAnZWagAAN/YP/jAW7AoBGniWy88IL8hk\nhZXyiiQvqhCmZeZLeeu31xyE8vE0Eh4LvhFIicTu7Yy+r4bthmy2VBzNLaXU\nml5JBfr68wxwX6edvpp3CPSE+7UJorw4edavodXMkN9kXLSaZnv8dr+av6Ab\njbdoa/JCrJPBRJwcoq91O0cafsOxBUyPjaiCDmrainLo9WPg7dY7V5At1JRv\nEEoeSLzredFZSBkxzqrNPzUP2yqrWBrBma+5A3CBwMz9P/it8d5VPqrZ7eZz\npYLonjIa1DiolbKnkbZ9pU7r+1zJqtCl3eMFuKsdQt02BRiAKl56bdOyXUQL\nDEKiOYY9iuknMfhQ6HVgFF0hxCo9NLrnyPzUKYwqsvsd3+S7KWRZAjYUU8Nm\nSzrSqnmIG89507nU2mJcq5UDsfi1hM9yxr6ylRRrsyCj8plFqsQVqTJdWi9Y\nBbxEuwKs9jMKfkHc2llZ+2ttd5AHZu47GVLP1fpnIIH5lFM11lGHHaErIbtp\njHFT6LE5HOmW7rLZYKCn3X0DVQwvszxwoUW+KRqv+yUZLx4z5wtymor8dBvD\nk4tmegBVQsCX96MCh0TAwnDsIRWQLZv208RKathxE/Ix2qFN7WZnYm1NS+7B\nPKw2vb4DM6oQ0uzq7TH7olk5TqPwhZKRRv4I8H8PusJ9N3Vd2/JhaoP66xp7\nggpn\r\n=Ssiu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqlIHftM6RhpAW/QxjM8f8PFYBDb1vt8Af/0jvZ+eyNgIhANdRvsl9B3UWReZRaC+iqqC3EpSNjdSoXVljB40tlPWA"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-126551a.0_1557512029175_0.4421962634056087"},"_hasShrinkwrap":false},"0.2.10-b83878d.0":{"name":"graphql-toolkit","version":"0.2.10-b83878d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b83878dd7cfd05bea3382ad069c2eb11d711a0b4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-b83878d.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-EOeFj3II2WKpN1I8VFq2UScZcgl5MLT8m4RR494L1R3vwLxGjvTrHlbibz1fn9JZT3fzjQZjvL/OmdsRELUWwg==","shasum":"dc05cfd4ef34988f9db5ad34e995e9b305fcfa83","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-b83878d.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2fzpCRA9TVsSAnZWagAAnQQP/RHER3Z2elAVSdiP1ok1\nOCrjVwWitOWJNDYjpkkRuAvbBzlqw+7moFzrwxID/KGw1RWAKInMe6zvPCD3\nHgJr4RkjJfwEloRkzee3/jeOCvIvAr9p32IIryT7PsF996KLMb7cx97OlmWC\nNRts3PV48TlmnUcczNVMnW+D2pB7vjL+ZFDacRi7PycOklBpMQ9ssvLoVMzd\nZBKs/qJzU07cpVplJR2CJuyac8a0Q1xP+pbrpEgKuCUKV1NchG8+y6AnyHkG\nwpbJjXZKoGRDoPl96Z3xJkWedQBZTIJtKUBpVMiSSZzWwfMlj/aTcZT3q9NJ\n9l8oHITI7zTnPnAI9qtwuZEBizJ0WSgcsY+AYz0qMkNVjwILZ9lhn6aBgsHr\nnaOc+H2qqIJOS73CwA1KFxDoRvAq5oppboTxupaoYbbeijDNVfssid2iQnic\neP0j/ioA+A/AmSJpim3Ac9IC/7T3czpwDe3hksFMAYX1y/iCvy701W1pMhMM\n998cZEawx1e48Ld9UlajM9bw0nElAMBPbUgbRKD65gMhpd8DJ8PAKFiN20CA\nQVjqZXvME42Ds2UwRt9r5CbNElV4sek5tJdD8S9ipL7XmUvALJL5+uMxLJgx\np6jLLDhuK01zT/tI4WIF9ooBztxxRhcAGowaNhON4xV4zrkJaA66AA4vrxlN\nC1+m\r\n=Dibi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTTSxMUYFJz6ata41XTEHmmRz2P1WcKSU7tPPriafjXAiA3aE+yDPK50+QDAL72ag42Udbmf35ZOi0XKF788gOV3w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-b83878d.0_1557789928793_0.5168766835090703"},"_hasShrinkwrap":false},"0.2.10-4237653.0":{"name":"graphql-toolkit","version":"0.2.10-4237653.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.127","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4237653dbffc15945c83d6ed7181e72119af5bba","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-4237653.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ZP3O0HvXFI5f+XiEG1YTgohZdq1R+eHtWutQpDhwZ5CspIsb5pCrmNll+EhtIEo1XJbqk2kIipbEtXe1skhiVg==","shasum":"1cd2b897ce7e3247d947778be0135497b313e620","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-4237653.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2wmWCRA9TVsSAnZWagAAKtQQAI2Ulz4PTSJAxwMxlWSH\nguE7mwmocS8s6/PJ2m/8w9HxeGgVSQgnPJwDvWwU9Avh6KwQYQY+7RERQ+AN\nvrVPpXCca+2TvM3fD9N0hubpDxhkRdm87ZqxceHtushxjtcTwyP69+lEe45q\nv8V4dd4QmwJ+t7UBFmLLO2HuQfEBgYGiUFb/SpXZ7L+DjbGmMXli2PbJ03Jk\n1ZLh9+l6eAFU+IUDe3n1Lj0aY8jJYvG91plgxZPJ73qooOoINXOHt4Zn53eK\nkZLbuGIRgclW9lEw6mcWwa+RxlbUzQpVAj1aMyMPeduldi4PibYz0q6FOivs\n99cFfXoqHfzLORTWZwl6EvG7Fc3qObl6e1AKwHZLQYQuJoBVJJ2qGFGd+bh8\n5mzL5EQ9kkla41NkBL0c36vyxLyugCqPgWHiJETLLnjbXnENyz41geMsmwL+\nwP0bniKYCAxloGuELH0NT9l4hxFObsB3uUsfoevo2vv0L97iod7O74A/DjOB\nWA7qeiTbdwHPGQkcV9NbklBNLxT8mnMvbLPh6fMcWNNZM4h4H15sx1nkhW5b\nMZgOrxPuk/ocPS/Iw9MxqPQDR0ZFBRycFX9p4DnAzQ8I1N8Eys7pehnJVMsp\n3LCLkM4Ry1JYum704uuFVXa1I51G9+/k846M2URPth+/znl6rEhbDSwE3kIE\nX0+w\r\n=ktFY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBBrf8R4q3IOIZuDZy0AUWCbT+BuKOs8dPbnXRrwYPOjAiEAzWV8YU03ygqoH1ImczDI9gD+v044E6g+6JZibz3bzeM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-4237653.0_1557858709649_0.3187197617901003"},"_hasShrinkwrap":false},"0.2.10-81a6acb.0":{"name":"graphql-toolkit","version":"0.2.10-81a6acb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.128","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"81a6acb96cb84b229e9536d17330685a25f461c2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-81a6acb.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-L7UkoIGel0aqEllNwbVFPuSc13aWYI6jhzhinTFOpvgUWboz9X2CtS7zEarmk3RwSKLJVllR3CBlsB90S/6ofg==","shasum":"e5c3cfbef429d3c945bd9aa2d33fa13f27ddb2d8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-81a6acb.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2ySgCRA9TVsSAnZWagAA4wEP/iLbfR/BfiTovo6rxJop\nsd4hvKGnytY/u7UuwR7tROUVj86+LaYMzeKwVrsulVq7H7N2bdN/mPhOZecg\n14wQlMhPUUsXgMrtv9tE9gGwvP9mW8zV0gZge972ylz5egiNlxC+47vgQre/\n1BnezJm/pbJXlwgWub28KL70gH9hHSW8XoNozJFi+Fc8Ow1rQ+ZzMiN6tpiF\nnlP0sWv4E30e3YTwI9p1eTvHw/m9GX5zFLzRtqWyvk2jFZBVtkuF0M1Y2E1g\nla+BZL32ThGWEV2xsXhNOp+LIxV4cqV5z8Mz64IFTW7SL4Sug4IANKfp/gDf\ntSpu+7EC5ZWH8zUD/qNR6cFy27RJDi5Sz9QmryyKNM6DmcQd4PBh7Gtc8qVe\n4Mk1dkWt7AjfhpfBomVaf9nERun5iw9Oto+jELpHgbFZlcfHg3OPySddEOks\nn+Je5yu7Wc/eEHUYG3nIXFC5vTDPknb5klgqfF4/cxmLDph85bE3daeSiw/c\niAVMfpk+4s1NkDVgxoNyLnSzym8ZVbtZiC6GfR8as/fMrNWC7GACNRTVEy+m\nOPeDFo8DauTQ0dAyCoDiHGfWMEiHjiAyz/euRE2RPME93/VZW9ycA+Hvx0bw\nr2IGH4loUZJfo4+mdQjTzUixto1zH6+fuzdVTkVEsufjFDLD7qGkh4Mkzrx+\neRbA\r\n=VYHz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIANjA5USGEL6caB5UgTDllJAfXMOaT0RelKC7WPa/SAMAiAv967G7og0FV89o1PzKoyK8cK7IV0qDDIaifjKroCveA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-81a6acb.0_1557865631401_0.8390805332574651"},"_hasShrinkwrap":false},"0.2.10-4268083.0":{"name":"graphql-toolkit","version":"0.2.10-4268083.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.12","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4268083e5ec5150ee9fcdbaaf7b05730bcc8cb76","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-4268083.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-jS9bGA8F++6ANqWdhme9auEHxJKS9FVXFlRhvM4zvLjFLrLgwK0vlxNC4HOvE5bdR0xhwWrFbGL38aqV253v7A==","shasum":"77c305599831f6a761c7d3aece57cd56fceb4851","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-4268083.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc2zZoCRA9TVsSAnZWagAAAJoP/0ZJ9hg4mEs+QdoMK+rf\nATBulnH08dAQ7Uj13djjmH9XgZNhSNhOtEZcL3Dx/QgIcjF1Lk0MhkJ1XWFX\n7oN9njRr68Mgd0HprmVXyxYXeV4i7Qn3twKYPaX74aP5lNrhmV3FQnxyUV9E\nXrnFH/umndUjtxBIJJqT3A7WpKjt/EFu6KVu1fm6uxuu+HtlwdZqNEHWKzuw\nGy8AFtVktnaFDVcVhD5SWI64FkF5s4O0MX+/1XfxDKfI9JvO+QKJASupQCVS\n2sb7OaGveM5/V1sphmScDbj5mnQ5IvFW5Bim/XlDx67VJDrG7f9FmoqrCIwW\n2WDNkeHBI68/wCfwIX04pEqwFWNf/78gm6yGVsKLUn97+1w1kl786ZjVFYMk\ntqAEcQjqSQIiAvGVjD5G7euEC6PyATWTsERMr22n0KBBP2t7YWt9BpKQv50V\n15ZDp1W7eCggUPONBddVPZn3l+HvR08jnTvIF0bMYalgmCAdiDAk0eTIAURf\nUiQw+fYxdYbRZ7EoJ5mzgU1to2OQfxtIbijFp56k7NSi+nNbZ1FQuU5WDCnq\ng/QSBkRH8/Jp1YQJ6ghugvUDJhy8dwmXYjLkgZUQVzYr4c4DihD2Yv9Gc7nP\ne+v546otaAGy2Y6f1rOIgb5FAsFRGHby/T4pLZ5+RGA43cQyRGwnPlzQftUZ\nEver\r\n=q7fl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICJupCc4iYSmW21uXys79RCcP44HpPmvPB0Q6tzLMebPAiEA3KDRNCGaxvpIGfbc2P0PsqcyG2Sl5gUgjKuSr7tbq4E="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-4268083.0_1557870183746_0.6810491589639618"},"_hasShrinkwrap":false},"0.2.10-c5de9e2.0":{"name":"graphql-toolkit","version":"0.2.10-c5de9e2.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c5de9e2afb89916acb3e931caa5fffbbe937f73d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-c5de9e2.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-5ZDVdmtO4z5PQ9W7zK4kgsmVScmxtXW/Lj9azp3bIdN7WLUfH26qQMdWw+yzcoz3YRDlD8vJA4f0emESbGISmg==","shasum":"df6862fce9e256126eafdc908cb10cf197f0f9f6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-c5de9e2.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3R+LCRA9TVsSAnZWagAAzWMP/2aHj/wR7c75tDItungt\nRCNF5lkWoHD8UEjeOxSSsqZESEdLjf3iUauR3eMOHVIEaPTj8EtYUqb7p1RL\nbNBtSFroChbTfwwPl9nQNvHqJKghALmje8nLrlR1exJtcBQmjbibDuh3Ins8\nRh7xwJgqFRwbC2VTXHMOi7aqQmNWpuLk90LsZB7obGizCR0qqYsP+6sr1F7B\nuFbW5dHXKDgvY4/5zpZY1mf3G3gS0jx6X+hOfXMDJwUatMyZYO+CthWCf5Wy\ns6VWyARZobOefkPlaOqqPoF52eKKkCumitNb0ftBJfN9JHl4yGD2IHxKXW/L\nQaRPuUGO2b//MqAVf9Lov6MPXAfInUT1ntG8/vJ+FuBlPN9Io3ttiAKzeFG7\ntl/gFwS4uf5PaVJFmXLYGF3ST+0vUNXPOuFFu1I+bF7AqStL3IfnIDwScTSK\nYc44hWnUBNSnwuvSZYGzelAx4pRP9RbWsJ0M6OpBA2kB3AukEVQpemGTFCIn\nL71RzxAZCCXesknXuq3PhgRrXlZEixUdPPMKTbHUcuPK8iMqpnaXDyIiw3Hm\nvd/dp6xWep3NgOXin9MCLIsKlTiV8uK1yXrpCxVjJ3shRqewOFq5oPUPnr3D\nVL4TFcT+eqe/+VkN59Z8wS70OzJUQYfIyTM99WPnVcNEz4y2LzxGiLjMuOHt\ngZqs\r\n=R2b6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnrsHqqM5pA/4LPUlt4h8C7tgGrX7QEefl9rKeEToQqwIgYL5f9KhdsuM7WKzxx5Uphwo0J5lBPaItcf9PUuG8TWQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-c5de9e2.0_1557995402314_0.2654966054012027"},"_hasShrinkwrap":false},"0.2.10-c6a7e1e.0":{"name":"graphql-toolkit","version":"0.2.10-c6a7e1e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c6a7e1e61b20fac936a91f3923eefcb4e741a434","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-c6a7e1e.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-TblT7ylkDUJtlBufn6yFN2o++xV4pMQYU/6dcAv/LijJEYmr8qBFHeKoR2FoXLPcc14DDXsr/GOW88mchf0amQ==","shasum":"eb9cd4a8313285891d8aa30921585e9396ae6fad","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-c6a7e1e.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3R+TCRA9TVsSAnZWagAAmjwP/j+LdJkjjZFDgx2bSUhk\nmQ6hjDBhM16Zk7y9rj9VnLsupf6LuGovovCRpTrVTR9+MbsLzjAnJyzEIJTX\nLvTUCbHefZfDIIYMWtZ4potmeX3h7CapNDIV90VGJRJxaTmNwLsUqN1yhJTU\nxXUC5bVXyp68CVDfSFwREuu+EbfHIwYcm1YHdu5TE0OJKINiNc6IkZ2IQDm4\nO7tvW90EaX5QzJ8BMmMgCDPRXu44/5/69UC+kirNVxKbNE+y7ulKltwVseXG\ny+W7lWjKAs0GvDtIpvme6FnN0Qs//7KaEs0di9r/hxm87gA8s4m1oKgXYHUV\nBqDV5tRCdMPf79zPgERb4qepOF9f+grDQiwxsdUfo9XT2o7CJ5i70nZu3LW3\n/gmtEIp7Au1bvw+247Stl1wHQMgfwnuYre8vQxDeuTULrwV4gacvqagNqFaO\nXNS9QGrpPd0pH4skvQq2CveaxVLoC/ib5FoYqY7Rx/+gdWeNFHRw0IbPs59D\nCSx3wNPWGjKRzzmurtDb9t06OAMJrXXaSNcY+V/enVGPIFy/FcO/aWAPOZfm\n6bCxJrV80S5UHgJq0kcDnmEV2gs00QHcmAtB4x7zFaiiVfjUhkmJ/UtW61Ro\nqxZgT64fl+dkoCnnqYLC0qq4S/r28MNA2y+5VfI4nV0x44sO1uMgMqlUEORt\n/I5k\r\n=lilO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCS3ShSQjizwTzxwGYGwJFMfgJOXVEhk4V8+MUtnN8fAIhAOeTwZJUL/bZffEzJbvltVQ2lo/g00wbSlukEYPmoyjD"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-c6a7e1e.0_1557995410290_0.41355910232345505"},"_hasShrinkwrap":false},"0.2.10-19c62c0.0":{"name":"graphql-toolkit","version":"0.2.10-19c62c0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"19c62c0363a2ac1179da2819478feab554c4498f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-19c62c0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-pLleupTsPU7t+Tgv+wRp7d+qdx6FasZy1mdQA3ftsHbNMxUiJUadmbAa+pMNvmgUS+688/EceEMnzlQCmJsQKQ==","shasum":"f73ae2c351f7da37fbc0ec3a52195ec103055388","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-19c62c0.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3R+bCRA9TVsSAnZWagAAWPoP+wdcD3znVQi4Hli0LDPz\nPEDXmzNok13aUg+CIHw89MTMrRL5K+CBuiqokVXLyjihZJIsutgElb4lEKqM\n0ZExtXBZkiwMBTuboO1R7/0TBkcyruoWdnOKCmEBiZBQ3nzIlSLOvQFp6cGT\ndgYKnP400/Qd5jge3O6WEythXJiRHMS/EWF7kaUlSY8qw+/2azmg9tj3Xbzl\nRxpmEO9cYkt6Np5YprPyi1dqwc5TRSKj5Of5HsHDb8UNWMJf4Q4k1tMwT2aN\nzlp+Yv/hxokrYnAuUKiFBnQrqqD7SWdH82h4eeDfZRiwe1UYRaAsJWwLIDcU\nqJ1r8uZUhx/W4QGyNvldpdb0I7LDuHRVTt5uMhR3EpYpHH0j5nSB+3sJetjE\n5YzuN6CpqYS8Ye22WfYAMTzhlVvSjV3eMeyrwQN+MCgMd3b0iy5hjmr1S1PV\ngIIuB5zowBWIkw9Ul04gq5GORviDDrMJ9LkhII+Xam53AENmq0wnf/IhPW35\nerjPqHXhLZgdf48A7roESoilQDcgMhkw5Ir4hrlWwUM/f4slgrVkQhTplP92\nkNWdB7PYCqquN3Be0Zf0oJufoDgwJYvEf0E/iCn07K2w8E+U6qTZU1vFN1ta\nsaxGHjQusLKvAJ3yflC6U+wOXSTdIuy5mglQxdP9t7hRL7jVTlBncr2oXEwQ\nKcHN\r\n=0lli\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDejvc8u0kmRpWCpj20vX508SbVkLnBKtcdJf1qBT478wIgXVLNenZD19Y4p4PusTy/ojY7kXjpMF5uQQ95Y8I3Rvs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-19c62c0.0_1557995418600_0.002398474775744841"},"_hasShrinkwrap":false},"0.2.10-6b6364b.0":{"name":"graphql-toolkit","version":"0.2.10-6b6364b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.2.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.3","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6b6364bfa95c432a44628d4aab1e978608e68a39","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-6b6364b.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-0kwZyJXh5ljgndVb+hz6Vi15pjlsJ2EsYQNWBlJy/thmCjSquUyDkGb6Z4eKPeGVM7AYand1LGkxqPzRB01ivg==","shasum":"b8021d60393a21e3fa98cab7c4312538ede396da","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-6b6364b.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3R+lCRA9TVsSAnZWagAAukIP/js5g73RUF70vdZPApgM\nNVowFlI4ODsQAdLpo+8uQnOD9Xr3JAUXIWRsbx7hK5RKKQezT7LAwygzx9rW\nBKdj/j2u43roSm8ByDVSU01KhuN+Pi6f34+bSiTu60wRWYDbCLwbGFKCX+wF\nJY4Y3L08yIo4ldnLUDkRdwy5tAyTMhFZrV544BvRTU/l6+i2dSycb+MCKRgD\nbDT/PuYNtLky4oElOKpgNaxx7MjRMgdBYE+jy3jgHjBWgCD0MReLF0/sCgeU\n30fLc2QqRDu9cDPxIszxv/BAlZ90u6agMfv8DB3OgewmOfalwq6VWOgsNzWB\n/k7wrtX8QEI8MxQO+SKgGcyMR8LfGkWZfqQNuM/WCRv6UXbiJu3VK7lxdixN\ni+pet+TdReeEm2+CC1kT3aK/z7eudmACUvWR4193j23JBmy5xsQxZiYCqrNr\nNvHS88tzgrRwkQlgeKjtoPj+tBVJG9I6mFAoqXe8MzoM3101+SNXZje4ayD4\npg0EyZbgq/FJt6ko97GYrxrGTWmuW1vvRsh9CDe0Yo4HjAzqWi438ayTFhHu\n0T5nnFsAuZdGIjR4w4WIij3ouFCVBXUewc4K4TF23VeWYjjKu8m1STSAzqim\nptecWzsfvklmRb/L3pZz4IGlCbu+Cu7rny6nWTausR8/sBJfQGQAppWI1oFk\nUOUi\r\n=Tpte\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJESe1EFpv2WFOdv3IsXqX9wO3tp9z3y0zvwYugDN71wIhAMTJMPkfzAX120RmYo/IGwbZSqi67p4NCI0m26BLTMl9"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-6b6364b.0_1557995428683_0.7193535842262502"},"_hasShrinkwrap":false},"0.2.10-971e444.0":{"name":"graphql-toolkit","version":"0.2.10-971e444.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"971e4442fa7712a2faa29352b2b0be93c0918f98","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-971e444.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"dist":{"integrity":"sha512-ds6SeiKemGouRAbwWREw39xPCNRT9UNhvU8EF5yl7iT9wjI4XCuLFnp3ryYz7wegygRZwN9NITG787wDm25hag==","shasum":"3f587c29464e4d0b1729637039dea7361ec5f776","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-971e444.0.tgz","fileCount":251,"unpackedSize":296978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3SPSCRA9TVsSAnZWagAA7DcQAJDipEJSM9qozIo+J7G2\nf3neGVoojtKVhYxM7u91fhpHFN7RcjdH9CHh5u76kYx37vkSN3TRbVhBg+KF\n0nN2CAenTmXidUiKpb0GgmX5EzRK7kMe5zrpLguHAanz4aO/1H1tTyJ+1nM0\n7GRslu5n76Cui90Ho/ir5mMnGyo+VIKPn8PmUxdTOG/YMY7VMLeUp+j9LaA9\n/mWithyP3z3YwEBPuQeBgg7y9gmND5bf/d23nU5OuQs4VllAJIj63iXnYFh9\nRVwM9OnyKglXZBqUHZBt34lgMvvKP8U2BjdR8HiuLxAPlMn8zLNllYJ3Pc5Q\npt24OqCXGwdOIHD+ByvDwgU/cskiITQQvGP7DK7A+z+F9TUJMyUxl3HeEett\n1JKb6pU+QFQFzYrH/Ttay6KZjaxixQWGoZk2amEcuG8i+hbarh/d8h6gO/7w\n1wb84e6xn+54IPNGjYS4LI6pfG9ZfAhoGYLyj1M2bjZRQAWZj12HScSdeGfe\nR14A9PlUt19fOolIZgrJhhsPg1XhD0Ee8YURT6kjJi/dmSNdu0RxDsYrdL9L\noCsiSZyMjskiF2f7Qmxzm8uTy3Y51ERL3J6zfSukMfMfLxtFIHtfL0bRVlAE\noXMvKMYENUKrEtPGwSfjWIlM9p1aCpBwWCUWdjGz5S/9rZdDmyiQB5EFMnpZ\nof+f\r\n=7mDZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9WmJrd20NUfYXuL0IbVUcuBn8hTfy1zFiiggWuyl37gIhAPEyUapFvrhJBTxkPyl1l1tvry1LoFv9fxA6VxeJungC"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-971e444.0_1557996497775_0.3578270598808906"},"_hasShrinkwrap":false},"0.2.10-1374342.0":{"name":"graphql-toolkit","version":"0.2.10-1374342.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.123","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1374342e0a1859181d1b46dab9dcbb39e0fa1ef7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-1374342.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-sRaL93jcLDpTt0dkqMZzNVrhqUj93UbbATOUxOvZXTWV9a4eib8MnQFstBXzE9gAtXmvSfae1tc54mHw+wTfcQ==","shasum":"2574ca3ff6136000cd91a588276bc969500a974a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-1374342.0.tgz","fileCount":257,"unpackedSize":299761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3SRsCRA9TVsSAnZWagAAO9AQAJlvc8+oB/OlKAfPU0IA\ng0wS3IXukuFbp0Q0rcq3nnobnqk75k0N6FNdw4ly36v7C0Iwju/GjxyxE7hJ\ntMpyP73I/bK30f2CNHQT/nvv2S1gGZ9BdpePBYdsFzPFQNJsLFlnX8sVJIoj\njc3O/HcLl1z6PJbFHpBg7xKt+7JPsmb13ZH4Gfe2i4RNiUyZncRwudI1S0E/\ndk+4pFJml8n7iHWhS5L2Mw6teFU5U1sG9j9uQVjUsFRJ76D1LgfPqh197J+B\nW9wdXlhD94x2Do0cnOyyDqMx4dQUFCNV1AgCSQW9WV/9gMIjiFAw5B+iCBH6\nTcVJ80xal/nk/3TqG3irx9DsXdHfAfGQlY4C4wExAA/R+K6hBsBOIRnFL7zI\nHQW+lLPWzUOPPY3/V/DpS9Ch+asIVn3fODnHhy8pBf6wCvPSNS3Hwct0OcTv\ne7ZwGz9rxS6wPPlafWT0kuFLRFJ2RRymFhN94uLUFTEyqEuu9cPryRJY6wIK\nj4SBTNxPEkgKB5tywJnBHoTdVJUmFrbXuCzSHLLOtv056QLxn/SvauzB3NEv\nrsOn2im5/m6sFlackZvii3HOreG/dDKQB6nIEcixpl/azLSNq7nwpi79Froa\nQ1Cv613OTdeaSbpma09o8dfrm6I1xzp2FmcH9VnD1CzAKx5ezx7/i2P7ZBj6\np92R\r\n=3xDK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIACrmWyXKVYDgmyczZ8LAn33WOFvgyC4sXd2kgXTT5+NAiBZg9xpkDeZLauPYKMiQBmeAPTnr0YNpEeBahaUz+yLyA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-1374342.0_1557996651804_0.10239588232753505"},"_hasShrinkwrap":false},"0.2.10-d5b55a3.0":{"name":"graphql-toolkit","version":"0.2.10-d5b55a3.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d5b55a3dd0f4aba14542d5d3177f646bc54c8e8f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10-d5b55a3.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-iObfJjMMVEP06l3YA2t+KAE3ZqKuyeB6ryqde58rEo6I7LPICwaOw6Wp4eOdEfnwx2qLc/6PBhjF/LTbbxeVtw==","shasum":"0eb2fb2c9e4dd45e19c21e790fa0cbdc8ff31423","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10-d5b55a3.0.tgz","fileCount":257,"unpackedSize":299761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3SUuCRA9TVsSAnZWagAAwtUQAJQfuI8GQQ4ypfL/Ngg0\n3K/G8MRNV7+/YbuiWeXBeh89stxLcFaHjzAx6hP1KYsJbYjwNxR1NoPUYwKT\n7pWjvRiVXHrYu5H99d+i47J+jP2MqZhOHe7Mo9ovxnsoGE20nQ6JtGjjDMZw\nmwLMOOlKEiRh0dKOEd56lXH7nGmFiFIdOyrzixxaF6et7YNmbhUwO68RGgZf\n3veF270FZGf2yKGTkXn2hHD87/08j+FBGDyAesiOekVdhF+LJghqERyM/NGb\ndR6WrK1IMlf924y55b/vTPNFMVGdMine+Ur1AlQe+hhZXT9CGmYcPtrua9am\ncM1kmjo+lSVjmSFpMPxHT2zign/eezr67Bsto5oOCDY9EENKAn5OoBYQnizD\nNLgmL64pbKZ8X/6893e/EsZ8vQ2XnVY88QN2QmDTgDPqWB7dHh4ZOZgqamod\nUIhYJmcWx/lxv6HbtTvb++U72DAe8q1OhS1DiZ0fGEf35mf0Ldbcnv+tAR+L\n9AGmHlHCY7PpbhKmN0sFTdjfBHAT9xglfPfxJmxOPC4f3RhJqoe6PZMZgNX0\nTzppsYCNqfkGq5MbnyUP/prF365+IwDHKU0LdJwsVRMPDNtnr/1RHo4FjOsn\nj+TwUzUWGKT6WAcUNZVwjBXwcHzLnRmtYoLLLiUf1PGe8b+8Q//ufgPitDCS\nXCzu\r\n=s45I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGfZ/Bml6qr3yQ9F/GF3GzcAAdHRjFG/tkM4gFtV4hfgIhAJOcA8UOyrAMxCv9xpP9xAN6BvG6xqG+09opyvnWZoTE"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10-d5b55a3.0_1557996845791_0.3578668733053003"},"_hasShrinkwrap":false},"0.2.10":{"name":"graphql-toolkit","version":"0.2.10","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"ec418dd1d49f5498eeffdb0e10843a855d676315","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.10","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-pvJceyCr+dThWhvSa93iapGToRM7tyffI4VSIw+NKRSrGYVXE0vaptn+nqy8kTmKeGK9ganzq3KGYwychXiSAw==","shasum":"d6f32058b6b1f18005d2dc21a55fb401c175376a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.10.tgz","fileCount":257,"unpackedSize":299752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3SWQCRA9TVsSAnZWagAADWcQAIhfoRVqyCXbiWk+PPcA\nzliQveH2xew2At3n53N5uycxcDQmn9VotCq6B1dyBiCOY2unMOwSrm6wr4Kh\np+NzkOCquh7rB+WlQA2PuXh8l9poSlK5EACNk4XhV4YyAeEixKie2OMsNoD9\n5L5zks/9Gm9f4cONY/O91Tp064x6sdj26IwiVQcCvUlmhNZtL7RLz+6iHBlk\nqa9BXgqmrzgnEmBRfK2XEpmuXSEu1vxaN7dWvVwDDIEPNBAX0EZ9FNQNjVr9\nuEm55Jack+ufOADYpyzPxYGja4zi7Rk5Atg1V6JthHd+5+yPHECb6a1amfXf\ntp7TISJ/0HiTTIEgioI+zrvD6pU880T8wl6kFzmFTb1/EE4LaPy8yWCX7/nd\niHj+14fbUVTIJqM3YOxCixtC95aZaF4wwmh/8oBLevFcudZGjx1Jo1bwPDfX\nN/x9+IQclN63WuoibyWBypLQ9O6CPK2C+X++mpzUf1m2PFePEWKcXbctyIt2\n6MhFPaVtiz403qkFdfvYKWGtjPGVLK0TRtlaOLYxJMhAV7Ar7mGLI+dv+nsS\nIo883TC5RZy6T30KP7lMbimfSkA5Uof7gzILGNw2pq7FXAVSse2IiCF4j3td\n9MZIBW0YcE46HQng/U+VspZnOLtd6+n9iKnfOz74wc4sp48MLBG4QJSthapY\nJCLe\r\n=fhvQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOUPbC8Uyhf7DmhigYcu6G0iQrbnC0/xQdh84vBwBC4QIgA8vVr7oFHZMPi/NK8JlSjZmDMm42PEtMMWTLVf8Rtbs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.10_1557996943842_0.46739916865754405"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.11-ec418dd.0":{"name":"graphql-toolkit","version":"0.2.11-ec418dd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ec418dd1d49f5498eeffdb0e10843a855d676315","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.11-ec418dd.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-3/ruYNRiNyLgqb90bjhdGS5R4R+G1vneF6hLYIHG/RWzwohBJmI+jmUAzBCB2dIWBKa69Yk08k92mD3AOmH5vw==","shasum":"3b77c6fa02d8ffede2cf6814a4a7c05f15631bdd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.11-ec418dd.0.tgz","fileCount":257,"unpackedSize":299761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3SXpCRA9TVsSAnZWagAA2GQP/AogKT0F04CGth0mwm7E\nlg143C6jp/3rRjrxDFM1OSZqLLFCaIETJKxTfftjtrkzVTFY3zHc46Nx+MYD\nOEpaYrARbZSERAlMAQ9ijHpP1lT/gqPDDRJ5PxoYS+iphK2udLRD796RenFp\nl4QZyNXK/vRiveLszQV19LWhpmudR4+sTXFL9hfbRzUAo6wiQ6Ci/W8eR8Qf\nrKmbfb83pqxpuAZfQkqNQnIzkAjSn0sD9Z81Atp4GvGwZr48dLeBK3MLKzTf\niO1mCHrmp6qLsnXCpdWuk5I1V1LvyrjtPdIlsznfPr9dQot7/krHwaDHMUH3\nIFR/jA4wO/flQwQ7KBGc4ooGVVCdXrT9FQdkyEW7WgxJ95OSaA3+tbKdk45g\nbTuMQcNMWn6jyO53jQb3D/1f59Nb3CICKHxqj4hmPp7bQql4wP5gXlk9V/BK\n/9ldKyBMTBbg74Gt/uNlu2jNWUrmZDrtFqjjsmN29l7NglzQxGep2uLZ5Nsc\nekdKBzBFmgcAmn3iDhel08YdhNDiamtnLdD4XkHU1hJ1dFhMRdzKRy+lFL9L\n9wXXVv3r8ru54U7uUvt5pImw2UB6nTR/R8Wo8tmjKjyAJWt/gXM4I7/4eTKm\npR6Yy7+Sbyda0fEUureLdZym4ryQDpE2tf8syPEgACAMjFF2DoShJDIeULKC\n+4EE\r\n=gZBU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4ddJb585AcN//Thze905vIDhZqkhT5nPBXbzKvzZXUAiEAxH9qvEv9o2Lie37c+QzfYsfOkWuX7FkjQyuG8hKKBW8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.11-ec418dd.0_1557997032935_0.3433717348538943"},"_hasShrinkwrap":false},"0.2.11-3e03fc8.0":{"name":"graphql-toolkit","version":"0.2.11-3e03fc8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"3e03fc8aef56db05009af6beb6f75d822862104f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.11-3e03fc8.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-w0Odwy4LPInUqcfWQm7NUcsZRZW4OalMVn8dbKo54waf5t/Noe1DXm9cojZT7qw5SPOREzz0hHTc+++H3r+2KQ==","shasum":"92dda633ce60d99cff6a9d6e7a0349a7775d671e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.11-3e03fc8.0.tgz","fileCount":257,"unpackedSize":300235,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3nh5CRA9TVsSAnZWagAA6EkP/3iBfKOPAfhuLKB6viSW\nmf9jokg4MzgwbjEgZ0vrfwEYKBvt2lt6WKQfgW+Hl5opCnodPTzlAIctKLa4\nCYy3iXvDOriBbkFeFeqgHpiFsiRcizYY/DR7+EkXSc0LjU7qeO9jtXk+izYL\nhS9aiDgq0kuXerOTJqjsWkIglG4HK0t0QY1zxnmpRI5mfS7ldb2k66tEb/mc\nal9o744aW9jR3iaU4xLEGgfkFoCdOKqqP7+9ztdZD2pDT7ImONCcFJRazmAp\nRHdBlRcdVUr2JweLTC3ip0F2VINR0e9OTTaPiLOsQ6QX8H9MNikAiJvCTK1P\n1s6SQNBivZ4gvcnMmR7WSUwNZjnmWWS6vS7rGGWWqfOZZ4XNJ916eIjQBKaM\nJ1BAJNQR1wP896UnzghjyS9EPK/RIe6dr7Waa2X2RDKqXm026cjHACSicZN4\n4bzE1HF3CKMSXHhWoCgIPzED/fm520Rm56oLFmdaIdW5lWr1Ol/whLS9Y8cU\noaRDYCHwczWL+Td328w9bv8zJ7N8v8s/AtrGLxCKluAR/8phJz+8vlk2Gkk1\nyFzvIfMU2dYRAfBcVB1K2V675rZp/cqJ8akDWuBfLp22XAQML38Tf/lIomDo\nWtZX5Qsy+iAPgPiF194wbDXl1VElC3/BFjKYp6oej/Nhr9R6QO+eLdEjog8E\nqigH\r\n=5gJ0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8Z53jDyzAq+OeiLZUyjGiD/zKRblERmtbpm1rA+5+AAiBOYWMRYJGqMfmRj4+xC0osTyTcGvEFPf0pnu9dL1LFuw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.11-3e03fc8.0_1558083704831_0.5635808663499005"},"_hasShrinkwrap":false},"0.2.11-4c4f9d1.0":{"name":"graphql-toolkit","version":"0.2.11-4c4f9d1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4c4f9d132188cf5957a3594e5b8b178399be2178","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.11-4c4f9d1.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-797H6raPDCWCzJPNCVRZ2RquDcfab8gkj6fQhjZV1MJjSBMSQ5jzXFjW66p1gDORBZ/HQaAaql2pd3+USZ8/SQ==","shasum":"c9750e4bfcb3c30f92c205df9e779c8468d08e95","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.11-4c4f9d1.0.tgz","fileCount":257,"unpackedSize":300247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3n/SCRA9TVsSAnZWagAAMS0P/1JzMtecS+7dCADsIG67\npNEUD7UzTi7oT1tYUJFYkNBgK95AcIsQ+qQJPTVoOzpgr6yzu71HQqrlbmN4\n6PbdvwzZ1urBy5RHSogBWHiXJgj3oOMDGB/TETG0lAsq/tGZ2CIrWMlueKWr\n0ioE2nVslG63/GGvqwZdKaodysG1OdSr99MPLcKP58OIbxriZNWQU9cQiyxe\nzBGkDS8/jnJjl0Kuv6a68Oni97ebpwxtzp+yZcWFHRnbVsVqJue9sZNkKAM5\nvsM8thS7r1YaU7GpLs+HL7jq1iJncfKLndnZ6SsUH+Qq9IMNg8Pvryy1oGMm\nFciBRkDKAWk3VpVgmkRCHr6dWTD+0q76QQ2uxgUadJxxXLIYzrRuaOPz3TVV\nwLtyIGRax+ob1eu34Pt6u07q07+AAmzmxaOAdZ1w3Gpw5VkisYF+7RPu7qFU\nwsGZ95e51TF9r+BICP07q2/ab2LL/xcM+qaC2nanpnLYLxme42eIzoHYqYKr\nRfyRWfmAJ8M1Zz/WJmeg7+hxf0ApUeVkDBJdw+KLLcngzeMQ8yOCjCn6ULYB\nCx8qtAGkiUIZZMnoohrg0yNxTwDa1rbPZXmYhXEaZdJ4kP2HnT2ctLCndcvi\nl7/1s8vwa96oYNMmFBUYEx/2vTrSzQyeHBlHlPoqTIuYyTV3IGxwIPpgXTD3\n7/ic\r\n=7UWg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH1wX3rvewY/sQ7TGgFjD7h6tp4RuzcPynzHHV5iemJUAiBUXbP7NkNehFto2Ya+96cJwm/RG3YhzRKHJhzUMdYXmA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.11-4c4f9d1.0_1558085586052_0.629695657650333"},"_hasShrinkwrap":false},"0.2.11-f888b40.0":{"name":"graphql-toolkit","version":"0.2.11-f888b40.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f888b40bd087ff3cd14b0da2aab6a347bfcf2b81","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.11-f888b40.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ok+qRPYQS963sqz5aD2OAFVwaiQCEugOhNP/niLOyRXgEVuZF3r/Ayn3hUf7dGgtv011PGXCh3AHJ4Jl6iI1Nw==","shasum":"2d98c2780b9149946949c98a848742d10ac27512","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.11-f888b40.0.tgz","fileCount":257,"unpackedSize":300247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3oDPCRA9TVsSAnZWagAAYN0QAKSrkDN8tQyUw0Mr44Q5\nhectSI3BPnzs7L+XLgqLmFsA53s77niOHIaf7LFs+HuYpo/oJBBjOHIpKHqP\ngexi5thIJ8cJQaUlVtLW+KnhoLVE4oXYTW2ARZwnNPwFgIH/5hnXllVoNdfK\ngWFCCyNz6jHy25yl6aUDZvJBH3vInx9QCXRlMcTX//RhGODTKoUsu86py3nI\nxEhSX9lA4TJw1jFQ/OneOhSJ9ERlxFW7RWkeYzUq3DbpicJHhBHVNopFUK/L\nSOY2op0sTMBJO1y8Yy7rKorYVDep16u6JcPVgZMFO/ZeWs7IIveaUUWUZptn\nROk01QQJFedRIq79Of/V12Lm/rpnT9IoMPFiKeT4BhvfYMAIr5uPPM99w6N6\ngWU8QSRVSq5Lwav3rsqxMY0ajVpH6vFG2UWds+zm/wMQHEk5curdP05Zwr2U\n93Azae13WUGCjEmo5VhfpmIlHREt73hb5Ms7TszhBNZztyDE1GWWpIh6ivEY\nE8sfs+dNbsXqFVGDCRJdwfobXskPVK0zPEgFurjDH4kQ9Es99yOepf1boQx/\nyWW9UrEo/bC2P0Tfqi4j7L1Mrft8oi2B3iS5cX3/If5goPfQ9kKsw/48YTwi\nKS/RKnlvetZf8Gq0i704MF6R+1Q3MAYEyvPHK9bEdPrnPskX2OQ8e35bZfr+\nq782\r\n=fHP3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICk1nPq/2w2wkwqSbknb52vYzZcnLWWqRe5w6y+d/83hAiEAihY+Nl7whf4CFkwhSXSsB+sc8SSNVmvY/3ibl+OpOMM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.11-f888b40.0_1558085839345_0.6061505049302935"},"_hasShrinkwrap":false},"0.2.11":{"name":"graphql-toolkit","version":"0.2.11","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"3a89c60b3d906341aa22543c0f9d28e94cc06321","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.11","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-8iR9XFKe9fcZ0Q4rakrVIgM+vXbe3HnkeppdHn9CxwT/0rRXZE6CFFRm4UD0cocrA5ibkrxsajlDta8M6cRbpw==","shasum":"4849349d9a0c6689b7c8d635f553793940fa6149","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.11.tgz","fileCount":257,"unpackedSize":300238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3oDuCRA9TVsSAnZWagAApt8P/i19xJF8KXD9waWyI4Sc\n1jAmjrMCzQeDwuB4nS5Fjdg3keAah0L4WezKto67cWCY8mGmbmG94ugOUvDT\nUeiEzEVDhsJP0Diqtg3RxoNeyulHgWpcA7QSXk3di1sHXCKfR9G7/k2v791n\nnyxrj2JPqdFpfOhnNFXGEtWv2UO4Ofz4RYpuonsrjIHtPNzcjPLbcCIDVzWG\ni8wjuv5mV940EBDLskg6rkq6FCFzxPj5UddM22OklRyWumUAu4jdPuJAiWrv\nvmwkUGIzf6Qet2aFe3aFjau5Rr9xK23TZox/7OaXNxy+0iGw/gRJDevljmAY\nTx6HyI4XRIXYiuaw1xLUTXBembUbuESPV81DANHhMsoMnqLnn0TrYes2Umhy\nPHUS4Q2byJJygB22BeENRjnb1zOq5qW2MymBPO+PQ5Uf00a4g8r0HAT3K19u\nsAJtGPVTj1+gvJQJ5RM0ABb9uo6qpRfGrXM1HwZo2uC0iPH4c6DgEbisUYnM\nZfZxB6cY8Xz0IkLtgu0uCdS3Phku7oJ7eby199aijRekYDAscfg1K/wYs2gh\nZRLwBA8T/qTUoo2maR3VWy7tai5DNsev/RoZ5mhOllEnmh8uBn8DvWdiHhXX\nmlyawIae/qDJEecfMFyL8f+HJNoyfQhrhh1aRGkEHUL1h+WZajcNMAePBKOx\nxFUq\r\n=rTpm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfpBZEbmpXMoLSL39Tmyd3EmGLb2UziyQhXM+Txhqg9gIhAL/gSPm2xXVFd7SlZ8NPR0nJYzGcOEf3wWltLnObrTGy"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.11_1558085870133_0.5914215522212907"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.12-3a89c60.0":{"name":"graphql-toolkit","version":"0.2.12-3a89c60.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"3a89c60b3d906341aa22543c0f9d28e94cc06321","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.12-3a89c60.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-yvDud7juMIiyiUFwBZMmyToXtsAfnt5td4aSrKUbAHC90naBI5RM4PNH8AFag+O1gzFGH8xYkbXEFU/DeuSwcQ==","shasum":"84dd3cee3096d13002a395276347818308cfba15","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.12-3a89c60.0.tgz","fileCount":257,"unpackedSize":300247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3oEkCRA9TVsSAnZWagAAIxUP/Anbu0Yi5B2WxwpESj7H\nlZeFaw0W9AL6h783bSqxNlez6uwFptdt8MRo0C9VRx11ByDtZz+T1iv6/BsT\nBdS83MLu+FeTsmXF7PdBp4eIAE0K5l7auikXVbjbZB6TKodVzH4YlwQvXFVE\nVrs0xL7I5/pGd11k4ukhHso5owLNPw/GSLqCT+jWC+NLcGswkLh0ts6HuAkD\ntsAL6IujvZYFAfKVw6g2pK3Cuh+mknHNSSRkuqklt/2CCtYpdpsivTaShdCq\nk/Y36H1RJpCEntr8MwaTPQXaR7AqJ4FfjRb1NbL8MSU8X7/BFLYbqfW69Vnh\nM40goFpZxRJslhfG8FlgeRSv6x34zxnBj9/7RphLH7IT2p0L3F2pIGfRIR2A\njGUC+x+AzXdpP3ZaFODaIt24CIQn4yCRFHYK08dJatt3szHGP61/Dm7sFKry\nCvhysSUZ0R30MbRK+94Q6F6H8yIhnTCzqSujP6D5eTcrXJ0qCBh4k1mgpg6T\n2ZzVhfokjT2UnsTMZ2FDnuxWssQkDKdWsBuN80NoEAd9IlLPKo/fBsSoON0j\n5HEksfjHE7DS1Y3gBJaQChn6ZryJ+Sdez+fxMFZ/0eAecPHMzOFukWnWNaIA\nIuwsWS5tXfiN3pPzRpbtnGP41aoPrGl+Q2viCNU/suXALI0ObUWoB9KzeFY/\nU/hV\r\n=TVRR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA98bN4nMvAZVRA/DRVjiuTdsAIq7Ap2/by4NwLytYebAiEAjujy00fvCjJCeUt9zkaXd/ZF8yAAVOujPybCipcNOf0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.12-3a89c60.0_1558085923634_0.6264170407422658"},"_hasShrinkwrap":false},"0.2.12-a685c1b.0":{"name":"graphql-toolkit","version":"0.2.12-a685c1b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a685c1ba1fe0a04db541b65111a2ec61b9036a3d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.12-a685c1b.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-nprLTRDzP/L1elRnr/zSM6mMK8Y1A/KD5wTkTPrjCDioN7rFOTAA/J1gG1YBFE+zqJRBsCWN3OML5+Ekx6YBag==","shasum":"e4d34f8958be87a9f734fa26c291e01e0a55bdf7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.12-a685c1b.0.tgz","fileCount":257,"unpackedSize":300453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3qtpCRA9TVsSAnZWagAAFqwP+QHHtLKcrszJO8p+JonU\nHycplnQsd9xq9I3whqfi1KBGsFo97l4J1ExedbnHsTJFjtdjNaeDM7XXZOh4\neYNDs6UAnykEVkJuRn/Q6foU2Jmuf7FR6xh+yyxDxqa+kicxhVsG5lS4YXZ8\niv6bpygYEloRKcLLxZ1GcJQquD6gYSDHjPRjKtSnOQxxe4qtCITFQAhJNk3k\nVukI+Hm5FVxKiznWAZJEb9KWdA7xSQ2s7MQduiFtGnNCjzrRi1DYwnjFA8z+\nNSWaGmKZ7GQGMPpDN5XypqZInFMgjRN5XZZKx6FsH1x5SSPD1XVTLsIIT999\n35EwwKnT90HhKgRCh8x14mE8zmgtT+645iJh8bLzLO4ubD7Gml4cpyjb8tYb\nBrnxrn+ezegY2WEp+ONt4dXI44HYVuhYIL5R9mAcLotMKvb1r562OH3GX056\n4YoKcSIuf1jzCsRGC41hT/Sihdhr+42wAXVMIuCplxoexAyOV0NrQ5QyA5KG\nVa7b3sTgsPcjXdD//Rnu13GXrt6tSjQO23Ml1GM8XPqbpAlcqOrzo2mvxdpa\n6irsemYOWS0mYjjg77Q31MQlmOKA9pO9Rccy6T+lLm4nkNtN8es/kwFZsS1P\nyrg6ipWyEynbfMYj/oJa/57XrsOmMk6IslYJ1OJR7SxQBAeLrboF2CvBxmeG\n/1RN\r\n=9wpB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDmsgS6JWsFtr85jK6PBAQAHLa/1NdLI5JEaWjXhqBbYAIhAJPtffwa1QJK2v3eJe/fZn/zJk2zWyz4Mtw4OkifRsZg"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.12-a685c1b.0_1558096744707_0.3002201265628228"},"_hasShrinkwrap":false},"0.2.12":{"name":"graphql-toolkit","version":"0.2.12","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"f696aa4ad84b1cb05612c004d7fe49d99f377943","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.12","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-wVBJc3t5quWrABw60Rm8cwRhdIvDR1aaU4S1X877EdB55X1tgueQ65k5GUw/B+5ZrHCSGUP5cPCGsnfrspCFDw==","shasum":"a8a7e23c871508e7bfd861e4940129882e820b20","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.12.tgz","fileCount":257,"unpackedSize":300444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3qx7CRA9TVsSAnZWagAAdtQP/RMpEJrvlrhJRCa9NhBr\nv9JojNXRHEeOJ1L1no4+m5Kz0PTZ4K/VBDhPuJ7jfu2iaRFJfzZieZ28Tl/i\naPiEgEq7lWURo5HN52CGiB+c9l96EvsGhpbg3mHnzztl3NntmgjqK9e2aMGu\nxPI9lxUODVnEA2+eqU6VSBcuTVY52UHZCbOpafEqA+yh2mJ/6WxyJj6qWm6i\nXHvrxd9GOpo9ars/RscLBfCbIHHajFyChFsomz7l/fa4+Sy5R/FJu1KE1uOA\noQGhxvw3/36dt57xznSJEMEWjOlHQpp7Uiq98Htx6e8GuEPj6fniZTbwZgh5\nfONlIjd5ULhEH2fV7OHsj24C3HKJqUmbw+g4pxCWA5Vx+l4CL7fPt4N/H5yG\n56wrcm3o+s9SjLWoOkQigoSH+7UHfyf6r1fPTgBBS0BzTmfxwrvpfUrANdfH\n5fwpkjXu5cFL8e1nVvL3mnILBRKikTWt43P1fvFcP9M/UoQyq260OaQplfHL\n3/kz8p3Lq7Fc7wc4RGsryTHKEUwehuE96IH9xVz5Bamu2LH3SXuPPYJPJ2Hx\nN8GCX6tF6XPz9gBBXE71WfF43KgT5bq+HK2APEP5KgW0aeTUNPPLefz1tMDj\nmEz9aiAnBMcFcKlcToUUGexbEjMbfy5zKepvbDC6guAaGRG1zwxbHz/pd6RZ\nsvl0\r\n=/eIA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAy0SQcr8hSR64WSkvAKZX0VHTpoGRa3JPthtxsTO0ErAiEA4CXEWaBlU61bPTS0sNvwGrFAF5G4zMNCnh0su6GrobI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.12_1558097018555_0.02875798887397063"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.12-baaba8d.0":{"name":"graphql-toolkit","version":"0.2.12-baaba8d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"baaba8d8c03c77155067b857d84ab7aff87dc9bb","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.12-baaba8d.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-V1lJapy86NCgCKe862QNrK/LDtYhE5p9BuvoaIR4wl/UTkMqHTQnATkX5vhkAftFjsPAWA8lU6YSpuiVsvKRFA==","shasum":"d2bf88b1502583db1b01e46bcaec8f2c9d679917","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.12-baaba8d.0.tgz","fileCount":257,"unpackedSize":300453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3qyLCRA9TVsSAnZWagAAMBgQAJLY8jiqik7uRPVzIhYd\ny7aUK5XvSmpExbQv3r0DIuH69PFpqaaDJb5t045qTqtYxI6KknDctEok0B31\nErBP4XRddXR/akY5wIqVrtdyIaR0KwN3yOGHApdU/1p+lEdaB0zMOQFHv9ao\nXLs+qF8RKKRH+SAUnSynFJIPQqPJQQozsssZXi71/QLwERws8TWWom3EegMB\ndRrBhxjvaMbvYQxz8BfWwXgz31S158+BHVDMVB4B9iiN1s3dJn+jJmUDgZMl\nI8XrMg3fMxNxEOGZwDTljzZkdbTfVleJsl88BJh0lPm3RgF9N8gH0hYti0Hq\nFThfPxrj8fGIMkoGJ2uOD2IgDyznCC+UJXeGIiog88DiemYNsCK09K9B7YPQ\nxajY5guSdPvKKEx7QJvpMtA1iFC1NIvqAoVBLpqrsr67aS4hD1aqqQ00bRy3\njZs8HFZ1IUMYAOFKeHTgwwepJj4ZL5iNyzslor8ZHbepP86XiUon+NCO09Cd\nQxT0O+fx/KCO054CDVbnEXalplv6cyhTnfW48UUanNnxjIsAcdSUL0mgdM20\nCT6MlBT/4hrtF6ufQhGOEi5x2PSOREZC9czV8GpdziaMEU9M1L940BFgFcB7\n6Xb8zIQeAixs2avzKmiSgKdxcyydMf3MDiwGXLMF+RYH9B3a9Ndm6I5rEcOr\nuRF8\r\n=ltUP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGIKXB/YXNXfgboNhEtJDE2wD18q3rg5SQDjPgHKSujGAiEA997ZArWNdJb8jZPqSxV/ENIXRZxQm4iT0l+SSqAvfrc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.12-baaba8d.0_1558097035285_0.9832862429457416"},"_hasShrinkwrap":false},"0.2.13-f696aa4.0":{"name":"graphql-toolkit","version":"0.2.13-f696aa4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f696aa4ad84b1cb05612c004d7fe49d99f377943","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-f696aa4.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-10zjEMo+ulwJwevkdpNFPJnz1QELRfGkxO0L/DHyYTWo2fKmWFOHl1oF/L8fLdwP5xR+yA+yhOslmOt4sIHnyg==","shasum":"f1d040d991bde4f87b58900a78d5c6313d8b764b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-f696aa4.0.tgz","fileCount":257,"unpackedSize":300453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3qy6CRA9TVsSAnZWagAAWNcP/0Jq8JQrTHpMKnQ6++aL\nzlMpitHcRVbEaFHeFEsz+t6EFZ43tEss3SyOExOLtK74U1+Ieh7YbNFggW3V\naPTyuMrN/Rrfm+ox8rzQAlygvM2kEfLrslpgPDEgARWvqGUudraG+RgPYpDD\nE5uS9U6wT7LHGSeoll7BCFu+qNcfvFrtmhYQSwSnacmkI5WWOrboYJS8gihm\n22QxPB4yOjVLkHMKHfTqOLoN+9JfJtaVIrz2sbv8cdk0Fm290y0rb+Rv5mH5\nieUX6D7eALe54CwMoaOnCukPApQOlz3ntAuvBcvbn9tnpMK5ORaLIfS2mEjI\nXkosfBE7NBpc0GNuoB+O8Ifb9QhEmZUnDWp/oV7oaCp2Mo0P9ZkkYpFJgK/G\nWwESBtjK5/KJt+NHN5M0lLVNRIBM2DOoi0lI+/EDG00ysvS0JKaAyXitosOF\nbJb2g4xQoMifDmH61n44Xe7wN8DoPmixuEJp7fiGVogF9/6cmiZzV0NwhAr0\nK+BdyIbPrhpRMYwap6S4P7fy9yciHIzQ9CUSnv0bmjs9od9AXyUS2mSY9yQa\nbsl1ejipJzAQDjQ4Vkb7oUTMI+zyMixxLx5rUZkUBHq7vAWXvZmmfYycFTLF\nvI4SNpBUauhJ9h3Xba51yoAn5yiIZU97FE0zkjiq9ohtsxrSHX9huw9Ac8P2\nkw8w\r\n=fiPI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCP2bSpDWEJDSmHiojyGtpzR0AAPOudOv/1nbblv9g0YwIhAIYkvwl+zG5nNzNL0z2yR5ko0hCF38SshfNxQbjIslGc"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-f696aa4.0_1558097082163_0.821314837372596"},"_hasShrinkwrap":false},"0.2.13-88d37d0.0":{"name":"graphql-toolkit","version":"0.2.13-88d37d0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"88d37d012bce01e67321eae1fcdfe306050438c0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-88d37d0.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-bE/L2z2s3V3tMZT4UVdO9LhGlfCB1OevALAwZtHd6e4Lxrk9vu4da/j7TOBpNtkfu89w1v+LwFEBc9ssC5i1Bw==","shasum":"1660d087d9a4ab8d3e68803f1093a151f6e8248b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-88d37d0.0.tgz","fileCount":257,"unpackedSize":300453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3ydfCRA9TVsSAnZWagAA7mIP/jd6MC+i0z/BKohXY/wP\nBbaEcIPNryps/XMiL+3lJND293B2XwX+x8DrmnjZdcRwEyaaEFGKxz2eTqWB\nm4FduLTsCALRtlfzuyllIEhrEqcmlp/xihgibpjVo/S35fh9GHw7ryrAmFxO\n7rZZ65WbwbYiwrxK7GsiWHc8XEmWMPXiCWbPXYGE8ZMI68ba6qiJcgMqnXUo\n6Nd54uwZ1YrYe5iQq184JzcdvLFI5unhsXe1hHmtAcj+0TIxlAPMivZ6ux7z\n/oDx4wwPhp7IICGX5op1fb72hIX2L3RdSKTfKXzyQVldODXJWtpw/rtMLes/\nZtTsB43p/1VMQuq3648rpyo3Ax7d2j5AF9AvrtfsmxGvqhv1gpquTKNizhcU\n9AE1XQTH5zFvAExFfMXpltEBVqkOShTOzsd6I3SARfo12RNbujGPL11QJBGC\nBAOSGT8ZTOR031r9zN17bgrpi2Qer79zyreytObg2RFmGgXZMvMJi5JyHnZu\n75fiK3F9EtnP0k7nNK6G5/qS1On2798FTzqtg8a31AN2EE3nkgDd0FLGdyR6\nTxgb7pHNNvcTLaHSiOQLE3qesxHyMHna2wLMriWIjAlKQ0+vNkLL9O3QzIXj\nLxfAtCvmYbg2uVXpdkHgUYRJyJS320Azlf/+TiWg8WVcTkhAWuQIDdPFACT3\nlCGI\r\n=2or9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCC08H0NMeXUIt1dc3jRCPjc6/u5/NOLrlX9MtsNnG4sQIhAPP8GuJpCrL6N2ZXwgqFNS/MWqlYHnP7Wy6Qrlk3tBV4"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-88d37d0.0_1558128479103_0.4502509788018163"},"_hasShrinkwrap":false},"0.2.13-9602943.0":{"name":"graphql-toolkit","version":"0.2.13-9602943.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"960294396d4c26f882e68a52b4c7b4eb741ec56a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-9602943.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-uUZ9/r7CwwXt5+XDLVVdXlVGZGBXIxfdeFPQm47sBduv97tx1M9jeHnvpuCnAqj8lDdeIZkA+DNA/Pd1w4lm+w==","shasum":"80194ca699c93ebeff3319dbe3912896bfd43348","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-9602943.0.tgz","fileCount":257,"unpackedSize":300453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4tJWCRA9TVsSAnZWagAA9lMQAILDUv/AVQyEofKYGQ8e\nr4q6jHsRe+iwhoiGUcEVNmZjecV5IjhqERrfY0Ay/FPLMPnX6C0Uclrzyz+I\nmKmXTeDOmOf5jJEz7WTHr9oEuWXZteDYrsh+rrF6okLZ/agR9P/6X7qsLrrH\ncTWK+esK86B+Jowy8N9reDxQrrAgmJIG9fNs8Al0XqlDRUbB+O8YosBnJe+L\nglUdTQTg4WRj+4FEJDM6RlZZNTeYztzIvICE//uO9w1cqzY6TnCdIC3FsZNK\nhh9pxO6MuOnQiuMiYS9PRD96HvC1IPZbFYEp5BY0H7OuFo3ZSXYjGdWvLgqf\nK81U4NAvrUmFOr14n4dqfilOtRRif2jxexZxifWfpmNGTxGdmchuvyDwrlus\nzgVUMsg0bw9SRVdqJn5FBXugY3lUWGjXz0MY5G4PGK0BZ3iY+Ds24jifEB+T\n9B3EvTx9EZimrFbhPtqqUmek4zxVrsQGNFTXlhJvnd/uU8gDHdfWUnCg+FVK\n4hzoKkHOfryI83pQQgIZOqNLCi6Bjbg9i+8APDfjRNGy69umCZ5xlMwzhitm\nJc2gK5E5BDM4gFViSIc96gPBYHQCbkeg7KTx4x7ZoU6TVlLmp/ft+tfp2St0\nnyHG1/bJyrO8LPILgNYk0U8gTAA4H1buAsTI+kKIOQG5+2tkODZKC31zmbHe\nDry2\r\n=Tyc5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0BPbmMpnvjwFod1k9+GA1SuQf6gY1ZmFQE04YVxmL6gIhAIlL+y9BfydCb8s21T0PcWWPEJgas9KRbkdbOUGeKvt4"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-9602943.0_1558368852995_0.4004499022551653"},"_hasShrinkwrap":false},"0.2.13-943a3ad.0":{"name":"graphql-toolkit","version":"0.2.13-943a3ad.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"943a3ad5b76f2e2835466056ac9f10af31265632","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-943a3ad.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-6NoH/m2AQ2WLw3g9yI9of+ba8bDYnGEgrgP9pcMIlM/EA8v2NHbFxdH4srt/JwVEgVh5QEsM5wRJZ4wYJNMsUQ==","shasum":"dd94bc775351bd5791645151af694a7c52ba0d49","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-943a3ad.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc4+wVCRA9TVsSAnZWagAAUwAP/14mfFtQpwkriLCyF7Lz\nrwpdgu/tYiM6cXt9yCa97qNd5GME3c3FkKB6EHsI6natUH3DcLNBKBGcEXxp\nim8YfT3685Qvsf0whjc4plwaPxafihUpwayjDA6IDn2uavQ8Of63w5Q55cEe\ndFG5NcpTpYBZVliXubycyhvcWZmcfBHE8bu41UGN3Wp/MA435VZSmg+1DdKt\ny00WaTqQqzUhMN8ChfNJJH9sr0RZcSXrGiM5y+gQetwYwjbKyh1mVsWT+9UY\nKGdnnSY230sWd6kZiHmJ2ypIWh3jOLQ14Wau0Fgd7pJ0X4DFMPmMaqsIwnB5\nmaBg9j8sTZdTMIWdqTpBZUVFuU3z9UnBuh16S0e11Q8ETuwmQSu7SabLH2qK\njOg+zRs8Bv5x3rGMwgJ4yt3cecJroBvD4yx7H1hTVSQzA0BIc83p/yRXHct1\nl4ypmDrCzM369zGNx8KaN8KESBMB4UrVzcjmsGbChdu7oAPREyK5M74hFApW\n3QMHbNF1Urg/ZA/3vrCkhfolXE4vJ0cbtIO420znnlbHzOC5VmuLO5RGc5ji\nKb4sbc1G3at0ls8HW1WY5sjolFDnE4oiVaBJ9uJJ5HEryGAV52rrV1qlmQeK\nbgAqZADKCF0fx4cEcaqrxh7g7zM/b8XnBZ0Vt//eHg4h9kF33HpgBD4cp83W\nG/G3\r\n=xSzC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGrmZMNAfB1gDb7XiJoMkjmyKbTUtD2TsFn8unKZnHZeAiB7pIlkl5ou5lc4/Vmq2tJS4MWwpeSelZaGNw5CyZbxlw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-943a3ad.0_1558440981288_0.9230922210787271"},"_hasShrinkwrap":false},"0.2.13-df6ae1d.0":{"name":"graphql-toolkit","version":"0.2.13-df6ae1d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"df6ae1d2b30c8c61206d021d28530d9ef16080b0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-df6ae1d.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-HmAZisvJfgM2VbbT1pfb/U5uf3aF1M9WJzMvkxbtLJmMb0mbzxGbShhg5KQRP/f5MGbuuK3Cj+5F3Dn5iEYbCQ==","shasum":"8a5c01d8c0e27dbb82e32686ab0dd9daa4c03138","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-df6ae1d.0.tgz","fileCount":257,"unpackedSize":300453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5bw3CRA9TVsSAnZWagAABpwP/ibJtkPDCxnmMZf3L5zq\nB/S7VD52izDIyWT1fmVsflkWEe/dVeMYKRikCxYH20zLbQwYz38mJb7Ky2+W\nh7gmx/1yiv+G+EfBY6GRIyfy0G6Wq3xuzSqBwyxyAAMiCtv/9Xbe2Li1TqXQ\nTk0DswwqGicxiZsMe5bvekbTq0J5iRYzxeStC0OI7mNteofspLvGqlily6kf\n1L/lviv4kQexKoksm6mvRtKrPR4Rok/NiH0wJfkLZj1oKTLTcMeSt9fUbE9b\njCaA9Km5FdxXDdeuBiY2k6nhRahp9B4WNaFNHfckvh+csy/pnUxyj9iyA6b2\nMGryev4SleWIGc/jasvUJL/ISQfh9Sy0zpVRt2TjuWxu6bBAEfN/zwqCDLiJ\nny3T1Nkxx8dY0QMEXMd0U3rnqSsyUg+aiPOoQMIb8bMSoLEBAWbsXSmmc6+m\nQy4rU7mOuBqd/36/8wqTsLLkAIbeIzqLRDxDMyhRho4d1dqHfXjg3Ql7vNem\n51g21z16p7ovhcQWU2xXUo/uyTGN4DYgoX+NirPCH00ob1nAksJKHevqT8l+\nb8lIcD/oh3WZySlZYXdvMs+uKbY9GSuj9VSeCtDeyYW4ehgGeMF45vbcWKr9\n4BHtGunUEUHB6hZzQww9G0MUwn5AWtLtZXfrGNzCbo/gO+Os388p05wjccJg\nfj4v\r\n=Nj1f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfJkqLlNm5yaUHxNWVJ7dNa4v+bw8Mb0Th63XCYbFUbwIgRBoD+1lEEW2zZemjaDPGCd73tzYMEvgoSFYm9gwJVjQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-df6ae1d.0_1558559798866_0.35680454051264165"},"_hasShrinkwrap":false},"0.2.13-3cf72ee.0":{"name":"graphql-toolkit","version":"0.2.13-3cf72ee.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.0.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"3cf72eedf3678c3403a6fd0466e746f485b319bf","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-3cf72ee.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Q6I3TkH1E7ywM4e6NchSF75LM9SGhnCxh7aM9JqUCQ6rm/0GMt2CuTwc8ZbhremCXNjgDAHETKpUp6vfBddpug==","shasum":"fb012850cdd88a9a62ff342d8f59b0f278a8127b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-3cf72ee.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5eA+CRA9TVsSAnZWagAAQMYP+wZSogA2zlmQneJm7gBA\nViLA2IAD2D29G5GzEMvDQysoNSwXiqVor760qIYVLPm2DTQ68esFTjJeqcPr\nW25T+xaRtZR4vWdHCTcjkVPhQhTIGLaB1YCpofRc+6KMB5LrMLVZQ/GE5kRn\nEGxRXeCSIVGpbAAGzO+Axwsv/yonpE9WNtl+xsfEG7BACE58DaV3Rlqnx9LC\nOTdnIW67G2Vz0N3ovhzdJkekG0G1HRWUvxdc9/I0ntmO/gXYU69fBDQuNRxZ\n2YcMIrtg1Bz7Y9xIp7G1y2bgeLOq1I89m3vVyPOqb1YDTee0ytP6NLolmPeD\nP5NC8d7xv9FoFGLltL442YYc7fj/VZNuvAyW8Pu7xEO/x/aBhu7rFelZhSNJ\nwl/Ny+QBc6C6ZSrAn4VqAcMZoHTuvKgDdS5DBSJLg+l/Frjd3aRZ7ZNh5C8H\nfa+n5GB1NycNY0IDiLohTIjP9LL8vIn4HVP+ilm4eZgeqh2gH5JziA35t21W\nXNP5fY0OkpW0jibyeGRFMPBOO2jP6jI5GYsCC+xIxziN3rGwdYX4lgugaV4t\nQHWg+l9sER/C416ULgrrUMRQNd6zHO8FcxnAMFEGmKW8vmfcI/VvnvF2kf2n\n1uEm8pscVo23zXewz7tQQLXtsIQUioCF5lD1uHfyRYwYqZGHRrGqZwScnNnG\nrVhZ\r\n=H/HW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/iMV3Ge5FOwsgwtjh66PxjiGU8N+aDLCfTQSc3UQJ8AiB98X1pQQOh8H2hxl5VnY1ZVuJyqy+jBVWqIgyNmLAPQA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-3cf72ee.0_1558569021717_0.8351041886138528"},"_hasShrinkwrap":false},"0.2.13-093eb4d.0":{"name":"graphql-toolkit","version":"0.2.13-093eb4d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.129","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"093eb4db32ce9d492cf96336d893e3f0b0ad2ea8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-093eb4d.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-enTSzRC5VFRgY8v0W65GNlYpNnSk1ijr2ydKeuTuEEsKY4woxLPgO1TpBqWfMqCZrqHUb6RifOpryp4rFzQkzw==","shasum":"6215c7a72b5585d97982e199b4714a81dac9e187","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-093eb4d.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5eBRCRA9TVsSAnZWagAAGeoP/A3IRzJ9HJrNFa+KyzED\n9CkGO8gXejf0q/q94XPq+oCNZ3nlQTziFSbgbuJtUVW4wamVKkn3ieRjRVhe\nU+rskbSERBL1GWHRE/zp4/R0e8io1J8HZU7wftuXj1xP6MN5ih3r0mGURyk6\nSuIsCdlkJOwvWR5r9mVEbo2bjcGhPk6/968MmJK4+kyX4z3qE0gjudXze51/\nxfzT7wXueFSE5+ptK2fO4YLJo3ZzfQaH18K2AhRx/2ynHuPxeKgb1/oPw3Gd\n6uQhEb4+Qd6PLOFt7I20XhE5fKaYiqjx/YOvOLhuYPDBal4lwBhJ1ZwV76Gv\n2Znt+zn2cQU9FObP4yuIF6EVindoRScv/6MoOPo9/nJJ0+R0h3gAXGROuw6L\nfyyavgm5W5IzCUIBkm8hZLPhwSkrlhK3vyLucQ17DvE0735AK8muu9nK6V+I\nO1LhJAP1pGmPZ3j+949GDVKDw/8JflRA5E5xuLM3xqnCi/ROKQ2dprUPSBYp\nzGuKL+fhG06EAqQ0Llf36Px6NiRc3B47RURBMzOSmhhMr1AN7qnmvyvyoVg+\n/qw7255IWMKvbVq0CX4tgUX2xPylSPieML01oTaasNwJq9uxM8QKAON+nytK\nh/NrKB6C7ltif3tPOxedkokm8uWgCNIasJ9G36Jw2zHVnPiD+0vhx/6fVxLG\n0fZO\r\n=aJCN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjzpuCpYMjt7/kDu+7nbw6JOYxfG41aklCh/3jCr4loAiEAhmBiCJdHGVDvoNVx5cGfYEFm7qeQV8Xbe9CbfDKTCTQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-093eb4d.0_1558569040844_0.20764624340368187"},"_hasShrinkwrap":false},"0.2.13-55e26d2.0":{"name":"graphql-toolkit","version":"0.2.13-55e26d2.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.6","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"55e26d239a8357da49ca040e9d43591698f0b016","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-55e26d2.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-eKclUAjgOk/tjl1QkYUaIOoPSPgjzkVsMtSoSKlUt3D4BkroSe/+0K2JsYZvhlVVYiN+DZvqXnqrLBgOvq3C7g==","shasum":"78c4ec3979a3490fd8a53332b0289d760c03fba8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-55e26d2.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5eBgCRA9TVsSAnZWagAAWBAP/i4OnuO7HOAE86mpmZpQ\nWlYJd/gjoRMHRmlgvA9fvBPN3ePLawPP45BdFYuCnUNB8lLnZxdWeysiQw6I\npXd4wKD0QbcyS5YzIrYS4vdryoLxSFEZmZJaAwsc+u7obZJGji+rdk6ZDZZi\nSARSzImZgaHQzNwyeTXzfx0T/ZJIFcw0TFIbBZlasji6a/NTF5abxgBnUS4m\nMhVAudkCT7C3IfJBQZRfEzfl6FZGy0j6Ui1AaSxd1zpIyNqCdcGoWq/VZqkv\neyvb3o1OlpZJZoTzZodUG6kVSpKTvUGKS0xbt8lH0+bTEKE0OSzU4hEqNEcs\nPkSTQeWxwes3DB1+Qz9Wp/wOVPkgMJqw589OzbBuHJ+msny/FseGjQZMP/ao\nS0bHAlzJP1UgTkXoUgHKW7EiM4tx9Rl/AwgxZ5bxcxZX5ngKbVM8yUcBLCDa\nhtKIbsoxzM0gmxfSkAo+1l4qeDnKEZTiU+FZu/JWueUng0eWOthCcjfDFUSG\n8D2MEY8wMBmwkCm+UHTZQHLlE2MjeDN55bsmf98em/1NKQFOLNWDve1WUI5y\necOm8KClL12PCu7klvCm/tykkbnEkDHCRjJ3iW0Vn/wY+PiHyoJptzvY0r+G\n5POc8aQXv2ytrDUoVzWl7m1tlKqBtN0wzbDXrplxgmW/h926IVr8IBk2Ui43\nJHo4\r\n=VHRp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMelVWp0CbBpTjpdSms3bxyGj8DQY2ZmLIJ4e+MTMRCAiBmZiaIixDGr1Q+eV1heROLivQHKgIKVPD5KWTzcmL9/g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-55e26d2.0_1558569055462_0.6429772866233052"},"_hasShrinkwrap":false},"0.2.13-dbd620a.0":{"name":"graphql-toolkit","version":"0.2.13-dbd620a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"dbd620a6e4579ddf8aadd92ceb47856dc57c882e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-dbd620a.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-B5ps6WNIE58BvLJYG87q4s1fi/A9Y0PXeBtXXMJJGNU2PF15OhMkN4oBP/hMqQ5E1Bi9Yzo57zoyWjuQH7BX4w==","shasum":"f0bd0b69cbada4001343748ddbfcf92f10a6eee7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-dbd620a.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5eBtCRA9TVsSAnZWagAA83wQAJuGD5sK1p2SyVPKKvf2\nO7suLBocnNuFsaBHypHD7yQmKco35UFz8yTtsXC4H4i374NoHBxMFb7r/2Wf\n3xPHK5jAyt3lTxnMe2i2CjKOUirUMtzAOT9f3jvz6DdjwhRlVIP02sLhMQLm\nIEc9r5rYhB3yZ59UGNsG/9V7HuLmC3U+QG1OHw3cLBtb71hMQeH5gabLhDzx\nt0p/L8Iu6ivzGZFqSQAaL73qVJxJmJ65bmjAaYHfj1TgBeh8W68vZTQWZiqt\nUFXb9Z5j8YomKvRVO8EUhIqdGAk/d3aSg9wTTtd3UDABWGSJj9BW2CsESSA6\nKMWie5zUFdqh8Tfnbg9Ht4UskF7SO/c58Z7qWjBPqkGuE0wDQScRovtW02PB\ngbiSqjGcEX/pYvRTwbD0u/PMuIN57tkzOhyaAtLXrT2ktcv+t26cI46rIlvY\naC7mbjkuTcmGrZ9XTppcjwMKnQf0oKEF76/f4pgIzP7FFoAjFkkXHm+AZzhP\nHxyc2aGCty6TkaIMlbKZ3Lv/ReR/ePP8F9brkeSVDzHxCTUl3dbhtkRiUGQx\nea991KolYrUY8E2nhaeLKWNBBCmZFr1dZsrzeeeE8GdVOn6mJTscB3YRP9VG\nFInErCzvGYmAzOQgGWk8SjU5P4GxBehky2wfNLpHxjxBEsu4tjqbDgudlPT/\nPsAF\r\n=BPZa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEStnfRVBtaTR0Z4e3HHnQmS2oRW3qzQ+KK+DAIoh2tqAiEAlYOwT4gNugLWfcGK+7bUnITwF4R+1t9WkQGIcOqx3IE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-dbd620a.0_1558569069128_0.8021847949187826"},"_hasShrinkwrap":false},"0.2.13-6954194.0":{"name":"graphql-toolkit","version":"0.2.13-6954194.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"69541945288797ca45788257cb6fa93c7d15c276","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13-6954194.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-NmcKxFS0wzKZRGegRsHxOwVW8todni9AKWuoY9D6N45W5euKBePEqxpTVxwJ5DsYZO/8MYtF4plGdDpRPCeg7g==","shasum":"421be364751194f475d96f83b7f190166bf646d1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13-6954194.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5eB4CRA9TVsSAnZWagAA0O0P/iDR8QU6IYPkiwuxFd07\nAwmP4d0OAAODfhI8oy40nsCqy2+73Skkgu37iojSPp+1DoYsj3H5pO0mR4A5\nFt1x4MsZ43lZRuj6RxAKt50d0ft6aGpK60Riz9oa34UtiwaHHlKxodZnTqkC\nyQAhJu6WG+kmyAbxytDfglqK7HTIZTC9xMwfM0oCr/9GxJqNNEnxLz9W6dXk\nLfXJb01u1MZK3eqjWeFwc93eTebW987oTTH30W2PHgGDs/NW3nrPOw/mMFOh\nX7yvJTWqvR3R/NyUG5W4/r/rgc2IXP9WJdx2aOjOFokcddQZercFqWdxsZjk\nstv8bPY8NKYBCJK/FrFc8E+tlMyYmn+r4w13nkB5eIJdwKkSYo1dKf+AUx5O\n8bUAaVChsf8xO74d/d8bPiiPevc2K34tbkGOS729qxc4Xk2zI+CitRPNiW41\nK8wWrYi42iOTzJGyafoIOC/sekMSLDZX8nW6R4PZrLwksykCTyaAZG0gBJRM\nRKgW+av8OQ2Fs8YlRvaTVd2YXW/oYHRXEHpuxQDoLuMrUzL+lC58sEODEax4\nF/61i5isNKSECFgWQZmYiKdRifE0JAYi0eCTjcPbDpEDSkTFCNWKirOFqIkR\nQJAzYNr677zZTNF2dDLGcUCILKMyLH3RAB69cFsaJeHkq9e9dByqIJtOmM19\nPqJQ\r\n=owxP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGSHF7sJh67enQIlLuRifn+0SE89S+1s7GE1P+KB9yOOAiBwedGqkukylStjPY8w/3OLkLmUx7CzT9eTcg26V7kFFA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13-6954194.0_1558569079801_0.6581532471097742"},"_hasShrinkwrap":false},"0.2.13":{"name":"graphql-toolkit","version":"0.2.13","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"af510b9e2983571636233d373e8362a8560c9eb4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.13","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ndLkGMrRFJr2npCJS4JLjh7wE/6erD4qXiQ1L+09zMJZcKuUgxNP6NtM4zNQfNmXC9Reqth3yYohaMbduuZCWw==","shasum":"7135d7fcae38129fb08d6d6a358221aaf3ad2a6f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.13.tgz","fileCount":263,"unpackedSize":301867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5i/+CRA9TVsSAnZWagAA1B0P/AzKvEm+X0zo4m5OOPTc\nC3sVZbszMa+fuqB1JUnxlYdEQNDC22VBShBjOMJvipGRLjcY5OQztgBV1pzM\noKIz5Xs8XvcidSxkssb/RdGMJr83s7wcSL9GqrYEnks8RMV8JUBNVVUDAExI\npeWm9uiZt5K3ah+JwLaY8dLZO4RCCpRpFFPWi+P1rq4JhD2+0exGzoRH/mv8\nACsUh/2oCT+LGrLkFlyyHxbSjmRTNN/ei0pNl/SNmvdPHCvYZdgw3oxfUVnd\n+mSShhcEfNQlW5uGu4eIxkz+lKwHkshQrIOSBwaQ+Z5zdBxhOZruwmnXqKaR\nk7k4f8yzO1hU8qZjgva0KjvABoODC2VaSvnJlqjFEtoExklodiPPHtg5nzJ1\nGhE2RIZzSC/bOW4AJfyaJYzeTKyWgDAHeeirhbXuve0Zb7Q3vXPErRhgVkVf\n7SCyeEI8ZE06WhhgLkXMvintCCsggGG2EhWkWGDHeKpm889fWaJbntsOVyC9\nx5Od7cjYyEoO6Vmvg8YoeDVw0uLlRouBSFnXN/DPNX4Ck9X64UhTLEgxsKc9\ndEO42GrM03kJWeccpNLz/BIPDkA0gJ8FrSKLhTmeABT16mBiVmM6a4bJeeGJ\nFwd30lStAjCSP2pRRYPsVzzuuY4NbcpsmYoefm04t9vc37+NrQIrdnvnxzN/\nTYWC\r\n=UqAk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbqTOsT+tOqghaVgXUb5pQxLfFdAvhD5PzAuwft3PnMQIgJjyiyLzpkmM/ai9NxkVnRy4HB7isjtCpvY9UE6ls6T0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.13_1558589437636_0.7130307425323221"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.14-af510b9.0":{"name":"graphql-toolkit","version":"0.2.14-af510b9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"af510b9e2983571636233d373e8362a8560c9eb4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-af510b9.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-SNybqiWAV8ls79xmmYBN9qnP/3lX2lbr0qaNNlD7vhvLwL0rUCB1DXyFN6ANHNedY/UN+pj0WQkANzRA5jxzWA==","shasum":"86aed26596df1f4440d251acc9575cc115b27ee1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-af510b9.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5jArCRA9TVsSAnZWagAAEjsQAIND2o68SxurPxGkCXms\n7LYEpfOBNedViafdwJVtzBUnWnpY/2ZdBrCG/Ch990nsXqjI0CwYaAMR0Kox\nPrFO0FI/0TXPIyHWIm+/mGbAHmioDY7h06v7P354RoqDdxI3150f+ljrlH08\nSzqCSvtj0dY5IKiB8UgtT65S65FXtSlKy92yKTCN29dusvPE+ifbP0PwvreK\nq7jmOoYxtK+Dxu4/yT+c6XYXTQbC0Z95yB4Hkf9PaJvVpPko1D2SB/tF/414\nisPsUUG2BMn61HHT+7wr7lP6OFpnqYJ7Q/QixTE2vimlUTeDh9pM6A4kWDF2\nbSJoBSxuqhGoIXD6ipkn7HMQb/v7+UXYX0QDPbKYpP/SnrloPZ1kZoeJjFDL\nJTRQykOnADDZZ/JFC/zIaH8tMqrF20RZGojF8K3O79WqVgqeqoINJA7e4x5P\n5HFNxH/YHQ31H3+PdWXa/5wAnbJUFzDo8UjtsNGyEkoGDMWCFrryg+nKcwva\nbnuGquu23UUx6GBoPlHXib0bMVPCY0y9xT7X+BHqytao7TrwuQvAGFkcXVVK\nHKzdmn3UqOeAERnX/J8oPu/AmLJ5PKlfijAR0hSiUhwJ1yB5mXK+/rzGyV+k\nuCbxciDE5Lq0IUWWSFoPG3hG4eAuNDwqe3LK8FNryZkz2eSjiCj+xaWj8cd/\nQknW\r\n=2KIW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqaj8spgK2QPKUxcA8QSZ3jvZat7XSrZuZg7UE9zL5zgIhAMGqtjOBwv+hddzQSjbjZBZGlo9LATPKBwk4RIEvB/Ng"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-af510b9.0_1558589482574_0.44404498981873064"},"_hasShrinkwrap":false},"0.2.14-96e77a3.0":{"name":"graphql-toolkit","version":"0.2.14-96e77a3.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.132","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"96e77a3adb3b4a10a1e28e9b5378be3cfe827665","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-96e77a3.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-u6AvRuxyxOSyhe1fDeavbSD3GWbw3DNyiAx/Q/Ety5Bh5sB8pxl/AFRu8K3vg4J5URuKNOMM70latb4TrEFX7A==","shasum":"3b9767fd64deb38cd4f379bab0284197bf73a32b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-96e77a3.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5r99CRA9TVsSAnZWagAA6UYP/j9ZpBAT7tiFuHzucOYv\nCTbCSyqMpGIHmziCX/ontNkP8BtbITdC3JW/OcHMowyF1WP/8ugArXcAy5Ti\nxWchKbepn+DqCfHYLonFMwrYz7f4ikxFh+EWMCkQK06sSrx3zkeXMGTp5nSt\nRkTaNGy2GUztfGQ5EBgblvRTu6Kju5DPgqPHYYpO778Pq//sedYNRD/p0Lxr\ncyRnXXb7b0asZ8w2QB71/iGR9cFRinXiCj2LkqNUYz7KzzQPvhsiCdt1Pfqz\nBT9mrkeLuwiN0LsHUjOH1Hoo75zyYI+UojdSLln4jwPHjFvBKDlMCUgpUw6S\ng4fJzBBb397QhKHtIIe/BXSzoI1d3AZsYbQHFgyqRSIZ4s1owH+CTcXDwcen\nRWEoYlwZtwQ3PVva/bIWbUgSGR3Kcxy345FYRLX0wufwQKBwBCdghAIlXETt\nfnr+A8QJkrxy0ZVaZiN39+tVPJJ2UgYceThN1JA6JrUqPLv7vea1rVe9bGwz\ndZELrqULzL91482xiN/wEyjwgwtYcly1zPDUuVTGtz2GGfToXfCTtruzhEjd\n7Mx/ZSRLQtPu+DTBw/7dIDQ6aHgSoTYY2hl9zIBB5xcnG2tOmSkR/Y8QgjzK\nEMjThjqcmdn2bpiskzrFpwjTawveThC2vzDfcxLBwbWRZ/tfDBmFzkTFGwQ3\nAilp\r\n=sJQq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBa/XxCO/dhD1G1/c1aN8CvAeEFMEp7iNxuFzrLV1GcDAiEA2VYdP+F4HCJvqy6zWUjUlngaD26XZnT5luUxYUSRfwA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-96e77a3.0_1558626172294_0.26998742806447606"},"_hasShrinkwrap":false},"0.2.14-ed4db9a.0":{"name":"graphql-toolkit","version":"0.2.14-ed4db9a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ed4db9ab6f071253fd85931ca35f7cd27c6095a6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-ed4db9a.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-EIPjcEYuvSfQZ0BGV1IWxYwLCWpRm8Gdky//PLCHaKjb6zLBaa8rOarrhHAUY72WPyclR6Ce1kE4ZJvXZMjH8w==","shasum":"38adf736df92e0530689ce01527296d50abe4420","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-ed4db9a.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5tXFCRA9TVsSAnZWagAAtu4QAIlIOC73xnKGZeopMq7N\nb8n9340Z84UuvlLtEZn7/QVtT99tlWQX0oGuI/dDZRX+IzV3zTYqyF/6l4Ue\n2BEcHFDCa6q+yX2mqaju3hZkZRA0orEX3DW8oNTQimI8ySWrOaZpngNK7WdF\n4ak4dLQKaO+KMfSKYv5cp2E2FFYFVD3BEsGzfF2DYNe+bMDR0nSfd2W9h4Ow\nU4/b1o5HGBt/FI4rsBivjYpEOx6xt3hRwuXVM75hh3/BmOQ0qdDCZTX1xIuN\nLJ6P8RI7eMCcC3cECHRiL3dei0DJ4K4jm+pOagYukBxOYwQJXYVR24W0TJbo\nubi8woMuCryHwnB0LbgESSK01BUfaF//0VVApnFahSJ+p1uW2Vck/VIygc4f\nYUz7irINUGVnX34SUJSMw02+XQYRzWscohgr9EZVVmett+hn9zQvYs3EK+Wq\nwESLHVQsJLN1GrMugMtw0yceK7e7LBx1wOhuyJdFZqAcPCmeT82Du8tGR0Zv\nt/zdoXolfm9nafiEUF1Eo3IHiUbNLQz/ljOrcfzlWMQZiSRi73+cbKlQSzWX\nqIRoh8oCoFLIv8VXsghfbawnnUn9Z5JQEPcL6FbegGZRPHKOGGHezIy1fJSx\n05QXM+nq1c2bBqcWwno8OeeCqboXz/5N6Ix+KKhvfvk2DfEPztMRjzj5QXK4\nxbMs\r\n=7sbT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXiYMMZzFWufErjL228Qjd7Ucd3IdIxeTvE8eHgSlauwIgWzeD+46mgH684IrlMbV2B2Ii/NY5LfAOsKfJB4IZI1o="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-ed4db9a.0_1558631876337_0.6689399650617731"},"_hasShrinkwrap":false},"0.2.14-91a47bf.0":{"name":"graphql-toolkit","version":"0.2.14-91a47bf.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"91a47bf51de3a5f14b2415f04b26cf4ecd510996","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-91a47bf.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-jwTC5KhB7FOCVaWYGCipMDhq1PtrOInetJOd8AfOuTZVH7YIDiZnFNY8pfnrF25EXjw/W4apg/kLhtgijKTqtg==","shasum":"dad0760d5201305645d4e3552b4b6c133f6cf335","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-91a47bf.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc5z5KCRA9TVsSAnZWagAAYtsQAKHShFM1gYqaOmQl7Fp5\nR+oC6x75pUbxxaAlH9KhKeTTWbn7ciFgSF4KZKop4YQK9NV/lizMr8HvcNDa\nIqoR+W8jXe49b9eqlrKPF2wSA1CLToXpNMli8Xj1HL29loh+MDflz6bR+QYy\nmX3hSkmo4NFrjikDMrwwqY3sqltDgCk4dmyHyAc3bOEvyEPIui2Y+yqCU0qs\nwOPGPsBa4BXIdfWx8KTwYfyHF7AFdVO+6O4OIbY1D9um1lpGExObJ3ofrcLd\nprzJ6xaMJsV0LfmIZZPkQk0ONRG2hLU0Ily/BZeClnFycOYO3wbkRMUNzDD2\n/F67tugg18R7REYBXRVVnprEQctsTi2UN/y6XK72OwGaszwI726mnB2txwVu\n/49y0taI7XdHpEOXmO0TiBPYhWakHQNUVQMkgXHQ5Idh4jgAHEw/tfBH2twF\nZeZbkzJojiR45u+HLeh1CdT9JYz0e1QZWApMs3wZeNwAzqfA7izpSilEKnIT\nzq1PeRkcSJq4+IKuW7qWErHhQM/KAahKjAVm99Ye8HcRdeNkGmRaq127F7Nn\nT4dkK+xTc3/FOON7awpuvsoOATmvG47sSujlcqipnQVb3iNK+cNlJC6PjaMi\nF5uwESgk5PIi49d7F/WMO9+2M4CiZ6xBiBv5agqsijmRPXGaw38MDOZZdgHT\nE4OD\r\n=MvtV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5zLTWP0vUv8c9LuSHvq9iRwQHTBIBqD12qbYS7A6XJAIhAIL0yOwwNFauv9lUFo1K+L2HwmxvoDCjfACFEAnbo3vz"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-91a47bf.0_1558658633820_0.7016736287039633"},"_hasShrinkwrap":false},"0.2.14-de5f323.0":{"name":"graphql-toolkit","version":"0.2.14-de5f323.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"de5f323a3b1010bad4446729695d261504bebe31","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-de5f323.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-rkzqbxSZuQukmnPY09FAlsPkmrQavlqIIl0TbhNskM0f9Y9LEj38qXCUkXQYw01ox7xN2SkfDzjDdmBp5KZKAw==","shasum":"c0de191abbb0b1a46edafba9c741284cfd07d6ff","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-de5f323.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7W2SCRA9TVsSAnZWagAAxr8P/jkVKf/8zxu5vsj/mqht\nnO5eTi7cIimyyLtWEUgmxVWZ2mk1hB8yVM0zp/E+3kpJywUTKuPDl79xxTaf\nzYH6okuz4zdADr1l1dI/MH1aDBI8VC8HjHMjBO8Fe+whxa86GNRfWAL3TttG\nDIzV4GR5GRhFDeA53lPVFdN5GZx3sJKYBl7ixacDVMv9s6lyVgF3YJ1lZ+O+\nvvQG5kKsvhlEl/WDcnwr0zugbtdGyf+AKoz88iZ+NKO0/BNBG26/V37Xwy6p\n6Rcmc6yv/lD5y49PO1xptHnmrRuRe30Gkh8MPQVc6Z3QMM0r8KeoM6PA4HkD\nlw6wb77LQ+Vdolj7iASc53VMNC1bS1SdfGbe2aldVOHN2YiOcBBYIYmdxSrm\nDq8xuLnaR3pAG1rt4Ge0rNaW8Sv8dibL4g5S7eKRN1ElNuUUSy1D00Kedcr+\ntFOpgGd/ovU05cnGmwnKaq6uj1SwfOS7j7RIaUcArRA8SAECQxw5S03fqMDI\nY1l6IIFLi0oVMpal6Bv/+f2YKL8dvHcAvPQ9ryNsiennQ8x0F8A6Zz9t5aVL\nQFe/5wkTbQlMfT5KlTRYfQDEdKSOwcOj0SMMMgYdbp7fy10kRs44JBJm+rzB\nCL2K0mrOe7rkmdN0iGaUrxghV/xQ4OKhUuqA+jNCZ0VIl1z/zNzc40Fn6kJy\n7vXK\r\n=xsJg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgZFjaGhAz4diTSKwAhxNjtmbg4NL6ROC01KOGpQn1rwIgLwVbB3pT09/Njblbtaq+MnL5MLAeYkfihFh+UXEpFls="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-de5f323.0_1559063954062_0.5507275639897498"},"_hasShrinkwrap":false},"0.2.14-ef3f5da.0":{"name":"graphql-toolkit","version":"0.2.14-ef3f5da.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ef3f5daf62eb362b87f15d39e1f069a690795a7b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-ef3f5da.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-EGb629r+iGMh7YStfjWrUR90lfxGwxdpZuxYxYvSsP9fPHJh+giGGtBaIoR+UjDXzkI7MHZTGmcaVQc6MH4kpQ==","shasum":"517615bdc113539bd40770557101a5714ea8c28d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-ef3f5da.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7rUCCRA9TVsSAnZWagAACXQP/0w/AvapElrT38ay4owc\nXufgX0eJ56h+SmcPzibN0LTx0y882KCMUBsBtDtrVn47nBBBwYRcKHwxfzWu\nhWKufCWxsyJNio/kV6HG/kD79YgtPJAUo6Bk7AxLSyIs9Fx9K8RdVbFZ1aZv\n2xpMpEYqan7KzWj0U4ySAS536ZGqzODGp3HfvZM95wx6dFgI5PkEW6wW2J+d\ns5clLbZAKMq8vtmCsdXtrrdXWokMFn4uHfy4Kzkjz9B+0mctfzpCuTaSEmvo\nbacBFJOwB/Vez49wHmj2bFNI0PuvcaZSrZpVuwGAE29Z14hj3ZBpm/hVvIPG\ndwU1j5CXkpcBro0lb1Js3qNHS8xKVutlkBywZ+EskxSsTOXiz72BltfAR6Qy\n75vTXKXbET54WnjnavkQwJth22qmQ2yg1p2hIs7u8kdBJuE8AfJGev5YNTfn\nOfmOCjB6CZP4Rfoi4XLyD3L8KbNQrqAwwJENxxqrfQWUyljWBW+WZpo7STqm\nDA6ALeHCZBIaAekmT5GtKrMtTRb0DmC98ik22M1m5e1ze9lM2rcejtG/BQZc\nW+1SmpKW5lWo8j1fuRN1AH3n5EblrmekoJZPSjac1C4P6JZ2QZORnye9lZam\nDKVaDFYlKF+HOkm73Br7wp7O173qUCJVzFR6GzIKTGaUddDI60Uoyx/BVocp\nHKsJ\r\n=yDm9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHi0veyzLGGf0b6R0p153Xcje3d0B1bvDTXro5e81NkWAiAbSR4gZG77BfpnJ71YQIuOv4MFwukxa4JnoSrpFN/sXg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-ef3f5da.0_1559147777315_0.9924296102663843"},"_hasShrinkwrap":false},"0.2.14-534d5ed.0":{"name":"graphql-toolkit","version":"0.2.14-534d5ed.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"534d5edb45320406dfff95c194939041c875a1f8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-534d5ed.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-fi7w2Vxh+s7pPvaEXYZe4CW00rez/YcLKrMhB0Y+83XNO3ZCdceXb2UbcjjmAWFDFqo+PwifPMPH38uusholTw==","shasum":"76f725067379ef6fc4aaab0741e15f8af90c9637","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-534d5ed.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8B6hCRA9TVsSAnZWagAASyoP/RI9/MkBkvQpgT5QkRoM\n/8oJIjxAJjkTI7uGk5Vb+yLirSWYP1JmAiHDtJO9tTInV9ySxs742rE0/BvL\nZGse4pDT2cVu/JrUpnPiXLL5kfuEqkup4qNKUsbPTtZ0DUetZ3OiNuB4FJPM\nqeasx14VV6gWbNyfFg7rAEaRYSIfj8YNPgvXeM6uAgok+bu/LcbmwKwzh7wp\nJP3QK9bMkiZtF6+uOcNBz0uW62/iaX0Hhug3i2kxOc2DXDF4q4zR5ZLhz+GE\nj8Io7nl1IrcLcP2uBfgqz/GAnuTt+dvVhHxQOuH1ok+xWaR64CecFSUYGdSF\nSzrRpJLWXRXAwpk+Q/RTydXULO8tmKELsX5NW3ZANrbB5ZJNr+cxePxSJUt0\nw4Mun4VGH+0KgnJvov/Bl2BnVJRj4u+NpUNffPig4JH4kOaym6UjyH/IqioX\n0fvD17eK/NwJZ7L71sD++lt1FqVOt9HN3xyOEgoMCuJvkCi3jWmT28iMhcoI\nLewS7HbnkYUWIMiNg/Ypc2sk60TX4jwlGJ/1XCRT+nmag27c2Y5oSDRE4//P\nZoVbnS7DbS5D9zEku7fV/IM7cih9Nul/JYq4n6cMnk4J1wdN7WRwoNFoLfOh\nYl+7R2v9gm0eXl5sFHnGZuVfpOBj6mwgbH36BysSrx57Aw1dTEpHrkxBnOEN\nGEl0\r\n=6asq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCat9VUi+qlKkxlIdSKVEiD6nNYKkSn3zRaLfk4lY2CNAIgfEF3Jv53XB96oo0lnwmVHQKZxSbSklmYDTv/Wvk8IlQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-534d5ed.0_1559240352838_0.07862054959176468"},"_hasShrinkwrap":false},"0.2.14-8a2ebe8.0":{"name":"graphql-toolkit","version":"0.2.14-8a2ebe8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8a2ebe8ff724b9c24823bff43e25be18a7fa9357","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-8a2ebe8.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-wsHsYobDKu1o7gQlsHFJ0iB5ILvXgaWvrxhWMMSvfK4ybUVuEvPt1bfPy8IhHRjQ1FGXbOFtWlCiFtTwLBMfqg==","shasum":"29d3d3716fcc6780d5b899819712b6c2968bcfaa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-8a2ebe8.0.tgz","fileCount":263,"unpackedSize":301876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8HQcCRA9TVsSAnZWagAAXLsP/38u2Y0wHE7Ju/aZIzzL\nlOBPx+li2b3ujqqQTpbA7Ith/IPvmschvCLa8QrmUlrhKDcXfKbh+KPAsNN3\np3rdQvt9Yz9Z7tIy8QBxQ/olE/yf9/mh7YzcweChB0EKXlXP2zAWdg8X74yx\nB2MeyZZC3xRG5bFL2sA5iauyKMXsqfu2WrlGpS04qmU0N5LPoUVu2MpSyHtg\nKP/JHxHwOCjBjq/2EQU+/4/1QgBw28LdmjfiOpClsDJvip+83mrusx14J0FL\nb35rPedGfkFdJEaJVIXHbhJQVIhr9Uh2x11CnvjkYaMRG8AUisOwRsWr6Q6X\n0as8M5VgvkmLiCphW1By8TkZJ0coLoJuILfuVi9CoOV5NKAxvtDZa+2tPGWx\ngz5N0ACHvuc4y86/m4w2sto/mK3AZDmQFYny7u7hzVg0Io32pmjTp9As8Xqy\nDh6EbRnSCA5VWxpLkekba/5HUc/csm/ETaqraMu0B6WJVzXNfUE3/2HqOjJu\nK0tgRQZT0B0Dqai+KzGSSueEifkv2wGulL0Epy41ToX3rDFnHUmZS2K7L35z\nMF3NQcf1DXE4kBSubtK96I2SO8SL0hcPsJTwHTSDh0ilCsrytNDYd9U4VnNY\nA7TsUSRZmSodUwR9XTCpOt0iHR7yRhZVjUWWQSIUHsVRM0PlBsGACqymVzm6\nErp8\r\n=b089\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgXPNb1mViHCevfVjLHPueq0/A7qdu0K5ryVDXzRrmBQIhAIfyCs7eO8diL6IJPf2CG+8kkpuKgzt2/wPBENXT6U0s"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-8a2ebe8.0_1559262235663_0.9475506058555858"},"_hasShrinkwrap":false},"0.2.14-fd93541.0":{"name":"graphql-toolkit","version":"0.2.14-fd93541.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fd935419724cadedfac63f1ad7de03e5dcb036d6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-fd93541.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-UcsKuZrDRTgHid/gA6VH8iXx0hrDLd41ahD8mOFlTCAEYi+xlFIa8l7O456E+YHcE5HAZYfvQmJBSogHGxsAFQ==","shasum":"de30acee0617013abe0c1542de5f2d2c16135f0f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-fd93541.0.tgz","fileCount":263,"unpackedSize":302495,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82gfCRA9TVsSAnZWagAA5Z8P/0myDokZ4P+ZsVlxQQ7t\n5yluxr6AiuhEValZ8/0374cozrhK4oeob+uqUahulEUafsBEAaHT5tLLLj8z\nf+4y+aLPeErVwySBDfdbum07fhhs7TPaWwAqDOtAz5o7lK4zzZqY/9hGzpyP\nCFW/SJLjA5e34QnySAs9nM5XQM3DWKlvGMz4R4qbhg5PSpltIMOHJgBrKFYB\nUKyzr1DpwFgaBe2WQBlQ/6bdrNvDMm5Z+ByUafZQ4kT74AQTu2t+CU7/3ZoR\nQdWXuUDthHm9jr6QOeAEEWBckrIHd19Txg1tNtYo1NzaIWP+AxXfBiq3+xkL\nuAOv5k7utwNVFNHFcy/ul8qhhpvNYUl7X4xJ1Rgeqt6Na8ufcTadta88+MuB\nPgf+SRJ6ghFmSfMPBoaLeiZfxOP3rVXgtwRAXDdV8Ym8HggvdWtUhSw2eWrL\nDOylgx6NMVvl3sAdfd4Tyjusi+G0ROH87qcfSf7kuUU4jz1Op7zzIXfJZPXh\nH5PW/r6zLe4TaPwoL63+v65pjhOGdfOsZ8krg9YP0zeR3zt7nbRcsBFG6JNf\nQ1PHxiPThknb3l0Gm+J3/E9a8ywkJc7VA8hAUTMvVgwrMkcMDdqTr2Vd6fvw\nHtaoUMzBq3Tc4jGhy6qy+ygcNk3s/B7ZaZXwivC6v2amuoYZFPtQ4f2axES1\nhvnn\r\n=ZwWr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/qfIYMWhhNN6MPe91e3jcp0qXhTEubpB/aFkRzMhDAQIgE0adBdjabVvju6S2qyDN/kfwZB+L3EzOQLQK6hd6UVU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-fd93541.0_1559455774377_0.29511948407324384"},"_hasShrinkwrap":false},"0.2.14-8125a98.0":{"name":"graphql-toolkit","version":"0.2.14-8125a98.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8125a98f8b38e68813a78807fd050e2ae63184fd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-8125a98.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-SjILO9GL2B+58RmQdMfYlxWaB4Vd+/4yp3JizjWiot1OYHZPbwZdfqNgOgTQRUCiwE7vlD2KgIKCXVuwVGJehw==","shasum":"75c652209368bea5c75891c4059656013562b61d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-8125a98.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82uqCRA9TVsSAnZWagAAX8EQAKTTDr07alb3uH/9pXhN\nAu3EKJ3o9oSB9nWcbwS/mInYQLA44NQenG9a1Cvp6vv+OhsRfnGIlvIkG+r0\nqdvf7nVx/C2/Q8Ay7ShNWZVT92b7uekzQTH9Ddzsl2a8qS6kQ6YlZRy1lZu5\nToNwmdK8L24B1O4ReJ2+aPgARkv87ijxccT2HVPsTfNKqbKTLwpWxHlj3fFF\nn8aCQ+bharHjgz9wE2CkFLgewLvh5j/H3M5hXlunFORwRoIDlO87+hXPxFuY\n6NSVr6u9WnkxloizrP0ouNJw/tCHHZagc7R9/jXQBk6UBZ1LxykHx9/8MiCJ\n7YJkySIkIscT7Wes4akVG61sioi7WE7S24M7IQiK//PwD/q0uKTnZZhJatnz\nPd5clmihYjLH9pXtwOwRYksVC8lwx8jR1tOGx9lIt6ufmctiY/fIn3mvZVRm\nA7+40F/oqSZHGRN1OMQ1Hb0NGqW9jLLzd8rz96P7l64XQe9UikvOrewoBHbR\n/ekCgHWu26R9AEHqmvYWZHTv77iAwZLd1v37rRUsohZoe8X9YbOxuPLA1vNq\nikbh2dBtx2N6UBk+vigpR3wgAX3pO6b9dXq8BDRnrcoU9dFrNGKj+47WtqfD\neOcWceaFu25cMJ7kPAcOVvxhKtnydtcPA9DitxNV4XZ1y8Q5Xl6TPD8yd+qi\nzAjD\r\n=QeLr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAMk2J1vasg3cHoP6Saxjo/QnGHv/NxQ9JCRrdu9IwJwIgbFtmfYEI6Ry7icqAvOaWxSS8WqFfkSmFWdz3xYV41ko="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-8125a98.0_1559456681446_0.08054238681338055"},"_hasShrinkwrap":false},"0.2.14-1bbbe88.0":{"name":"graphql-toolkit","version":"0.2.14-1bbbe88.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.7","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1bbbe885b9b5f1f60e27654e7308c1618fbf93b1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-1bbbe88.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-kL+esccPgyXKNGjQtzT0PI2EMUt2BjTjdJbnj6w2xb5srllyI8UrcdiydDYQ6dk4WRSk5GkvbuK4WtSqA2ONSg==","shasum":"e4bb057b731036943ba0b156a475898dcf3aa645","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-1bbbe88.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82xICRA9TVsSAnZWagAA8bAP/3ud6TrXckYQMmVHje/T\nQ6rsvGCA3UwzKo/lCeGqY0ucnIb6e3NxUnX5O8YuYKv2jDPrcTsJ3j2/+9bu\n92PhJb3Uor/pUg2oO+nrAsG6oi0/mcyzNbBjyVxg5tn/xyhQ1jkfWY1xXhhV\nkl5yvS5pkIY+F3MtlhXLdhKckvaeAZPh8Xtr2W7gaMmMHmMb4zb5cg2YmK1k\n7jD8iqLdqo464llkEWJfs+9iOqg6BkJ64YDv97jVLlzDvJP0ly8grsY16vN0\nEbfrv7gdzaabpeOiXONrZZmvWMWp7tQ4GLWySn4IKu38KlNEugX7Rfr/4arG\nqbI/74kc5XqtFTvFYjDzorQopi6HVXrEbKOwqlN6Iu58QO6MiztB2GcZ7oNt\nW/ka/96qCP9XUSW7ozaHH5kaunMQHX3FXM08HP8lnZAQVBqjS1D0VTuK30EJ\ncWR1cVAh768C8SB7X8AfiIeC/ms1Z6KpyoaUZSf8ypbHh6w2YNr40uCMtD/x\njwywsgAK03hzy4O2j81kyx0rceKZcxb6DVeohXbruj2Is5yzzcaDo76bpNpC\ntGHKT0uB6eEjM54xY/OAvVObbWzBR6cuSBgjrOBtPp7yhmOTUC/MiSTMyPWz\nAZZUl1MDHq8NNBtd9rgthT4em72RFdhPiImHC2yeJatXAeUTAx//hDDdpqsy\n5buI\r\n=Dj6m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAsdjaVy/xqzIWSnWWmmbXBCfoRptMmZ3FaYGw3f8gNSAiA1vLFa4otEkKWOJ9t30x1Rsdq8vxnmULtgbXnGb1YsaQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-1bbbe88.0_1559456839991_0.18007588905020588"},"_hasShrinkwrap":false},"0.2.14-0ae1780.0":{"name":"graphql-toolkit","version":"0.2.14-0ae1780.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.0","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0ae1780678849d138b55ea77f18443251b2587cb","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-0ae1780.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WmgQyli/Lilow2hQ6ZSI3j8efdnKx3XBXxUk/ix5UxS1Dz9fcH1K2lR40nuDB+Z8hI02KkpfLBFBPP35aXDcGQ==","shasum":"1f8132530718a66dcded0a38f18ccb792e41679b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-0ae1780.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82xcCRA9TVsSAnZWagAAuXIQAIAOPr2hA7aAJYr59j/b\n1RjBNtxJXb9oUb+3GnyO7BAEhgiAlhzeWZf58sEek0C0frtY5/l9KB2nPmNT\n/ZxGMe5jM7Lx5uyBF009vgu/aKwmTwYenhNC5bKWhgkRlCNNupUZkqddzuM1\neA4jSe5YbJA7livNIIoF/RNv1jTHnZxG6XqR5sdqwZlYcAdeMR4piypz8Gpx\nQG0urgDvtOwDxQG+NzRqwMkptQEjyX6DQvvkOklonlf5ErhMhXuyCZEwrgch\nU69hjp4lHwqdIKgfLeynn6Npq5RnSkFEW6SpiPC11AnHerzutu/zXLCXN2K+\nXHx14eCSDkEiy60UIRgJNm5cnuuf0GWRdZriiRbwOSzHFtyiiCOSLCD3hniq\ntoGohLPBN6pgtQLRIrhQweCq5cn4/ObrdX7WQEKqFoks5rb+z/nKPBHJtipl\njIjD08EKt629qtY8M2KmiflnPeVwkxC4Pz3NBEEbJ+cJ6fyBtZ365roVlt/0\neN8CSfRKRCAWuHU2TurEADL+oWYiZvlTnWXdfiFMlAPjXnmhcU22dwZJhwuE\n9Kp2QaNFlbVDHWSrHyAOB368qgICoWFK4EWxBUbzAVabOv4ep1yA980Jtt2w\ndQ00ZeXwReeCpvS83VitBEFb6MkzBv7aguxaNjxad6kng4NfL+1BO8CfLGUD\nY4iN\r\n=2/zj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIChVg9DQFvj4Hqu3CJKEOXTDHmwS+2IOwNbtfcoPtwsaAiEA50CvDKChf8skwSSUVLZUD2momEKRL0tgIeBzKYpBc8g="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-0ae1780.0_1559456859275_0.7222943658295049"},"_hasShrinkwrap":false},"0.2.14-64b117f.0":{"name":"graphql-toolkit","version":"0.2.14-64b117f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.4.5"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"64b117f36e0a136053a9e7d9d76d87bc0fb9f08f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-64b117f.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-0wbZzxswvqWEE5MkcOc3V1cQU0wTalKiJJC71pUk5VNhoO9rd8GiDfL9x1Fva/LzvSo7JE+uPW9IVBfp9Y2sxQ==","shasum":"f5c349aa4c17e48d3365459d9208083cee638c8a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-64b117f.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82xtCRA9TVsSAnZWagAAn6wQAIpp7snyMlpGaStNqRqT\nQF0dqnsw9ZoBsvxSi2dpDku9RVky5OOcmOGXFm/Dn+vUFX03yPiD8BKYuTTE\nM8ww1h2842Q2u1HneL1JFH9dj9j7I+Sov8vPFlnC2Oz++cpJWsOZP0DKt6zD\nE1Ei8KpQWAwJvbqOiwHgDWPWjZS0L//SiWUDMjqaNPYrcrNGJT8uN7MJuLSx\npbPdOfpJHhso79nVx+T73O+rg1TdSQhhEMNp4QtL/USPO+/E6e0EH5KdMU/Q\nhLe2VTnvcn65TpDW8kunG8uokt/ytVN6w2mEMepsePYnXwPy6nLHoRB8Su+B\net+/asoj/Wd5givy4rns3twajrchaPvjghhbkJY2fmZLZSg8BSu+HmDLHoUm\nvDXnZMaViZ+e3Ogf9qawxXxax/sonrHzACcsF4xMklIw2mBdzdi5w87GF0b2\nQliar2bu7p2bXoRMLr29iCmiv7FMc6KzZUE/SWP8IX1z71ZM0jdu9yQCoqG+\ndjTy3DeLcSOEyETGTWUvwqP3xw/zJycv1MNn9kIsKrD0Y+yM4JMM/p7IhqCz\nOLIagOBisHzYYbVIjy/dYPisu41GLsjeKKuKA5beibBf94HpIeWA6R32f8u4\nCENUEfk3y7ErxO/mgktSBZ/oMJr3PWFVmicID/qYxyWu2PH2ImQnnmXRw1bO\ni4UY\r\n=Dlvl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdyV06GGQFJEtdYVscD7i5t4VOnNeb/BzcRurRgWF+2QIgCZpNd5mZBMJvwAeJhZLDXE2/beYwnuinmvIqslGl2fw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-64b117f.0_1559456876473_0.4004365781490222"},"_hasShrinkwrap":false},"0.2.14-e268843.0":{"name":"graphql-toolkit","version":"0.2.14-e268843.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e2688437ba73170f5095ff9dffe849bfe940bb62","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-e268843.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-vPCsKyPiSRa7eqowI4E0JRVYIDn5k7YV0JmJbbos66dSrJKQjDfgbRzqiM2apjznYJsAwAgbK2F7oilkmEf7LA==","shasum":"8bf6c188e89ea4e61321e7f147a816310c970f93","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-e268843.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82x7CRA9TVsSAnZWagAAuBMP+gNyhCNWZ+wsfWyDvdy0\nKgce/mTmd+qgNryyLNsgw00aTZdOIe9ZA2HyAtIA7gflICM1C9unJjfTAO1S\nMxJwQZpcUARn5436Yo6ZFbghGgOrTbA6AzcEWIc5cx1PlZ4CwocJQ383NX1E\nWICp/QxHYOOwI60cYrDwCZMZZKQq4clQOuHchnWrO2kno3MOwQ2QTR3fB5UX\nTpzTv1A+PJJM8RNA0eHBzYzVP/NST1Outp5G4Gcabwe/cs1XdzgjVF3Y90/l\n3m/Zqza5/DrDsZGdkDIydtvzqDcCgi0JL1VQ4MzrS3D1wTUUWIq31OBU3nYn\neYzVkYnSb2T678VKPrZsfs61/R2pSlpBYtiEaVxk7K9yeBsP3OSi+5VTtltM\nYF133FCk3TV7nL1L22fb2+32GkAmQmDj7j7KPNs4bK4bb/qjtkE/xrYc9hRu\nMnou7muk5CvtbQqHUwAzplnzhESj/IGMIdBSKwqpfBYU4eX1cSGoZTWt7FIQ\nN9x+954mJcUzNOX2jW/o39bTYxthBLtDJOK+AFlYKKqbFGUxhK2Qm3cwo7KD\nDTK2GffjVXNRsLNGIu5AIUK8/0VPD+s3ordr/K6j6b9RSOpBQ735445P6eVI\n7FsN06U1FhgsEmMYF5jgBzBjVwiAtvHuMEJ+dj2Tkl5JrYwY/8Rvo1tFYHlm\nRU5p\r\n=r/LR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuQR2M1mWaz1SorZMzQyn3Kk6uqt+tOlv48pSNny5cbQIgLn5iJVTqQ68jE8Xi9VBK6Nqff6VP2Rf6BDR07OKwMt8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-e268843.0_1559456891258_0.8546027990387568"},"_hasShrinkwrap":false},"0.2.14-bcf9d7d.0":{"name":"graphql-toolkit","version":"0.2.14-bcf9d7d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"bcf9d7dc93c8eeb1540b20c16163844ff7b84218","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-bcf9d7d.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-CwITz87BHsR0BMZBCu2GS8J0aneDD8PfWFMm0E+4VqLBWWPqubw0ThP6Vlqo9SaTBjl/LJDgJJHPjMVYKsrjnQ==","shasum":"0fa8433b481f79f77595a5b6b538b926c717e8cf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-bcf9d7d.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82yOCRA9TVsSAnZWagAAobYP/jgFgdNXFOBWA6dKVp6I\n6dwVA9YOBgXclEAVqtihStoyH3YFJjBS1dtSRAlZzW5Ukp9Tv7BYIgoa2D76\nWnVMEQOGWlhq6/LDyvYD6KTRhSB07b3H+IiBnWVOyhTqtycDA6jX4n+kg8/G\n4ssk9eoH4XjJGQONnX3O4BySy/I4N3VrV4wyE9qOfV/xxWUsbNX8T8pCS0eg\nWlQG2MOgQsS0uS+594XyzM4H6glAaAQHWUIg7zaWVQQEmH9bSPJZ96+PQeLH\n0mD3BcYAoRPApXCDWv8oBejEy6M/HOfyNn/AET3pYDnoshFlwV8umiWzHAEV\nM6u2Xqj35D/y10651YgBqjhW3EghtXFL2oGERCD8yrqjzvjYILV39eTmlmv4\nR9qwKrI472jcCkaD74qeLfOYOZMJhnjV+y7fR9JhQiW8LXicehCDMuSqMDcp\n/riH7UvJjxW/nsUZDdibDEKhgqfBLdc4djR5HrnVd9F4c+e7VkZ8P6KWTm7U\nZ2ZCP4tnFRc93gslSONGf/D+CXFsGNgyvZU1fRPWY171WZS3uhOxRoh2G7bH\npsb/8IKt7noaj2sjb6nFN6YjJSjmxMCkWmOcCqqqWq/Gc+Hmb15V8YHE1Gab\nbgYBGvoD710QGRZ44vYqStTJTqbjvMxP8YLbv2AoknQmRX4p9M/oktOk00nj\nGtMu\r\n=nNc/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDv4KR4joeh+mOcCknGQ087bJ0Tt2R113mejwmWigCP9AIhAJPF8Z0eG6bSNX/O+CljiSVUmC0h3+IhwW9ilvPGO9lh"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-bcf9d7d.0_1559456909385_0.1132955143258576"},"_hasShrinkwrap":false},"0.2.14-8b48d37.0":{"name":"graphql-toolkit","version":"0.2.14-8b48d37.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8b48d37a6ca22f26424db3caf5425e1210a3c1d6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-8b48d37.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-rodqc3b/+aTVXIZOX/2OrW+97Md443haRvRcHrRHQa2nMN+dZ/UMQjqedbaKZiFl6Pmy/MGoIF0SNsl58MOjfQ==","shasum":"fece6e6b5bf3b877a65fffd25dee8dc898058add","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-8b48d37.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82yXCRA9TVsSAnZWagAAyDMQAJ6jYM5FF0B9WiPym1+E\n+K3NIH4A+WA/DgWRfOLnWQaUTT3Vmz5zTDMO70mxDrBBIZ2/w3kI9vxdRt5H\nctHVUmKL1NhDsi/1+Ej8O8iQK1n2GWI3dTD4DmiWGu8Aok0uot2ZKVBLeZgu\nAJh/TS9n0U2NMR9W0tCv96/n/wzT+VGUIK93GIZ/edrP3A9YuDMBflNqew9N\niK1rkoxkZDTQlkyL92SXmsCFwkDw9LGvhboLNAdfESxISvfGsL0WSFlpNxQz\nLM5Y3ARmk98DYvgLY8EEPObLf3SDTYY6R5UONMStnVrgzty/eOpMwfdaKbGY\nFPN+1K3Un7zU4Gds4Uyv5LtsfIWWxefpRGnjzZReF6IX4riAv3Wu1VOipage\n6LVCQBLX9WE4giPp9w4t1RYat5pvCnW3i3J8s/P1XHQqcLH5BtIWhX6JJ+7p\no7jp2SzV1t/CcAjls2PrMjW/XHAg6hVkL7aA/FR1M1/2T/l9AnqjCz3N6cc/\nq4am7tS0vRApoPGKpR6cavuSREKA/MuDDcWqxQJvr6XyWn41MS6ROxwNFciz\nLk/XocwyDT5KNCiNG01L1gmivI7InjquPw2yTnchB4fuwHKMW9yPAmk8bJDK\nxaY1seOdSmrj+c+XFRv9YTkz+0JI9jTl2+RVZ08aVyK7aCWE/T4UoDMm8ZAt\nnu8B\r\n=qPDQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJj7ysbCRimzrxKxn7TDLiGwp9SR3zdoOxxzs/rOjmLAiEAhc0CN79uHrZAZGdbaOtjTOCDyKVvqB98UNlHQEcZb+Q="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-8b48d37.0_1559456918705_0.6480688971403075"},"_hasShrinkwrap":false},"0.2.14":{"name":"graphql-toolkit","version":"0.2.14","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"30b6fa933c62c33b576da9cb3d53e86a6c1c356f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-KcXyBqNDiaj+/5H7r+f9T9gBlWmaen4Ya1S+Tnj5u7bJdVhActOtoPz5RMsGpMI+Knnbi3Glm9WhkpHPt/8SEg==","shasum":"6fc8736ca1ea9e2050a3e5ca116dc8c090c1c8aa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14.tgz","fileCount":263,"unpackedSize":305557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82ykCRA9TVsSAnZWagAAHb8QAJqF05hZJOIfhZ5L6h3+\nI0YlHQtzummydANglaTgSV1//I4eEWTeQj6uwpGcvUF3XGoMS6xfifHRteoa\nOKQVuETL1HsHZXb6XFnxsPftK6uGyvrJk1M2c9vPaF3fjdfrN5Jb6VAiMJvy\ngcHc8SrBc27NsDAVvo4hy88j41IM0nt+Exr/Tn2h91yM1gW/+PLw7lCwY331\n/hXRCFwNZP5lG1WLOkU6Z+jlvsnYRkfsl0aJI38HIBejN7Y/+BSgPddA9uDy\n/kRCpIclBb6X0lwR4TMk5zJsy9wWD9PK5JO2SEoKIm9cYyuWpigIBb8jmnD4\nmwxeP+fROZoxHtispucsliXqJ2MObwMGuDWN3ECSselpXJBAWMfCY9j8vB6j\n6Sh+sUvENyMe3cEHD2CrzbsRJXiKg5Li38hyyEu5w1kEod0qi3iGC9+a9H8c\nFPTgdvDRduKT2DIPK1/KBXgYlJSdMmqetgGi2krwbWedUPz3ZCXEbxEd7co9\nJJ8y1KoRuhnZUQk+KqMbNXAkHECl0zy1eKEJDTGNR0NeQwwUi8Wameg1KySd\nqWITC9+Bx9/bxvou7asJG5yoQ8K9/+1gvJozsN++b2uft+sObZRqKAoAzRFR\nYsdQ09Pu8aeA8dCmyz2rtRxYIiloERWz06TfYuQ0sjyATnG5QnxE/dZ42fCw\nAH0e\r\n=yW9x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAfCo2vm8LX1Zg69Ww8lkr99il/bE4KPdx0G+Q5Go1uaAiAgYrcx+fZznBBDQpIwBKxMM81zZWi8YtBTttBZ0y6bSQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14_1559456931880_0.733344792635604"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.2.14-15a8882.0":{"name":"graphql-toolkit","version":"0.2.14-15a8882.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"15a888228e1cc068feec9f53e4179ae2b4a64e3e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.14-15a8882.0","_nodeVersion":"12.2.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-q/Q8cwPSF+lQfMEKyOe8M+4oKezd6jVKxAUS5m37lQm0Xpkw5wioGQz5ZU+3f1pJx4BQsXFQiBPV4CXVbLw0eg==","shasum":"2490d54a5b6883457b2dea2a00141497b04b1c1e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.14-15a8882.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82y9CRA9TVsSAnZWagAArZwP+wao0cnmKnX53Vfjcund\nE1C0OgUeTjYEOjCuGDml31KlpnDvpWEN6vUl6xhmJQ40Trg3oUOY68I+VxDl\nzDpCdkJbZHruoeU44Ebsg+5tPwqM1lf/MuS13zxZAUNbFrKY1VuWOsprnHjY\nM3myaHGYDiBUK6U6HZO4TjuUlqw+1hOTGb39coPDAOu8Mlys1byw3WEnZfBF\n/b/XJjXKJsXPZdku90pOJiKNjHkCIP9Vc6vSxBQcU8LBUXKCs32zJaWW/jWV\nWnWRcAoYtQIAsMUiEwcSfNEATJCV7c1cwJunWW8Ct2xw017JbI/2UeRmgqBg\nSZXCogsZHzdXPYmSkDIDKfZo90oWC09NKUBUeRUe7F64Z9o66hwj/97uwbRq\nPDgOP2Db1YNHw0zoF+vv8XgKBjSStR9fw+vmAYnAIOm2LG3v/Q9mYl5mWTyD\n5/laLM1/c1ZjMhkFts+j96yhUri+mgzu29Bo8Y/1ktrKOqfN1JbSLiHMurw+\n/Zm0QZupJUrU1Wf++6R70QE/QPDdKva5I7Km/TOmt+jhv0hbM65cT9GKID8i\n9O/rWoui3obqilB7SWf9MtVeG1Xv9ZEmw9TXuRGT/r+uLK7l6nmj1j3R6u6L\noYdMLnFkX44TfKY7dq9fXbLLrWk7xGWiGrUBr8mSA9sBiIJirmwGxrqHmoDJ\nUgVa\r\n=MCqb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbwS6DHY9UkOVXo7fPBooAAKzJ0D9mP8Mgcao2RXmtnAiBBZbfTVzzEoxSt4tqMSdITTM6PedsiaMfb9Tl/jehjRQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.14-15a8882.0_1559456957336_0.5328374376453802"},"_hasShrinkwrap":false},"0.2.15-30b6fa9.0":{"name":"graphql-toolkit","version":"0.2.15-30b6fa9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"30b6fa933c62c33b576da9cb3d53e86a6c1c356f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-30b6fa9.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-dvpmLIoS5ECvs826uQ/zdZWUlaeS6/oK0e/K6SqZaFBm6iO3maZsD4osvthEeFdXSMAiyUW7xSJLixl2c98nhw==","shasum":"10d0c9efa399770e1847f6da9ec36fa8f3c47ecb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-30b6fa9.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc82zQCRA9TVsSAnZWagAAq/MP/0qv+nB9N5gTT0JjvyYw\npDIBf/5DufOEA4HBe544SgohI5FPE/GSBIk+Q67IF1EN325DbxOqXANZaJr3\n5pJpCc1yvwqE/MMb7McLb8q79TMieeRlunDmHYgNCkUCiokADa7EZ6LUAA34\nRESkp58W8YRjVkvVSDnZQejOQ9/JVeHckblr9A9NzzeIZ/50Yy7ERtuIy8P5\nyyC3XvAyBZ5G7cAFu1fFed3R84tpGK4l+6YDJnPwwQokp5pmHanWpFq1l0lY\nlM0XvkxyeX/W+dNJzItlGb1NQQHvjYzcixqYWGkY3ltrexmWMsVLKH+q49ry\ntm1NSB/n5X7pK0BWDMWvRsZmXzQHAess8M3QNyQxsV+0GjUXL/uYfgl/xGEw\ngby98jG9Z0Yoag4+cjKgQh0f8mgxMXu7JOsybGi1kvClV58Z9Btdwp0sGEkr\nguN0VuGdUKiiECuhzsg3Y9g1VSlP1ZCEp+ukPElz/BsmM8ue6CvVhGg/7My9\nIN+5Q63Tojp/kfsdEhlP0MJC2CBgx/qmpUsHHH4OWshGQaCe5POfuzKCaMi2\nWpIV+VJVdN8D10JPRvR3p9dKozKLZkqbLTmR2WkyIIyMeb1ebUUu+f0P4laX\nSNF28JgW+IKrAn3nhP8W6ML4/67N1VfKegLG7ttlw/8dZMbDd0lK1z3E3CQy\n+5zI\r\n=MFkT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTpm623VN4N1pXim0ALkG5NOzQCETGBUoTMVma7bF9ngIhALhXseSQmv11CzIP4CQj99nkanouhqJmvTVixNi2gw2I"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-30b6fa9.0_1559456975702_0.29879061393139694"},"_hasShrinkwrap":false},"0.2.15-0b1173c.0":{"name":"graphql-toolkit","version":"0.2.15-0b1173c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0b1173c9c332e66bbf80643cb513809750a15a34","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-0b1173c.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-UPlEC18icmJX3lqB6PilY2oYdND03q1BcABvLkzpJx/GMBdRUane4NQZgX9rOVwWjN8MvImvv8HL1PPv2O/mzw==","shasum":"3a7ca8d4780c1686cd8058672471e93d1509090b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-0b1173c.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc9xHCCRA9TVsSAnZWagAAmkoP/Airlwmvr53lrPFmftff\nXv4A/qw1BkRv+py9hx1i7W2d/yT7qsjqkIOC8fV0cJUsVeWXGdUgKQ1dKSYI\n5uWBgtJFpO1OTwrQJ3sbJD5mWD4XEVmurk2pPaX7e40t4akaTyHxuUf+603D\ngN9z2gyASnqnUY0zSOQ3Ujp3dkA4UZPL+aUqgrBmfqoPKpEKgz7j/tI/XdbC\nWAPR0Qd68N7gXBOzn4b6sWx5i7xAiBnKCG3ExPbUADwU84AJHq7gyTQI6yrF\n8+NYHDeoPnpBWaVEMQ9T7TtK4y0Ish6sfRBzlNJNUm4Ob46mYyd31Ak2cDlx\nNx/8gBPRpBSIPVONZzE4ykJJxuvDfsudWg6a23t1fmKgCOlSmHbn/+/t0o6K\nXH4Mb2YT6NeChbcYFMNWBVrffZU2kglkp9X+n9NIcMcRH939LdtN6KBuN+Tx\nFUMA786Lql6OM+pYqwwtJfc1zk6SzYl9CttMpXrTcuLKwnwrERAfZ1VZNvYr\nQ8jV/8oMK8jtIkxy8ieKyEUPIGnuwM0jobccN9O26HmVgp6ZOvX27FjU6n0S\nYpTM4NLO/i6iU1m2UgXU4yPUOuKh/KN3iWL9oACF5U3gcHFcGsDQJj0Xq/Up\n88BhoxRw1JD4MM/4HQpVP0H2IvUFc84fGLwEJsrNDcrN2AV1PktjlaH3F9t1\nkoeD\r\n=swG9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHj33V816lrKbLNCu101FXLgUfl/au2JqeFXiBiYEHYWAiAxWivR101gY40qfLveDb6/PGRws9GAGdAr2mgWG+IrKw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-0b1173c.0_1559695808398_0.6267077727151291"},"_hasShrinkwrap":false},"0.2.15-0f19f83.0":{"name":"graphql-toolkit","version":"0.2.15-0f19f83.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.130","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0f19f83037345b762ad0deb67014bf50b040a6c5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-0f19f83.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Xvjjxav6qTngy9qswHMxyQ/YDQRsY3NcnCS9mE2U/sPtV+USQOyqJOBfewUy2CehIDsSGaZgOV+E/wIRCY/0AQ==","shasum":"0305eee003b7da3b3e31888ed830aea974790cb4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-0f19f83.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+MAwCRA9TVsSAnZWagAAs9oQAIiEhSbjzY8AW5iGukau\nM5vhf03+9ygtuZd+ys6WWXrnUTiBdcyhehwOObXVc5JbzpLgIrdlc0cQ2vzf\nVX8jDtMri6wQlKuPaC1mgKHIUf0gNxcYObiHShemk4USBisqvjEeHdn+kHwh\nIeMUpud8qGDD0zaQmbPvTvQu30YJfjH46AUdtTSMCsFmPhSZfJrFYE20hGG4\n+hnyVqLI7cKSox+MBGj5OxfbjORUkS9EcIEdJOTFkdLv2u407xrzyyXFAeRa\nR7ZMNnnBWP2OFwRuYRwwJ8f4Zw6nbFn73RXc55Gi8koniaI/qGFiB0X5M8t3\nQLKMquwANnjxCZmhdTttCWRQ5H1GfjKXITn1dNkwzRG0uXlT1ohBE9qQte/U\nfX36jtp/wx11JcjDHn30LEj5WAPJam/UYCx6wKS4VRn3m7sHnH75jUN5zKXG\nRDU99HfNndJzNHXGVRA6kc9fng+mZvhooM73YHZI3WXcxibqm/j7q7i6Zdnn\nT8p8af/VTCaSlIvl0ca/EV+VnzWV7uCdv68vx6xh0hjFHfLbeG3LmFloLqMQ\n9sADv0SJZ/khRr1x2YxbhhDwpvRTzxi+ng4UFiimna9VSLRzJH3urj6HYDbK\n1da0mibPWSU+p9GKfRvWPQAAmbNh1yhttBirPuNNh2GaHv2oaCw1qIXo+ajm\ncyU9\r\n=+rKZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWketcjOqgcjq/GT5GSCbZr/W/2V/vLArZhmWtdHZLUAiEArUKy8ZJYDwp7TUgwSgctwaEYGT022fEFhT8IR8GrF34="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-0f19f83.0_1559805999474_0.4737193511347626"},"_hasShrinkwrap":false},"0.2.15-4619192.0":{"name":"graphql-toolkit","version":"0.2.15-4619192.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4619192ce4863067142cf15027dcc7dea777f30f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-4619192.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-7QLrfMbNuirbHMRes/oAMfV/u8rHHcMqHjVC0sVPbge5T2CrrhwG/VhsiX3qyZ/+CrL3zVZLgYXA/EKaVkknxg==","shasum":"991cc9e30de435ed925145c86b7570a4def64c95","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-4619192.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+MBDCRA9TVsSAnZWagAAyokQAJh1T79kLMJ1kLgz1f/X\nQtmmq7zWDr3CemV4IAvsq/YUV1YDrGKFhIsT9JypcXPunInF9zI7lwoEhpEu\nym7qyw0F3nnac4M/LNaso6g84P9/dzHVavLSbcCCy631hU0tM06zWn087Ytq\nfqxcVFxPvLdzruqa39fLEC38R7FSj3uGFbVikj2W5kN1ZCOAVFAcPhSwBnJZ\nCxrcBMRkLfIyxpMu7+Yk43AHSP34GpaL1nRUQPezE2KoxSgtHDxtqln2tY+T\n5lsikuVQxdvoZ4RzWxxKX/C/FPEwOybMLSd962I5OXVS5wnwN+3udD0xHK28\nAIosHdhLOzx5Tim7WtyssISCMTjKB6uR3Iv0/WaWNfrlgWH84zyCPzMQZ8aJ\nZCp2E8T2j5apEUkVCX4siE0peV8cTjKjgh+PoCe0ohEZoDBGRIXgL7eASqhT\ntvT2gdusngXPFaVX2Q41+5/UsmhtGPOmufdH3l+V0hPoEMVfmWST3tkuWx86\n5bZoB8uJB4PiIer8ST43/NHsDOYRg1sf4gU0wmo9YrT4JquGytaUk6BcIFU+\n8g65sC35S1iX+4ERRO8kcSgNhBSul93SC+bGJsnRh2MyGugLTzwAa2PGJCvr\noZd95FFPkENWSNLdCilaHOi7uMf0qn0W8exa+H1uxsQL0n8P2KAHcpfQNBcV\n5UsL\r\n=ctdQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBnSQ74B2jcHV++u7a/BoPLi+tIE/XN70dZR+ZTsYRZjAiBwzs1mtBMyrxyur/UHWIe9XYNVzqT6hkkr8htmFZ/wFw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-4619192.0_1559806019328_0.5754395435170974"},"_hasShrinkwrap":false},"0.2.15-c371b07.0":{"name":"graphql-toolkit","version":"0.2.15-c371b07.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.134","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c371b070f76ffbb051ce42e38356eaf97987ba32","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-c371b07.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ARF004ZsuOOdoM2ksUmpJfXSdfAb3sDaAxgScedf3PviO8wnqiQBTcrCHqmDzfQW8SF+MjkwR2CGFAnexYhaRw==","shasum":"09bffdb6cb419899cc21e03217cc78ed5a87f741","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-c371b07.0.tgz","fileCount":263,"unpackedSize":305566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+WwsCRA9TVsSAnZWagAA7RoP/3PSVL8ouU1I+SUSdh2q\nQ8APoxm6lHJ9XUSwZigZlwanHkqLX7hARO7Et7XrIOcdK469SCaOKfAIfmmr\nleFDvtGzXx6jFSMrXkUqwjeRGJN5HuJWHjRU4LgE/Byg5rPCeL63TmD96CsF\nR1C1la1DiArofcECG5GvnoZjISnmJLTYyqIVuo+IZxXJZAn8tksK5tQkgOL0\nES0ssIiYoRybb0upWDqlGoLrnaDVAuqHfz6JCBOJ3oGBUhubmZ3n+6SoY+Kc\nri/aWOvS72bKXeEU7EKzP8WThpwa3QgtCugNOn33olx16DB7AdJ6UddDXNSz\nKcKQJBVec0/ZLiulYk2UEq9GqsiXnfrdvkGW8x7F6lLpCkg9b6GRiDLHq3b4\nh5P4o38B1W53tE7NXOxIvujLFI2ife1rhdmkzWvu18JTeQuMwfDN707bjXnd\nfOWGuIuCD2J8tHghWWIwP2HIAm9/GD66biDq+3ta1Qv9zP75Tj+I5xGS3WCH\nBBaQgC53k60DbgGHAVRB+W99PZQQpMaQg13f3BdvL9m+QQmG4SNo0s1NlLtB\n5kCXYq3FaXEFUI80FktPzgdJ9/FYbXmMO18Yg6kgkYAa6a9CNU+8/pd82hs9\nzIFj22FZsTM5kMYvWWMf6IoVXOMBZEWg5czG5LFZyiE+h6FKvRSaNGHI+p5l\nFMez\r\n=vAli\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5pIf74eUDtBsibRRr9Gfka2Lhbe2JP1EQrmxYV7ru6AiB6hbFeB/B9U4MiY7somgLPTOoShNDpdYdPVZuw8Shs8w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-c371b07.0_1559850026483_0.0007866069465245484"},"_hasShrinkwrap":false},"0.2.15-c8eed28.0":{"name":"graphql-toolkit","version":"0.2.15-c8eed28.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c8eed28adafa9894bffec6d2bcd4c9a8f25bb5fd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-c8eed28.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ZqjRnlJUpp9FZChLI0PaatPUJZY+aotbChE/qXHJUFosF4RzroxzBKe8eGyDb4LdWRSQJTUNFUcBa3mo0BiVGg==","shasum":"afe4381059277872b8d7b9a11db92636349abb17","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-c8eed28.0.tgz","fileCount":263,"unpackedSize":306566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+lryCRA9TVsSAnZWagAATaUP/jgLKkUxSWECNPfcY6pJ\n8EUjCo7lwZurDtt+gcS2uBUtjrv6rP8fWf1Q3/jIw7H+8LXvnQk6aIzghrXz\nRzyi2C2+VEPh6yORmhZIU8rJ3EBMpATD+NU1GyHmpMxi/DSbJxg64JXIZAXC\nOyg1myfsWxhEq66En2KYTC/BbPte7KQDHqx/l2Jhcvz9XG+GxURUvSWt6wfa\n+KxCSmpWo5yOkPs40pcBRsA5IbK6X1aIkjSmdnA2e4l4M5aXf5pCOmN3aFrU\nQmwZHH+isrHCO0gA9fGXUnSYJX+SmalrIVJpT+dAeQesgwjaTKgOfVU90u/1\nt1clS+tm1+QfT3HpfGcLfAq29eqZnMgcRr/OPiyanXND5OMRWZ5c3meT05ay\nM17smVKuxSfwPd81YvqFVELLnhHoE6D2K5yaHaYZvmszhT3fMUxFW74mL2hC\no3USeOiyTFy8XmnaCwJZz88NRrTFvEmeepJ493I4eyCYOrghEh1brxr7YG6l\nEL+HOU7LEjKQeF3/78JO2I4xeWn3QMVJKR7bmgXBzfs7zZc/rUHYtoGXfrTl\n3s37OLd9WUjWlXkmRrZBTFqmBwJVutWfDJYzpeNaRxN1V5Z1CvFexXFwZQL8\njqbQD4VT+yluIoiDMGEkzjGQm0TDJr4JqnSaS9AOohCzClqF5MNsyzUVCUIa\na+9t\r\n=vMZx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtJih8LzsIIAcgMJlK9MtceaNS/47qxsEDAHWEZ97+tAiEA3Y1CpYFyxN5TyeA5J9Pxjthpu7TKFonCirWCWRdLshE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-c8eed28.0_1559911153813_0.9148542064177145"},"_hasShrinkwrap":false},"0.2.15-f4d6afb.0":{"name":"graphql-toolkit","version":"0.2.15-f4d6afb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f4d6afb862805a1cf9f7558c4cf60bb78d9510cd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-f4d6afb.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-PJOS79q5+TQN/vqA1S74m5sUGBI6jODd6lOyr5X10VQBK0meYiJnLd4UQlguaKEuFrebdbOEQp1qTzHF+owISQ==","shasum":"06fa3b10697dcf6ea98fa510e56b7d4607e0ac97","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-f4d6afb.0.tgz","fileCount":263,"unpackedSize":307112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+lueCRA9TVsSAnZWagAAwHMP/iPxo0Lwea6I64Zm21/+\nKjCGKof/O3AdX8jHk+ElKQfTcWBuimH0czp3+l4E2Fno3g9lx8G//yNgSp9P\nlwC61XwcmjRN0CZSZbbSkhdx5Ugkd7g0O38Wd5KVdhNwEz8cmGLiXMetakV3\nq4elIDbfkZ7OIPL2cQw5YerJF+yMYT4gZ1LwQS1qEpsw0nSaJCzP/l9Bt5U8\nIyWNlhgTwLC4KdHLvt6ZuolOW46YeVLugW1Y0nTnUgCpkk/GNw/uXQOMk/6Y\nEi9nBm6A+r0OobgejzAE/da9gu6XJ5jAk5gSqyNFFEahCjf+b/Oj1xuF5Lks\nnCm0D+GII13/25M9jDJKAM0TEAkT/3USKJLCRAtSxaqwC9xG/sNKUWWp90eP\nc8ATfNTV4d0+FjUF/hv2LnlDOV/1m/F9ZBSM6qJOSv9TfzLTEO78j9ljzxT/\nWMbWpwU0/tGk7gLy5l1TQYrXnGCHDjw6M9Ymhqcy7yYJfN8ayPc+pSb6xhS/\nfd5sOcl/IK6WrMUMUwpTvAQRElctazT6bGNRo7kUTMV39Nqn8u/+Cz8N/3U5\nu4lLgPwwl33tW2rjNw2oDFmmxtmy2XGinI4NmsnyuJYfC0TdyHBUYi/AjchJ\nHewK2GE/QqOy0549AbowJT9ras2tf1l+4BLJ4J6uJcL0pgYDhp2Zq7slnMQw\nr/CI\r\n=p47A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGm6tPJ5sb8DXYhOXalg8KAoWJ/sRMnWEjODdSj7QXmgIhAMgrhAtBaXoXZHk4LPimLvS9d0DmfC8lDqYvrxG7OxDV"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-f4d6afb.0_1559911326014_0.6570531468670389"},"_hasShrinkwrap":false},"0.2.15-b152200.0":{"name":"graphql-toolkit","version":"0.2.15-b152200.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b15220029a6e59cc6345116f8a37f1f0f3aa5af4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-b152200.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-lYwczftlvHFS5kdlcpTNMYsuObq8qr90zvwMBHIwMY9JfJ6jjNbsw9J8yedVcj2i/nj50heD8bHSLUbBI76eSA==","shasum":"4c06f6d54e13812f0128a2544254f60403a290a1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-b152200.0.tgz","fileCount":263,"unpackedSize":306384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/26sCRA9TVsSAnZWagAA6RAQAJYhkzHcWc49AD/HnXzE\nrYJWKYB2yjwg0FYmN5MIadd6Ec6jSuL+8G7PhNGzH3iPMzA3OKxV5LJXOJf/\nnquVQhvzas74Lle+yHacMFRs3zUacVO3McaEbXgOXX79YMDxGI7Wz1DeN1DE\nCMOcNJRUe5ZnBI876/ylKofChKo0Q+myI9r+ISp33M6IUYKgs/1SLYPnTJyC\ngCyayUdV2efd3ALOAUsvrwUzGldf9Vj2j/Q6q0Uv1x61bf73ppLYv2Oxac8P\ny/V4rexKlVgxZQq6LUM4QUaihxhMpZFASUQu/SE27zegTKWVahy1YFfvOPhI\nh7Tco2bl6XWrF5BZ3z1vQrRubuzJ+oT8bu0I4ol3Ejl7LkoSUkk7nYiM89gL\nXJ8ehjU6RKIAPFKcPD7gE9j1J739TGDHEFTQb4f5CPcmeQKXXsT4LRNG72ZQ\noFDvoaZFdWMqAgWlVr86YUE22368FIF+iMEjG3AY/VJlMhod9hE4gcwU/WD4\n8FuDrqwlEiNyjfNM0W8AoIAZyOpO1inVSa+ghETtPQ+oYdXHLIIAZI4afKER\ntIEpSc22bPDNxvZMZp+79FE+U9ShT8UZnGBvSt7JEPqjLriCFeo2ye0q2+WR\n9kzy48sosGAZSk4i3FJ9q7yyYXnrMkJryRfCmV35vgqnA//Zlnc3u0eoLONa\nNlTR\r\n=1KJt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgY7OTEX6t0XsqKfdcMf7CSXjjkKtjaAZaYH/SeEBVfQIhAKyB3P5JflOWgMcngq9Nc7E2sCR0HwBS+84/xkNCjtaM"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-b152200.0_1560243884143_0.2711614876744124"},"_hasShrinkwrap":false},"0.2.15-1b68d9d.0":{"name":"graphql-toolkit","version":"0.2.15-1b68d9d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1b68d9d2da4514ad81ef2e9cccfb0e996e01dc54","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-1b68d9d.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-VnF4dEadN4TNdO9BTDd/THdtaottdW1AYUDW5533+rBbONv9w9FDDaZojFLl7Y6vSBiUwyUEN3a1RWBNug81Hg==","shasum":"1cfded32a88d8a67d3e1f0e38007c343dcd9ba55","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-1b68d9d.0.tgz","fileCount":263,"unpackedSize":306384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc/28oCRA9TVsSAnZWagAA4zUP/3qt9P1xcOi8c0NSS9w6\ni/vDvZcsSe0pYszBjBgYW0e2UsdUIaGlcZxI7sHpPOdwRrX6UEMnBE53B9pV\n1bBwVxjs7vW7L3zeriCa8xRsnxbvOqlfsOYjkodL+JsT2Lk8GKNkXEnw1oyC\n/E+jA6WwyJFlnH5gb8Gu0yVlQj2xNaFdqSGoVZRPvhz1hDewRw4VyI/LOR7G\n4mB6LXNiCZzvHmK4OrosPyFLFVP72vMy7DKfj3oAmi+qLIqguKa73BjgDM7N\nct30r+b6NIDviz+YFIoLx0DEd9A0bC3vBO0rnANiWubEpUO1l4ktoJ/79u+4\nR2yjQkzEmX9lZR7P06bOTg0UqkL/2Pm7YgpvS5Yl90a5iL6UzaNcRjdmtvwJ\nDy/3WrPJyphqwFRWunIQvAS95Fxg3vC0LvWGnyNPvXq4G1Vim9TGSqMg8bJa\naTQDfhMcgQVl/L68HiiHzB1EWBLlwUIa2xUAcdnYa98CEtyzV9Lh0QHiMZpy\nMEdc1QFobyClPSn9zGGchrap81QAQGIgVzI96IhSw20X9YlNT7Kc63MH0wQg\nw5iYjNeDIhnoBJXxIT0XEM+FmNi0kZysnPyxqwKT6yNhFxmsixAPUAcNE4xh\nT54QzupiP4FabNo4weRbs3yE9dvvqRP9jv4nsOfWTKugZIdsSYTqcnY3zWFS\nKP06\r\n=VzQ5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTc/hQBwEuOgxjmQI/Ixjs6PtJ+mlVpXgywBCFDazuSQIgekrNhfo6ChfUW4pF5hZ0NC6oIV0sY4iizZ2zBaj938g="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-1b68d9d.0_1560244007912_0.40564610906214504"},"_hasShrinkwrap":false},"0.2.15-98dcefe.0":{"name":"graphql-toolkit","version":"0.2.15-98dcefe.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"98dcefe2e7fda8e8c8eda281589e056d765d4a75","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-98dcefe.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-n3TOWd52KuvupLtwKs5cqZIV9xdZ3f9HAQ2jNjWkwdsynxKQ+Mb7tN42JZ6DalSkyOLAlLtQxGOmbJ8ws7VK2A==","shasum":"86a72522e1a7c79a0deb6a9d00abbdbca672882d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-98dcefe.0.tgz","fileCount":263,"unpackedSize":306384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAACiCRA9TVsSAnZWagAAWZAQAISLRs1l7bwjhs8IKOcC\n8GY1v9HRaTcxtvGvfX9pgiWzipR64fEdGFjHdxNT0mL8CU1+kOlHnX480hfP\n62K2bNJRmOB7x/F2eV7hAfAKAHs850qc0oGom0jK4jOftO2+CTgJAdX5rKsl\ngYuWMUJSAREqXMyRfnQaHGFT07SEjcznB0eemqn8RrYBnTdIb6lJiV0mnVTR\njKZxokDojp/c9xnr1JmULnQRTRcBzhxxo400WJXKVTPDB7puZtxJP34DiyRX\nzGdsEUVDQlz4rOajTI1vnTGgX7gWbOx57w9kqAQIaPv2lTG+No7KRhXWnPOd\nDoImAAA+tnbxZV8UFQpGWlO6JnbaqT+ssuegUxAVxuvZhjkaC0tIZ0eeX8Yf\nvDjm24vPTEsat6nvydPiNXoO4vCeYrBIy5jPCTroMWWqdFPw4ceqxzTzyd8C\ndCaSvkCCee7OrSA0c0WuE36nzEUMcMCgKSNSk2sbu20wxYH834BLBc4b30uH\n2DPw+IDO20cnSVx4A2edhzotjRx0wPdXRKpbqxXNM+7pCjlSYh3hSjg/+YpF\n2AgzY8p12R4Rj1DcCKsnczhIRntEefpSvyKmowH2AP7+TZARM297QvuKbPb1\nQ9/fZoY5b6L/aqIkPYq2FYn18MyjHQ7v+owBlf4f7TU2mf3bftHYdpEqb3og\ntVZO\r\n=8DEB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQU3CNFuVPIvyYxZSHwRAoaA5rRMs6/zICwYtNCXgUZwIgQhTjb/4FCuDhGYd2TpRdnjaHWXMsqYCq7eDMuT4WunA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-98dcefe.0_1560281250062_0.7007548369685983"},"_hasShrinkwrap":false},"0.2.15-cac53bf.0":{"name":"graphql-toolkit","version":"0.2.15-cac53bf.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"cac53bfb91b0fbdbed663cf860ba81ad060140eb","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-cac53bf.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ppa2oJnwxBj7qosbnE8KUsA4UhY//ArG9spfUH8ye4FPRGc/XQNV6VWFFxWdRRuag+bP14t2U3ijjSzQdG7lNg==","shasum":"266774bb254d14e4aefd737fc0412b42a314086e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-cac53bf.0.tgz","fileCount":263,"unpackedSize":306384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAe4WCRA9TVsSAnZWagAAvZIP/2zGIBaBRSpDnOoKU6Dn\nDcy9A8kpbfjExOlk89j540enMFyTLRiWGD5yB5zhf1o8F9vsxpumGI9CnsfI\n68LNYRrJ6rNBcqijtzb3a46kLwVelpm/yObwXna/otrwHhJiFv3cZ0l5eTDd\nA4NGns11fNMqxxEmTGyaMgJDNQ8ksd+bT8PWNphSY33A4EVK3ZGmqSiXInmh\n/+PczOTZ9JGixHABxQAjybDYe92g94diJ4mY+EPkO1q9SSxrNzTJ/O9QERG3\nv7ZSgTgIm0EcpUOT4sDYRuc9LNjc2NZ0IUlkYlasEaN7SWLCziyeZ8CUvQ3x\nhgsHUpLrKsLK0fBgECAHppZFTD35DU5tY1mbKHpXG1PABmlMXQ7rLD2Cxamc\nItSq9lYmvSKlcgV5ZdJGI3q11v7LETqrdlrGvG28L8dTaCVOVGjoi3j8zHWJ\nMnx1qNCZTOTqKh4tl3LdlJEBSQa4zK3UX0ccfa/DgMpKvH5s78zXXKhlxwmP\ny51A1DOOph1j+K0weCJH6Y8ywrru2LO/I+yQPKGNGw1V0z5g6uJYNho0HyBw\no14BmRC+zNjIdzJTX4Wn8hsR6oQxZAuTw4i+s3rQYCKY3jRvKHP6G/SLu9g5\n9V8iB2s+Kms6GwmzWmYw4ewMa5I8usQvsWE4rkEM3SIwFZxYJXBsnT4S9ehl\nvWWZ\r\n=p9bZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBeOSoeTY9ip84Xh8aopHPLmAw+03zfBivszAN60xp8hAiEA8DTqTJ7VZGqeIwjTkZyDXl+VTV5qvYZKMeNXs4Kwzpg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-cac53bf.0_1560407574167_0.9576774051921004"},"_hasShrinkwrap":false},"0.2.15-06e06af.0":{"name":"graphql-toolkit","version":"0.2.15-06e06af.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"06e06af0ff8067d231831cd9f02a1f2a3a1e9116","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-06e06af.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-3u0SoB7/WSbej3QQre5KST5S6gXvXCj7skw6Iqm5FumTwI+9aPuewqK7gC2oAqOCOO02q26PW1RoePGMl6ILsw==","shasum":"12d46590f381816b8f0fa6920a150767a514484a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-06e06af.0.tgz","fileCount":263,"unpackedSize":306626,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAhz5CRA9TVsSAnZWagAA0OQP/04n6588aClopXIvsP0a\nJWEUIfUnRAoI63htbkN1Bj118cqdmaLpyRukmVsfHuOrb1XnrMIGjp/v2cvo\n4ERz3vuiyPQThIutSQ2BE/NiAd2hb3gQdSQTW5q3y60nQzDT4gnRV280qWMW\nFn3eNHFVsbB2md9guGzS13NtjzI9PU1dq6hscypZk+ET2u6nqzsX48th16N7\nNdYOP7LyaCfyYcWvYeggBla2QqbT5vQwlfBJixFbbOQjH+3CGWcBFS0Gqexz\nGS4ZvKSDU+VcCbXuy8V1COMBZkDD5rL9sJ6cgbUhrFP2ElpFoPjGOKi8AICF\na8g4uuvbKqwguzt9ifvGOrTHWsf0nuhICWiTZ8HTknbW1+92IV4c0fz8UadZ\nskXELxWn/B+dxbBVymV9GY7dgqABA69l6zeTxP1JFJuXZ0OkydfZeJiRqcHj\nr+ODXWtuj1jf5D6RFjq8sK9tHoaQ9Uj6l9UvlmlXtt4ooAmgcgETWrp1GIr8\nMO+NS0XIrxbvYE600w2rQ1dOHaaFimz7OZbS8VC1R4OOOSoAG/oSEdYttgqK\nqBAVhW3vi4ItSeM5RcC1LyBy3cKXpKcuVYaCWuN1yWRTMRxcX3DmsdqUxrwV\nd8b0bWOp7ftbqAAD7/pGRH9oLia5wC9sfUQr5uT/zbxVRRPD47MaJgadEge9\nR/cf\r\n=3yLD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEdjC8x/+u+Q8njVLm/3MSYGc+Ye7LtTdUeDqrIoO3v3AiAUYthoQ2oa5YHmVtosXx5QN2cIXE+4kM0Iw+njH/3b8Q=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-06e06af.0_1560419576736_0.14071563316991198"},"_hasShrinkwrap":false},"0.2.15-9043ead.0":{"name":"graphql-toolkit","version":"0.2.15-9043ead.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9043ead92e48816e6e883abdff948bfd1a98d2b4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-9043ead.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-AOsa5zS7CfvqXK861R1ifBS/4+hD4KyL4UjmLVQpR8IZMbwRvKzlVsSEIxiB6Hgy1EmaS7ACvICkCpB9lfFS4w==","shasum":"e4ed6e66e759d14c07a6da0a1e687b7d2aa2e61a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-9043ead.0.tgz","fileCount":263,"unpackedSize":307930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAidGCRA9TVsSAnZWagAAy7cP/2CTjnsIhz4e+B7oHjm5\nlwNUjh/GRfKqjzuhEzGDzpzaVWO/glXZ7E67n8HPSJfWfezEm9W5Q7rd5ybV\n0wkxLF5kA9qx5rK1y0LNdkAdd47Y9v3q5TeTOeE17KBgN/pt8SOuRrykzFEv\nngGOzaq5BpkJXES1q7tYg+nJq3tf8k0aOY82/CZ/v0CPAXKQBBb/qnuXKB9a\n1NDz6enrk1D00n9VwjLTLt0E1G8qEEyt9BjkiHJuXSVqiZkqF+Vh/45IkKzi\nYwAmx/3IufQ18BnyU4osJgJ/5p8Zp3KzOA5S30Y7N40uxNMmrIvP8/Z8SbR9\nMy/8RODxjkv4f9C1ANj8h2DEQJQCljkKHBEObzk3Hb5f6K46KzYTeZm7jaBR\nGwx/kEs/7f3+JGxqBleFfIzy90P4vSZphq7p/OxudOEo+zzYO5BqBW9FVGbF\nXfbxf6biXRJjDkpPY4majYFJlBIDuRp5un45rD2z9wgU0sYiI1wAl/VICIL3\nU0XmB65JZeewvMRSZUjoaCwCm80lcoi/SKS31Y4zrzPuTJsscV8km/+Z2O47\nBIxzl9DDsdelsINCEBxYc4pca+/1tBvmR+q4QozUQy0J1lN4jjNZ4YFXq0iA\n4Lt1gDEFIZ2+N5mpM3SZ/vAVDerQCBn1XjZc0s9aZZqXmRsllRJ/nQmpCG4k\nloD8\r\n=bxjG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIElb2ynl6r2G8UdCfHPFNT09o9Cs3ES//N4bLjs9iXXXAiEA1XGyCWnXeL6GYWhMXEY5aypipxnFXmXpzvdu8vIxaTU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-9043ead.0_1560422213183_0.8012886262209233"},"_hasShrinkwrap":false},"0.2.15-0f5314c.0":{"name":"graphql-toolkit","version":"0.2.15-0f5314c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0f5314cf52f9d2d0e5112a612c2d65050db6f547","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-0f5314c.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-GifvdbhCmZvQfMA3/CyPcF3+otpsNZv13yKDN3i49GFz7k0GDlNt+ke7of1ix3/1QBQwyFGmhqXPfCQH4ousuA==","shasum":"8f3ee630439e22947c8bce566b5b9cb8e1fb496e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-0f5314c.0.tgz","fileCount":263,"unpackedSize":320139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAmh6CRA9TVsSAnZWagAAi4oP/24uqvfaDWZ7fNLlxQRY\n56UekfM0GLjGWdI/FMZ3UBBC4RT11WHR/SI1ko85hqFrudQtlF2DEol2ntDK\nIaFqipQ5l1j47Y/gqmHrOdc8fLV50BxTeJNghlk9r+5i5qq7+dna2CU3N656\nhreZ5EH0L5OuggbHh/lowCsXW5vDsSxZ+VtrdoP4z1cBm95XdKKaOvXMgUNl\nyN+YnDvRtdmG23RX+lIrrgXlUOzQVh3Pa0vQhHn6nZlsDLpL49kIQqjm7kai\nda4Bw+5JE4DoXI6NZBPCCllWPfY4a9c7uJZUk7QWB8Dt41fLfLFm8NCFeGFA\n2mVdoHitkM2Mv7WHvzXf5spbWUSOOhBloGQwGXwLfPMRdCJFbYL1EqvFNGBL\nFx6NzbcUzoewmCwjc4vPfVx3THJp92Swp641AOzTrKZzdv5aYiCkRCwRVMht\nyJBnajz7tUENHZzv3cFHB2hsTFPPBCjH1qWScgldzLEhY/7Jy8UQcMmc1iM4\nklF/O/2eJoFyPO5DKJ+cHHf+KnKYUDA8l8zwhR/OE/qFfy1Rnfo2q/40pvwX\nsdhAUpekwM0Qi1jJaEoS6QxS4tB9tpAeXW1NLIEz5AlMynrWZTPit4pHK2v/\nI7fZCjaesvzZFeJbMtIn1ZDIzWZGBkiyAwW1mfZjd1UE7szD2pq9gkOtrAQ7\nF8Oe\r\n=LzIs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFr+X96GXn5MJ367KdyV3RZ+3qPE04VHpjufaOJNgsWkAiEAxsggQj+/zc3QxlEXEiNUxAGX4SlMp/ZN6EcUzf7pfzY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-0f5314c.0_1560438906192_0.6440828154478089"},"_hasShrinkwrap":false},"0.2.15-9ef5398.0":{"name":"graphql-toolkit","version":"0.2.15-9ef5398.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9ef53985050baa4545f8143b901beece186d85d5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-9ef5398.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-unZ/L/QKEvcWPbQwzwzSElqrcvbOuAuTRxIrHq29QXlhwIa8LYTqaWu46IXb+VL39whe4pwHddYW0EvrO0P0Bw==","shasum":"67ed257e76b05eeee9486e7c9f6273ef33ddf2a2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-9ef5398.0.tgz","fileCount":263,"unpackedSize":306384,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAouQCRA9TVsSAnZWagAAEecQAJjpiK32SieRDpggVgmp\n/8d7/+XLNue4tTxfMpVR6c827EJSsvVhJqAMJghN1KWbEZiVVfUZ/ENsPLr2\nrb0ZMvviflj6HmYxsg1zMoXeSvRZqYkgUq9axrlbEE5kYU6gbJjT5fc6OwPY\nIb6Zb4XfGY1FW/1N90hSFddvEBV8fhjWVD0eWCSkv62MVCbBTv7r0bJ3TFGf\nyYf68jnxw6sFugZmCwYqvhrmfTwNKhChN7f1KMf0SN9rqTnrC1xAmFz5IjDw\n7+Ux4Eb6DDfkVXi6g0TXIQsz76ntZnbVG5O8S4AerNuJhl40TYVfl0BgNNI4\nh4Bt2gYnufLLnzv4OxbGBS1TntQYiVDjJGuYd+8FA8f9rxrL5HIM39tOdMOh\nrza4CSV4bctAc9kXrgvZsnqVZSqw3FUd0NKpy4Vvez21VIN28zOyO4ASaqxa\nStKKb1RXZfzL2By28/gqpuTOwVuCRLrMBB+CJy1H5T9AgWsqZniYx66RwMGo\nWOj4JQ094paXlTvksZgxwa3aEBs0sVFvhm4JsdkEwEF/JC2X0GDZDsStuRBt\nGXWXbX2h+Cf68nEUTZC3tkNrvoCd2spPxt3ygLMwFAvUycJTzyPcKLPgdBO2\nQjbGneLcsBO1ud4lIRQot2+2YV5aOEh4ASlxWdo0oPdmNr+gZa8+g2uBEs27\nCTl3\r\n=IXa+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH03BuX5od0IkKGi1yk89bv3yKqqQ8eNn4b5thBSIMlpAiEAk/8rBdH/0Q268Jh6SrOa/iTXaaX2yc4PL+zzzG1A6QY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-9ef5398.0_1560447887946_0.2310904204209736"},"_hasShrinkwrap":false},"0.2.15-2989d2b.0":{"name":"graphql-toolkit","version":"0.2.15-2989d2b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2989d2b4cfc66dd1f60448e9c9daa49032002bb7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-2989d2b.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-73xJnsZvzES8UCabGRh/yVP1Jt4OyDMmfVYMFpNroXhIr425LaOOyjtpN7+yU2foTBm0U5/QGz+5i80ykusnLQ==","shasum":"3e220cd50f589dff046f444a602843269468a46e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-2989d2b.0.tgz","fileCount":269,"unpackedSize":361115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdAqnuCRA9TVsSAnZWagAANPQP/RUx01f3zhTE1mUho2bA\nljr/S+VKTSeu5+Bhorv/VYscVgp/UGR38kJ+zQJ0hFGRv/VHclxiah4CTrJl\n7Ky+dK2KAexQEzbHK48lF5KNoGGNVORr/+a/9lKvmBc/N+jDyqo5FsZlT7qb\n/+9Rm+kxLohuaA2mCPssxNS4ew45wIWVLTsHe1+oPBszUEyfes6hcF848Sw6\n5fSlxfEJ/O43l+jBj5+XNHXU/iCkRfu90DZNlRP+imap2at/VNB3rc1VtxV5\nQERWNgDFJn4dtEqkY5FU6EWGYTjgEEdo7qChudciXaxfSZsVMl7NaC9QKfkN\nUXgNfh5K7fmPd95BWMMTOlgnYlhcq77TdBBcV5/XXX6rlaCVk7+bE9elrMe+\n+x+Y2bAAWlx9vu/o9pATOaS9VgWxHFnju2PXclDk08lcZXtuwCZ1MGTRYB43\nzK+Xtg7+18u7GU42oCK7EvD8bNcZANUSwIu/AlOs6bHjak8bSr9939Z8EXXh\nG5gmvtSu/PyvFfCOpCHvoJngatSgfuoaPChmS33T0KQzNBG9rTYO3Ff//8YL\nYcv4rMlafnu1ylOySEcg7Sdz9YwPtdDvLUrffK55CYy7ZoKowBcTMnuXs0Ma\nA42h95++DtCPANCdnDBbEE5aTaCvzUWUXxpq1EAHddRmcs8XFPi06simpBN7\nTqfE\r\n=oHOM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChLwPKHkH5/UhP+lQZ1Upmv/Hp1zFke1BODlwHGdAYwAIhALxWztlxX71+VxK2NIuBtcbkCWCJoK9tHvw6hO38JfAf"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-2989d2b.0_1560455662123_0.13491977540198352"},"_hasShrinkwrap":false},"0.2.15-28456b7.0":{"name":"graphql-toolkit","version":"0.2.15-28456b7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"28456b7ebfe3d151ca79663bfadec1fb72edae85","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-28456b7.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-nd2J0WyZ0LM6BPKfxsOk6x5EunRfR9gu5m08pqaHzn8Emb7WG8Om8daoup+JC91maP/OmX17Y1T9pw76nTFiDw==","shasum":"25c77f8fc88cf7796ead093d1f2808f6eee460fa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-28456b7.0.tgz","fileCount":269,"unpackedSize":365161,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdArEMCRA9TVsSAnZWagAAJ1gQAJ+yUot8/u6LhjiqaFSs\nk5pMWBRauA6py0a9dLevobCBiTdROoqbEwjYW84q5IPEWLmXw3ikjGWANdnG\n9PqA2Dwj+4wZ41CO4RA8d/5E1ojS6L3nFZWKKf8g9fQFZBFbOT+ctRBGypVG\nPloM/mDNia4qZKskwwv+CL2ujOjKKK+h+1V6NUeOR3e1NNNVrbxBDsIRRztF\n4nTqsUh8ELHPiNld1xAZ/mS8fVmdKwqFkSX3v3ovj69vNzChh5vHza0qOopa\nfawB2SZ4D4QHXJ1cjSg7vIbRUdP6a0BroXhAfRDN38Bx6OkwMS7+ndOaw/LY\n49Xka24SDlVTftJk/goUTPNYyAPYe9L3WClZnTnVaeBVg7hUZhFy7TU6zt4b\n8Rossu4RX58Odxo83sqQI0l199iLOGq3Cw8uNaDI6MwFQyolRewhqBsMq3LE\nLe0GTiwOEq6SMoNvVJrveRJujjycNCZk7FDZ1I0fPmgy1XeMMlBzDJmhr7ew\nIsXwDed+Skha8ZRpNu8zurNmzUZP/JZwR1aeKEmdMj3sBjqCg6aWyag6f9AD\n80T8jtKSpmfPnbxVeE0uqQ0iaJgmOav0wV0JlySanmRmCXD+kNXCCLLFDH9O\nnp5sfCpDyuNe0yIGBigjCfoXnxE9CM+TquhN62YLSekGpSN1RfD42mFnUNIO\nFbqL\r\n=79q8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGmC7AyA0uFgpjuS8hvAQjwbUzRhgrUNgpIHxTcD00IqAiBroMITMRB7uv/RiYfC50rr2+xNq18njnLFTluHikUpCQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-28456b7.0_1560457484055_0.8059108006660216"},"_hasShrinkwrap":false},"0.2.15-b81e62b.0":{"name":"graphql-toolkit","version":"0.2.15-b81e62b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","graphql-tools":"4.0.4","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b81e62bc4456be712572dc86264fabaa0f24c529","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-b81e62b.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Q5AUn1eaqZRZaU2BbccZ2v/yNGGuOR1+oE1d5LWYLKhvN5dsknWLriRZnA8mHhlbKKPpFKzm9yMh3rN895OnFg==","shasum":"5af7ffcf21028e437023ebb385b9e41633698ff0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-b81e62b.0.tgz","fileCount":263,"unpackedSize":307930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0mCCRA9TVsSAnZWagAAC90QAJ/Zz9FSC35jSTmMjChJ\nYcxTIyAsS5+rCJlSFm3FF6dl/0maCfBpJEzvCWa0qNU2kTJDGPga8zXqoqWJ\nr4wGeYvKkEMFlTHOA1Zf6vSTvvSC8k3Phqf4Ye2/nJQen30zlDW1q5oHl/wL\nOIYPXK2ImO/0D91qGbsgfOUJFsi3I61ow5/HdsyZPxMsFyNWXhlooc4FcuC6\no2fDdAd2MXXrZ2atPcUMTKk+KaOzcA3j6PdXO2V/56xB1AOsmzwz752sAQVu\nWyWfcDt7G9PsVJk04/EzbQpedhTJwzZJXdSGpnz/UbjSWr7Mej0Z9Fl7W4e2\nPGeYJbN6KMXVLUJmaFNGONvjB8Sg/adxcGOJee/mYlittH+yUZD7ykeUQXM2\nCCHbs7Kc+bvCJoWQkgkiXEszUo0mw1m5SmYADwxebPeRO/oETYzZ4XTzV4IL\nApk+j/LMbvKQk9PMaVHy29E0PX033wiF3bC7GJOj8RNIzbu1ppa+rzhZP1b2\np8h+JWuh/bdZIJwEF3Ik/kp0CpKZdWz9Kpijo8gYs66AyK/mVWPGaEE1HmAz\ni1dfdJt8bN8Go+ofvLhUwkhSawf5Lh3R6Jm5yy4BpxxwNaK+lse2R95MhSNF\nNwO5wRZmNwZhmoHQR5FmI67c6tnX5FSaJKYkGsKHL/6reBc2Fh/DcgH/kJDl\ndfm9\r\n=yDC9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDpqmS0pSmXlI8On7J/a0RnEa0sGIZgLaPN3oemYjBsKAiAw8a0sdnTlNEyCwN6WvidwiiVjf0gBsvZnwISF2Lszsg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-b81e62b.0_1560496513928_0.35313438440867717"},"_hasShrinkwrap":false},"0.2.15-f3d9fd2.0":{"name":"graphql-toolkit","version":"0.2.15-f3d9fd2.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f3d9fd2e9a9fa8e40897b6c93f94928df35da118","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-f3d9fd2.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-N8rKKfSmQo5n/p3y51Bp6kvn6n3jxLsHTn4xhkSa7e3dGsmu5TGGwAH2JZLeSr8pk+40Gil6RDnLkCuon97d5g==","shasum":"dc3843729bb96455aa1f52354b5e5bdea93ca864","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-f3d9fd2.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0nxCRA9TVsSAnZWagAAJoUP/Ahy/DgcWJ6BFHAz8s0J\n9rLSNDmUMOaEMR8PMPtEJ06G1/qcv/rD+wSHrhWC7LUSaqLUp1yhG8dB8kZ4\nFdtrhWc/i+lgosphExiJUCSxY8hnGn/1VoFKCY7xsKDfD02nCZ4Y0KGolQ0c\n5xRZjBiNI7vpZwSefltsS574bHfeg56ABwe5NnSYPdoKBu/mDRqbn5O/INBp\nUq4C/tRH+5PzB5MkN6t9xubqlw1OoRqSn/64sA2+9AplHhhk9IYfN8nxPzFn\nlt0cKJBacamxsxnPuTl+XI3/HV6v2a68C9QLvNy6wtaltd8vuqV6tmjvdJ2y\nNniXBruke1WO/Vg7aM3d4N4l1uVKoya6Cu0s/FlZt4lIgpyKxAb5rNmJMkze\n2jDNEkQZr9vPJj6oCpqBK62IxNULc43CgWSCEe21FBdgSd48lgHEaAIiuCWX\nxNLgNM3AcxtRiQPPJ12Ntoce2HcG0nlAVdkd3B1zLRWWF88x0hIe6rvLJKa3\nxfK0g08+6APR3VaY1TbA+/rsZ+1k4bgqj/lcCBcuC6yx+6nQxEs3dhQLxsWL\nFk0rt9QC5LyjHZPZrYf3fGOFPjQL/HPFdKlt4ss40Ww5EHNEZ4jGKLPp7u1D\nW62T9cVaIt0km8lxByU64kYpVv4PqphRwwaHCdWDa+Ty8Sl9NLsVtAWbahvY\nYq8q\r\n=vf4g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEOz7G4KKvPDMEqIXNt4Awzr2t0dMgQI0q8m7eYtYmvDAiEA9v2drcv5qHn3mTE5XxOEVrlmQfOiCQSplAy3+JRsoEI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-f3d9fd2.0_1560496624953_0.08681596234923927"},"_hasShrinkwrap":false},"0.2.15-bf691e1.0":{"name":"graphql-toolkit","version":"0.2.15-bf691e1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.1"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"bf691e1f91b2279262c2a62786909c03622ce42c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-bf691e1.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-OpjoIZeXnmwk+Nx52IIMdhfPdGNSvu25FEuGDTNcNnm5Qn8nw/+ZJg6sq73J/Lxx/475R9EullkhMOB4yd5S1Q==","shasum":"e41952d7acef0af2dccedede7f526d0c10bd21ec","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-bf691e1.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0p8CRA9TVsSAnZWagAAwWYP/3B6mcc2iOLZYqB12yJQ\n0MGwJMBVvA6zH8nTHInSlHXHshTbiZnjma0FNAN8lIXKwfqcSZQqtuF1GAEJ\n2LM9/1kS79zYUVK8sLgSg/1YtfOO1G37e5omv9/uAIC8tojPQU4ON8J4UWBA\n/QiMJwOVdV9TTnQNmQgLVJe6xJG2yghdhjH9xlALurQ3zbMcA3UA+H3NcQmL\nSf2MQkNdHKmYD5+Pym5cxq0uhmo61+O8SzBBKgs/f6LFeCQJ+yTv9zDirU2Z\nAyvT3JyurMKbl1Piuz6ovFZ2+kdjYCyydvovbgP6/4CJ25rihMBoHtLMhy9r\nXCuFf3nLEL71xolki6nByjYCiY10N80JdingFtHiER5zcbt5rmZRLE7y+urF\nTGpqU4W4PUAO2aw/HHpqOR+Zv19YjIT5EjEJaCEk6ZRKH9CsrwHjpxfHlNdr\n1vguK1JPzU48+a8flElzrDggx2hfofYg4VS42cJ76ga0WHEPdKGIscVUrVoe\nPOeau3o6Ks/3lynya8qMQbaMtYB5Ko0QfNK6TVznmSJ2Ya7icbjLQhxCyii4\nf3VtKlZABn/FngGtKHvTkTdhAyVzaf7mAtUx5978zoOgy80XRAw9yLdTAgt7\nuhLhpS3/f8nQogvWiKupnk5BLo5FZSke0/JPIWr7DDRpYdoAQdKUUAN5e2iT\n5cLq\r\n=amMG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEuze8PRchAQjcR/BX989xGhS2XzbEBrQ/VKS4fpme2oAiEA8d8BNH81K9gNJFzouW95ZqIMj5LMtRs//CJNoU5Ago0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-bf691e1.0_1560496763852_0.7801100889692285"},"_hasShrinkwrap":false},"0.2.15-c2b577f.0":{"name":"graphql-toolkit","version":"0.2.15-c2b577f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.13","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c2b577f339d95c784bddbb3681b5ab50459611ca","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-c2b577f.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WZDDUk39IQRCbHZZ4JIYDVVCxl14KxjFcq1lgS+S2Nf/GPyzUVjAXirYSHmGXXtrL2ukOC6RnVt0+fXAGpxDlw==","shasum":"680e8e0b0142389fc5e348a39285bd81faad3ae5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-c2b577f.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0r0CRA9TVsSAnZWagAA5p8QAJWsbDTMeUoA6R1hFFed\n2LgU/MI8nsBHlEXpt9CEZGlqdh1elxSYeKOcUK0Nc5jA3hgqzr6O4Gw6rT9R\nLZKBSqzVmCnebY6z/kUKHSO+YCFgQs44gBGp5qaIAIKhHeE84SMJ46lGW2wj\n2nc+nAhwk4khzElreK7fWBIVRG1MQcuhQP/sbEAbEuikCeRf9UdJ5QA3RiNA\nxMyJuBrhQREWoNTFmtz2hxQRlq1aFc17iQrAIhRkppeAPzVGl7T0PbQIsG8G\n21hwwMthTHCdx6/dOl1fqQuzvWLa5f1syrFlr1kEjNiMy0jj9FyrAPpvD9tp\nlXRjpjWA84LbEo+9G0zr6FYuylcMOfmU6qgbc9WyyvEwFXQIXQCiqbpv33lM\nenQuw6MQKKVsPSzb72cqY3NeFDBhKGUN4ChNxfWW1vfkGfZWLgFmx04/179M\nQyoWwRZyLu59QcJfZcrFuWwcARN64RrBFjB0ZUD6K82X8nCdV28CrDf7b22P\naz6/4ETHswRLYgmuu/YD+VxRCKeyszt54spGJKI/Oa617on+XP1HozkAM7BJ\nb6FTYoRrWxgmHc/01SyEmbNfwx2YNlnWaFAU3HGZWqd6+4Aoj2D0oGhBzgco\nrQGvBlh6ThU1e39q9qIF7LYp7TA7K3GIG3f7v4sM2qMU6MtS5w+61+UhqRcF\nLsX3\r\n=lcy3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxoI33V/mTkXcLV3TWEMGvrmvT1juziM9btNNmEUi4LAIhAI7d9947/VsdMxZUtEVURTP+ckWuj3HMTPLP4Sjc3WYX"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-c2b577f.0_1560496883352_0.9178649056428954"},"_hasShrinkwrap":false},"0.2.15-4f57fbe.0":{"name":"graphql-toolkit","version":"0.2.15-4f57fbe.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.133","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4f57fbe5feb87950c4bee7167003fd9a7244eac7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-4f57fbe.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-zJ7TKVQdeRgJpCKXQUb51glyN5xmloLHZ9Gwy2DgNtVDBcJLc+81qKZF89OIGwjgQZAg/xbHx427gqHgqD/Hnw==","shasum":"0519f27a941c3007e784d255272f3580043d9a0f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-4f57fbe.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0r/CRA9TVsSAnZWagAAs/UP/i0Zv3IpkGl+nduHsll5\nL7+t1GTbzk777TZR8RrFxP5f/Ac37aQaSJ/k2SQb7eSTrAFKIE4F0XXJlw2x\nKJn+1d2lUhvsHv0Dkz/GD1RwCFycFO+AWzuxMwkWnhzIeZTS2EDv3bczWLsU\n2OP/gTTjxJCvCXT96pddGvtfGb8+seKtxr12SAKhqDzY9kxYJtXWQTS8VAc9\n0fYANJMGIZLjz2TGg3RzgQWM9VmRpvfT87ZS3aoZeO+VQYEtLobcCkUjuUwp\noMBh3NuOgjnPlY6rpFoyysTwEVqkiRyjI3GQnpQWE6CRlNIuQGOhMCj/E7bE\nxWIlF90H5f8Zkp1slS4zUFfs1gXIlHhJq/zNqDY0N2rgMWTwIF//BIUH8ISo\nyB4MqYemGfRPYJ/E8gMIW31IR5sBJvWJtQpPvFvGjg9el/96H/M5KaNWWcty\nECjGYl6LykfH3vyizkGAKbhyss+GoLII//rwozD2TQ/2ICtLljulxYWYY/rH\nR0756f8yBzEMpEWBRxKKuUKKlI85iTDjMQBtyOXRpjKebIO5aalu3aNQQppU\ngIeoyeQmB37rmv6+4HNS0YVgUEdMhbC0SKgQSQbBbvG10cviZiecpdbU+oDZ\nCEAGTKeS+xdYbMEfcWlSvK2pC+f++IZlADZhgrJa2BkE0Xf+dczKT2F5XJjx\nnXQI\r\n=6I2E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuLAAonek+iB0F7AvfEReN6tJgJgOz8OOQ3Ugg3VNOMwIhANjOw/oK5lyb9PlgoB0vJNEs2hWrwuFkQ1vrVG/EUkRG"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-4f57fbe.0_1560496894477_0.29630534614762594"},"_hasShrinkwrap":false},"0.2.15-f4275de.0":{"name":"graphql-toolkit","version":"0.2.15-f4275de.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.8","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f4275dec408c702c93b3846eb2d17488d9483750","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-f4275de.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-wkkMeNI/3RUbu7BtLqqryRma4mnaTgCRfvw8/IccZrSDv2xv0q4HXbgpG0DUhZ+BNZP0q8SKARVD+ON5mfZPAQ==","shasum":"4a01c6d262694a156e52b7663f7dcf17ef34b7d9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-f4275de.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0siCRA9TVsSAnZWagAA+ZEP/3I5gILzC3IeZHnrddbV\n8qkty8Va/8bNp1kaVeMaXizrIdJF4DMzwN+2YZZFHU+B3q99ckz7ahy70s1Y\n64z2e2maQ2EKMp8HeEXrSy9EUUCJqsVHQfKWEruSNpKUeYut5av+490t42NO\nT7bgQ3v8j4uTj1044joz0oTzzQIanh84mCdH5VDXrlGIwjsv/KnpRBdNJkB8\nMwU5mMJD19y1ST1+hXZM8SE0Qilk4mwvPMd+L8T1GWJ6IuUH7tKD3ZGL8iB2\nEDCokb6JZcWk03y54oWkKBLTsfH551D9ceS0VcMQ2P9lB8PUd4gE+waDnHP7\nooFII6aSeRs1OMZ1tMgfVI0eHq9Ni/WK7Q9kaeDQ9bkjQjLbyGma7SOJBT4b\nCMW0XOiCxfBzCFEhxcCvRwiKEXVHp9UDkYzx9dWE5jlJWSDLmPcXJFFjZzvO\nQxF5qohspYSMGxv0/cHnQglQZKLUP+Anm8zEjsX2xeowGLaVPaX0FpaJtvPh\ndDUIUEZMjjz2sBsCfwRvfsVFi+/58djeCJ5HMmbN/Ws240mKIQxG95ap6zC6\nowid2I8plQVQC99+hDXtzDbieeOHbc3xDrizYLkG6FNuMr2LM5DSbxqbaxEW\n9ZyLYALLuS56bK01fO7IDIrEXjG6n/AJgq0Vqfrn21bgYMXxSR8he1DHwRJb\n602i\r\n=gNYz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqVz3MNKgt14nFGbzlf9WDOFFvHAFSxdea2h6uuKcKmQIgdFx6RzfGLrg4RMdTgGuXm+dLw9FxYFPAHiS23ipHaBc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-f4275de.0_1560496929656_0.9822278182060533"},"_hasShrinkwrap":false},"0.2.15-b34a7c5.0":{"name":"graphql-toolkit","version":"0.2.15-b34a7c5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.133","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b34a7c5c8530a57b400b7e48068b9c9fcf5abb4c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-b34a7c5.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-crEVJDb/haY4hR9se2YbtIceBkDcwZ1e/uXOjVRWixWSX+vWqfjQFETkracSULvy+Bn0JdLA7MBVSuH3/PSLSw==","shasum":"2262bbb295ce298fb0b8b5f74c6fe8ece90efce2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-b34a7c5.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0soCRA9TVsSAnZWagAARckQAJzjMntSZRFylq6rE5pE\nVlsoBmS9t2LvMl/5U8USH1eCxqYcBghbC1SBQQQfGUmc7tey4c883z6mo9yP\nIuM0OewRJDepj2dyB1ST1dleMgw53KuoLdZy+fBF9HdYZM3xL9atFVFKltDT\nueqM+QYTewJcYoSRyOzHzscbEDqSZYoDs19gNP0+0segpb73QgAQKziu+E3k\n7amHNvhofT5MbB2rRO58rEG/FIS48xQb7kT4MekTivyGY/oj1E32KwPjT+SH\nXcxPmS/HlP0oSqLTcJrSviqqKq3UYKhxPAbpMLF/jSnZJY4q580uBZgh+XJM\n9Nsgd20O+rmw3KlWkUJ2gszQeCmMBtwEAPfKQMd/LXBWfM/sCSb+VZdguFEF\nlAyygwm7FiFwpkXunVDzyLQz2Zj4yMmLR+LAUjzqhgBEps8gG/+971vrYfh0\nylrMDUdaddOAct0QO/0d88pX9tEIC+dOS+xt/c53qxcDMsHG4/QLAYeVTYCM\nvBRUXlp2U4apFZvnNsChl0bgL9bRgU5yXmZTEfFpv2xTEtayqKbj2lgbpDc3\n4VLGL8ikjN2d4rYniW112ceWPFDcyi8I4b6J3KWvpBP+8sBan2qK4GI3olp4\nmKVWJJejB1kTYL3TEQaUwSnN1DJFZ6be/HEQUWHqwsRwCBm5F7VJP2TJA2yX\nwxUR\r\n=TUCb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH5HS/V/5nOWu3Pp75d/2oRxkoPQE431Lfkacs5W/QBMAiEAhkKLBHH+9cX+fM7zrdH1259KVdrc2r59cLCtn08US7k="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-b34a7c5.0_1560496935779_0.8670477635953233"},"_hasShrinkwrap":false},"0.2.15-b15be45.0":{"name":"graphql-toolkit","version":"0.2.15-b15be45.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b15be4588b23f7f94fd587c2936a9bdf6572a4fe","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-b15be45.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-z5vyorajkbNc3ScjhElIePHDvNHRugZiKXu+nmnnEbBsCq7otQRjyFvHe4cwXk6vcoYCTLtBTpYxnM87wrVrLQ==","shasum":"e938be1b8d9a729d4f819dafd7e51641761b331a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-b15be45.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0s+CRA9TVsSAnZWagAAK1UP/jfhHzjTHOJXRswOFqMa\nHrQe7pckAdXxsi5DLD5jGUJkH8uYKTChlSiOCtbNvZH4wpMcyNGLBT3NrC0D\nUawTALGG8BVmpPMQV0PafIO0WwL+QYHGlVQgzvJAtMa9t9ILpMmHA/psxHxD\nSAQAwJLlICn6YmWppCscSUuWZ4toj+7rs4wnV9S8pEiET+E4EaitF/Ew6jDn\nnMSliaX42RyyzI81kVMKKL4cB2m6S8j1zsT71trRDwbkKq3LkvyKG3D4AQ2U\nQIZ4suTbu3iQS9pBB/PPVkAiRUyxz7nNaWXk339jf93qi0OGbLePNwBCxgeN\ny6ykQYkMiLClOtrMdkBzjkd27bOFzF3rH8KWiuSCrHSe7C+uvRc42twPv5sY\ndUlDTexphZBDplOvVMsrzMl0pkoXcu5x7blqWKHbmZ8TCAHo0E/uOZGyAThK\nnOPs4KGjvu3GkCiOvUquzxX2vHB91XAHSIhk68ZVsjJsdfvHS+7/mKMR6eWQ\nBMz80Xoaq3PDwWgd7r+u0ZSMjIS32R+iIEF3QySWtqtCeRJxjFGqUSnax7it\n0tvbfqvydNj1ajZV8j2BexR4mYxoUDTdQ8AEMWlmeSLlWE6Y5nMpUSXdKGWq\nRbXOpuXvWXAZ9sJlCdgrx132xih48u3EZlz7XcuW+QNVIiasAonZGxuf5thP\n+L7C\r\n=3Oee\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkddKQsgARDH5DsskfEde9ncCAEVjKcTMgFcY8I0hcHgIgb4NToImjezj58RKwvgjxDve+e/Sa4g61/bi8lA0bJmg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-b15be45.0_1560496957838_0.06409076921944878"},"_hasShrinkwrap":false},"0.2.15-b65329a.0":{"name":"graphql-toolkit","version":"0.2.15-b65329a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b65329aa17c8b1ccb45188a6ebaf26418ac05e26","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-b65329a.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-qmGwPHNvIPbZQlBI0bQZJQaLQWoQztR7jCeFiVfqYNggvCRHcfVTZSeFZhwAYezgsmas45ynA5CdOo3rAY7/0Q==","shasum":"d5981aca2e067dcd5a5336e5f3187e480eddfa5d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-b65329a.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0wuCRA9TVsSAnZWagAAYNgQAJgTx+WXdQ2IMZ/gwXY3\nRFiuB3lRh8Iu8Aorh7kAI4kA90Gi5IIgYiNNQYXX7Y5uHNToyn8hdVjJtWaW\nOimd+sv6UgAg1P9L79RHmJ58FSBc0/ShP81CVQ08SHsww/kXzgmigY7EGIcj\nvpAWUq2fdUkYpIDDtoURu8RBJtBx0oxzZbmyPL8l7Q/9WtuaaUuPWzJcKfit\nMxg/5WWBZIm+L08lvVu9hT2qqgN9Wxork+pE4f5kfWXfjNm8d90OCTMBhMYe\nj5pnUBaYuhZm6KU5Pg5ZnpQKcs/AtrxY+8XZGfij3JNqAJ6kiHqLSRgso5dn\navYekiGJAUI5Mop8zYrdzrp144tRVrwySj/GUu7tipVWR228qoDDCeNQHbbS\nbUg3X1XHcP9i5RbE4QzLGZMGApJ5YjsZ6AUmgJ0GkLscPbD378VdYvVYnpBd\ni6WRmxtxTyHIwPMX09/F8VbRwtUg/vFsDvckGD4TbdJHNP7+ayyXrnOVkTkb\nrfU3wa6P3khPHZl0f3AQZhxvor9Oo9Q5gvnOgpdpzI4Ryd1M4GsJlQgIbF2Z\njD4H64LCFWNgUCbGPdu7WMOlxq2P5IgB/HXXbNvWYGOiB3gVveMCLcwdZj7K\nrRhV5B2cCz1Bq9fCb8iIXr2zJb1N8UuY3KQkxlBT6gmOIytnbjK1rA32Rmmo\neHVY\r\n=bEuF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHhNlOP00KG38LN99R2Ze2zxcxthUkUEIj9LcV9ZpNBuAiEA+heyuqJ6UaubRuTc5CM73lIfC0feYU3tgpowGHpWjhA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-b65329a.0_1560497198240_0.31487911761384835"},"_hasShrinkwrap":false},"0.2.15-ac872ed.0":{"name":"graphql-toolkit","version":"0.2.15-ac872ed.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ac872edffebe4ba4ec7472b207af9cd797172616","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-ac872ed.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-lmutldf2UtEcPZ+iNN/40l1wlfbneqoIyfSH1XJE8A2TYmfricv2KQxeD7sWr6vZf84vnQJ3C97uLHHSUzYN3Q==","shasum":"41fe67c76d97fb9728fb6b16cd05e24118b3f214","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-ac872ed.0.tgz","fileCount":269,"unpackedSize":366949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA0z3CRA9TVsSAnZWagAATgcP/1+/fKBn9PDV3zWkWUA8\nDVL4seOnqzzNPJbG7fXtdKDYGjkSozP5GaL9uaadvk/L2JqOEjHb8kS+SgyG\nHcYHMuAQcafoBPNRBbH/vqbH0/9sFd9+islMBlKmAcessgmf8AGOf7yyykiH\nBq3jgdgQGHpC3B9OwqRd+p2mJOMc7zV3NMcADn2tfSLQct5DV36UC88e8Ixb\nDK0HzxrRgYfoH74ZmX2+zP31dbcS0+mGoY2l5vak818QCcxQxu3OnzE+3qR7\nrWwsQ+9zPHfJEE+rZvvdhKTos4YbdsB+y/WnjDHEpJxmDXw3hblzIHiu9wHU\nqIin2q3inemIEKThyxOrY7q4aU95dCcq49F4slKXqdyZdtBPtKqiu+B2FkDu\n5frZPsErUUKbfMAkRfhce5wUcgdtDM+QWSJ/swDDtpIv+j1lcDRlPZWoi9D9\n7HCsLYiotY8nqfPDUrxKxsH2oVHADLt991zTCZ/7io/m07sWxVATX+co82Vm\nkXbpSMKphF5rhck36ob6Lz1f5WzeNMwBQ9s8JQSfTLeYPVsTnaiXrEXvd4t4\nUI6bN7HGVBHVE/oRoDRLzQyAAa2TzARl+qoWTkwxA9E0u63dkQzuWAQJdwLu\nUkq3szbFtvsuaY17P/mgysJ8pJ4XdWtKoHOi76FXNE/jypHCQqbaCEGZvqmu\n7jM3\r\n=yj9j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGPwEj7O6dZx0zF/NjdWG98fg9lL11HQlq8+25HEt/09AiEAsKAXet0J6BVvUWjbRuYM3OEISbUK4w8E/s5tbaPLvBo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-ac872ed.0_1560497399012_0.5382859174977164"},"_hasShrinkwrap":false},"0.2.15-2f04a76.0":{"name":"graphql-toolkit","version":"0.2.15-2f04a76.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.1","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2f04a76dbc526c0b085e3cba78b37dbd99e3962b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-2f04a76.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Q9knDlxSpuHdk0n97sCfZSi2CLEBAFqDC0JNifuLJPIYMV9dZ+2KoLBt8luNSU/WaYHs7oMyi9orTGBgo2bXjg==","shasum":"b10022ae5506c622b7bacbb50eba3fcdeb5ef43e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-2f04a76.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBAEoCRA9TVsSAnZWagAAYhMQAID3uF1cT7XGW7suRn+m\nUNrwHKa72c9UP6+r14reDBa3pP8OqJFfp4boL/ExDQ+rik8KuCwoVoyskmF1\nWGf2ko5ZHnNAUFqa3xF3hU4RPXCFe1T4kaBqhUYBegx8AxB4fuTKHN8wtPix\nY61oq4YwBU6Ofj9peVb1XnY9axzKMIu9u0Vtg7j0D4+LjPheUky6iY96h3sy\noIOa62JFD+ipx76Vz9D6jsIDywYkbPJ33y26jkTmi/I9U/r9cxdEOaOH0J1p\nxXeA6DgpmKNfarAdgqH6/l1ydllpRlov3YuJeOxYbanryTCmB1nHnTsGljRm\nVp/QiDp1Y05zq/OdWhI3D/Ibfzf9FeDKeY3mbhON260Br3WQANNOGWQQ91KG\ncaTpiQPPODZ8mUG15Lfg7F5JOWQ/22DxHHuCKJZBMTSl9NOZLiY1l713lLLX\ny40gjjYCWQ5wGIUvdmp7kuouZ7HAywTr88fXsJMGTTS76qHe6/iL8ljaDgrm\nmo9v7nVJC5n/w0h/oU6xPGZz/aizgNU0zDRZ+DAgT49q4fbbe4VlWYj81Cgm\nWKVUtg4Ln7a8kU9c90e/gd1IycAwJYRHMuBGAMsFcG2K9Ag8qaVQADLcAPB4\n28f7Gl9bpVRYjCVh+Rw/sGI27XRqkn7QlkibL+heca14256L8jwI+cz+hZKq\nP2kL\r\n=DMWg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICs8yqVoN22CiH3ciC0xrgE/usclMRKkl0XI8r83oP1dAiEApxAGFuIJfDg4OfmzqAST6iNvAI1Y+a1IhtZWFEvvszw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-2f04a76.0_1560543527710_0.05994148047671377"},"_hasShrinkwrap":false},"0.2.15-76ef51c.0":{"name":"graphql-toolkit","version":"0.2.15-76ef51c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"76ef51c028179ff333faabc48dc7ce36bec770ed","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-76ef51c.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-wNJ18QlJ4MYiRqy6gS8zHM40BQGPtdsafZeYC1ZgmFcCEtPVT9XqpewMRh/HjMs+YElm4pMCI40MomArM17+rQ==","shasum":"21826134443e6e5a90717a17ff4d6c9323b6db04","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-76ef51c.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBeGXCRA9TVsSAnZWagAAlMYP/2yArmTf9W3+R/5MyPbt\n42AgoZxdp/N1EPvCBhnbLRb8ABJJ+EPJ5UaV5lxBn6F6nnZCurJbTGgtvoGq\nvFUo0irH3gtALwHCqYHTR/OIEBaax9LiKev4608LLueZxTKLf061266ir9CI\nbHdyyGMOw9xTgbZWMnKM82cWVOQ7z985BFfyfDj5FH95ZR/mN0xxGAbUuGqS\nxG8X9k0IJD7DEPD1Yn8fwkOffOYZ1ch3mt9dIghmdxJqQGdQKbk3HWnk/+7E\nOWyH0G3qgzhAqXgACynSno+lvS5z2m9541uGBepwb7mFg3dTeK+qlHEazdLe\nBYdINc8RTo1fuQA6VJXR+iBhmNZyRIAVS73JBTqwC6IKbrmLjPO6OFU8x8Oa\nIBHZ/X5jHNFMmALT5TmNGQfWL8BUJOkGwYiPXePrnM2a6GTipoaZ2MWvEFsi\noZDabhj7oiXUNiJvh2XqgcwTmw4+tl61XSwzsohpkswxMLOgicrza88iXi9r\nHoOtA+sGWEbAbE7rS505pM5+nT8If26PrLEAvlovKpnTKmucuxm1/jP9sSEk\nco4vzUWhCgZOAHgpOAIk71KjXUuuXAoZhXzaZnvfDeY7878e/FyHbsFpbUxX\nG1J583crtygop3IVnUO8Skfzlunx3vcGSk3sZ1Xqmhf77MlN798fcLBUsNPX\nTrRm\r\n=vOn1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICAQ0sc/VtSkCZRt1d1bT59/E6KSYZtSQdB0Fpof5ToTAiAXBfXDWXAaqetkqomS4LMECZdWCk+dzzIExHXSNAPrBw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-76ef51c.0_1560666518884_0.9720082685057991"},"_hasShrinkwrap":false},"0.2.15-251f256.0":{"name":"graphql-toolkit","version":"0.2.15-251f256.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"251f256908caeb3a0451de19b26159d989930c92","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-251f256.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-RR1cDqn5vPlSIOP3/FfOeY4XoghokfHf0h03ejeFU92x1OgbV5TdVroauVOVn8x6uvVrpncRlhmmtezN5TyhgA==","shasum":"03b301d90a7d08e76e54ea11d43c8b4ddee3caa3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-251f256.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBfIaCRA9TVsSAnZWagAAI2oQAI+oknG8wcNkhs9ysO02\n1ekxkghRoBRf0Ls26dIoburVjMXF4Xd/zOyCr666sESsiIa/6LIJh3Q+lonY\nV+FXvg27c0zMIrZlWtZeCmnx/AApm2jW4s8gERwJItVc6qeJs+YsvSNOPuZz\nZimJ63uozTC4G7jauRmNcV7zmUam5Jq0zH9Z/eAjwK6BzncJL1ySMRRsgyuH\n7lPYhd9hNzjq2M5CJxbtix6rLn6opcsfzHqWejHovFfnUd0oH3fyVCH8HMSb\n+kxgy2dkxWBqzOEf0qV7AbJ0mCE9rduwZi3r06fFL4TFr65F/+aiQnOe+zka\n/IuuchzTVFlz1DGCl+8HL0beXMZ/U/XEwFqEiUzkAUXxKFEY1+eJAo9xw6Gb\n1A0IrtwyimzuQBXdVPXcGFxVoxU8AeQNsWtLb+b0M0TFp+9OQUy5rFJRlI9q\nEVXOVk5drSokakbm+YbSuQJTQvWn7X5RgcZFwo6G0UX5mnQA2kaLJoB7VF8Y\ne7yP83/L2ngYmfy4bRLxd1UO+qJ2x6PkA67Q1/FAhuDrIJsV67Qs+CzRs+Nm\nEXE++CPBl7YrBNxvNjmLDG9+71sVFI8wyLuVOuxGLMvQpkclVZ/HEFpJvya/\nEZ5arISgQAWnlq97BPkBuFw0hqLAqT5iaNVEok56X3laexNLaz2ybTh5yjgx\nlsU7\r\n=MOsQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGiaFnCuYcyqt1/LMh3EyqEY3c7T0N5pGiusIiinlSViAiEA0ZxFUWQd/9q/CEOPXDrqAudPcHmdq89ffKIZvwGM+ME="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-251f256.0_1560670745919_0.7363604572761473"},"_hasShrinkwrap":false},"0.2.15-59f26c5.0":{"name":"graphql-toolkit","version":"0.2.15-59f26c5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"59f26c5513cf09b8abf2b14c09ef673fcd1fd3aa","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-59f26c5.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-XOIU4+ajpeFVBxVreK+WXYnWqCGJpyovos2A/qT5EPB7+d4epJk7RiOSOcigBcFbTbxvnXdNdCDEa9PKAM4Zug==","shasum":"06c88e281c2555379c0057bd51dc7f0ea8a7c1ab","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-59f26c5.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCIUUCRA9TVsSAnZWagAAbdcP/2T++7WxjQ1Tuxe/JMwS\n8r3RiXawqxRcm9ti/KO9SdGM/SrVJn53uEpTCRNRMjOwi+5Ja4gF6b4+hP4u\nF9K7+PkLQf3HE00yBQNHBLl5U6i4eyN5hvfblkL5UrpR5rNmpen8I4lPSZMs\nCHrvLkVubPKMFsHXQvjSC61ZpEp+SBojUmnVdTrcKcV0dlQuahr+P2DV48jc\nfzexzg4vGkSt9AwwPsPUHhJineUKK9vd7J/4SYavRnK+ODW16+fzG3DFuAYr\nC87ZfKFa0Ed8DqiOlldebiaUMEI9pT0cMF87ABc2DJpj3lYGQPWnqGshF9Q8\n16I4MXtpQXuxrHdLEyN/AvrZoUm9I2u8FDS60kdI8ZOgP5K8KxU4VEGKYOpN\nJCeHymP6EbZNyJA3Ga8vkLj8Ovc6xYk9xJPeug48K2rL1AS2YupfqrwsegZx\nneKPVfwur2W1frtXqle8hRtj569j79CZSHPJuBpOJxVw+hXlJ3qgOoHD1WZF\nDaUcEqqraCdfgPVSJruotrkfO69hXbqc/BEEi/kVLi1GEStww7jGSC6aQeej\neu2POkHnk//35A8ea9OpT+CU4NmPFsYUCGBAw2wIvdiFUak/S+7uljQMwbAu\nry3/nTxe4LyGovuw3O4/MrUJKMYKLhouAqpP2vMyCGTwZxQNFCf4Zv4Ra9vg\ncmo2\r\n=nSh9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKW7aiIn639sG4P0VbDrAqCshZh4SuAH8wEhjCPWzzmgIhAOWhRJwxeEK1nHX0cOZ7+3bKvXvdkVGI7luazk2DCce5"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-59f26c5.0_1560839443460_0.6482961085940082"},"_hasShrinkwrap":false},"0.2.15-91b0089.0":{"name":"graphql-toolkit","version":"0.2.15-91b0089.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"91b008908ae7cfef4b51ea5797454b33815c3ed8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-91b0089.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-mmIszwerxecDlwxxorzjC0dbkM/QMg+UV2OvsGu4LSGMIIAyieJ2zVzLxbTcN4d38XN2RXV6zKLJAWH454QWrg==","shasum":"a402792e0647178f05f88ce4adec2ed482495880","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-91b0089.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCkmfCRA9TVsSAnZWagAANhsP/2oeBLQDnd8T1i8SkG8T\nSrpFHhy3h9ZWb6jb4NwgPt3znOIeM7zwlMyAjhowY4nPbfOwok0KGRjXvHz/\nDEFyQmasUPfJN7CR3KuXfbyXWGzAQscU3mQRKhG9eLM0UklOf8ws4cGw6uuj\n1+yeANTlMYDmU2aNHeVpgVsSkr6vOJdu7ov1sPZpLgIjHqVYcbVrUB7gZiGF\nLeptIToIK6DvtikpB5accmnSavmZucmdfJ1Y0gOqxMAaMd6oOKUebf0OSRqu\nuIww2S0WDatKuiekkGJ5g/3IvlzETExKcjrluTnHpppHiOKCWVPvff9lcAw+\n+RxQZUSlpUX/3bZzT0kv0jTVzmUuoPiLdnLkVt3l/cypnJmVMfMJ3bEBp7u8\n+cee4jN0hzPoGnnsrKi/l8tS/O9RQDRDjQpKR7PK3pajzLrE1QlfyxdngWpP\nnYg1ZWSk9l/beaJ9FaR3duAJE+kBw3h1zVxhH3JvHvZNhwtgKNyA+NmEG7vq\nRmNrv7yQiFDEE8gRppxLD6wIa2Jl9mcppy3Wwj96/z3f87AZPM/aC9cyp5JE\nmGGvORIwR/i87nSaTA63WcuAKJ2srlRrJy3LvzBjUcSTtNKJrx/nlBsdYSgB\nk/sGqL6tsY+0MUcMzAvYbWY/BqmsoAHj0sJsUK/IiXYSki6noAfE+ccYztnK\nMYpe\r\n=PDpQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC2YkxxMbkAMHt26mSoMc/zB3VrxyorjJ6ZPNnA9/rQXAiEA9+hNDm3GTmPZys1MC1gxTyXqGS+xpnJo1wEc7TTbzJY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-91b0089.0_1560955294911_0.5745209942208747"},"_hasShrinkwrap":false},"0.2.15-7deb3e6.0":{"name":"graphql-toolkit","version":"0.2.15-7deb3e6.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7deb3e63afbd0102a672f2a499794c79bf336bd9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-7deb3e6.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-UYW6NUXoinC/aFNKa7SUNm5XK4/nVzJaooWERbQ4sF73pMxTcErvgDi5AHZw7OkAku5dWOcNLXSiXkGlxTJ6Og==","shasum":"0bd1c3abd812a48725bdee3c86e0a37f3c2c8769","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-7deb3e6.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCkvGCRA9TVsSAnZWagAAIPIQAJyNWO/H5ZFdkwVA3vqn\nPZ6an5BFtjoJyiqKuwU8N6bFADpfHh/QKz6MWvBeJs3WUeWz2mgUeeHzO23n\ns+0p4yDomWcoWImRe1PLsvB7S6BAxNOf1/NI/X+3/lKltUQfpSFvxgEPWXzi\nhGNDFlBUAHEPzqaa/OfYmnBnsLTJxFbL6ILlIQc9eKrmiBi8h8c9smmWrZ+/\nvRgfBxd3mZkQM+N9iA6zwnKaek2/qyo6bD0vu3Y+unMrzx2V7+YU8Rva/RPE\nC/IQtvbiCORkowMknRCWTl1lHvaeyVtggkgfNUHXdFR+8RYAzirKB+gJC3Yp\nseASRLuJHAhxKR58qGwEYkSLCJeDAu0wDx/bayifUsVXUmAMON5mvt6UPDgZ\ngxAR/TEggmXdJ6A/RJbnry2R1EL2GdBDWW1dcv5FrsNkfOejUMKuJWZlAg8q\nioi0EjV0MzLOwoikKORiCbF5f8KM9tXowHqgj6m2b4poTMtrRKJgOguYCrpt\nsK6wOWBHTFX/+WLUm+kVAC5l+jOJlKkSR4xlrShp+B4VjA1jtxqu97MJPxOi\n71TtBRzgye5s2whHTh3J7oLVEtmOvU21uWVZz9fh0RpkV9Z4XyXdBcsLwyYh\niIJjLFqG+tE5fgQAQJI1dc7qmkm6A7CDpiVKmyIHRgihYof3aNs6a5Rb9FjW\nULVu\r\n=mlWw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH8aoAzg8PQnmJnySkhwqw8G66X6BbdF1XB0hWr5xRCHAiEA2GWQv5WJPZkKI/P6ew5GsP1FZAMqJl/LBaeEKQBTQLQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-7deb3e6.0_1560955844062_0.3278504692673889"},"_hasShrinkwrap":false},"0.2.15-13cfdab.0":{"name":"graphql-toolkit","version":"0.2.15-13cfdab.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"13cfdab23ac77f33be73fc7e627f0c3840616558","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-13cfdab.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-sWaZs3NRbkJbfn8LUy6s9LG2pBUf/A1nI8vQlFlTJdiTwz8hOC5hnurSqYHL/6QxYL5bvcpwshhEuuObO3ON7A==","shasum":"764d1ad284d82f8b54bf5566c19900b5147c3856","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-13cfdab.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdC6uTCRA9TVsSAnZWagAAEI0P/2a3gdndZFsywFAUGhkp\n34SZjTNNghwtCGcq4cYYrWXUE+8Ia4ozhK7S3Zv3Upc0HPytC3WjWMP6gDVY\n0fFr9lJSquMbR3+DxdaKMXkid/2JftLfF7XxvtHsHXe6sf9yT6hzmaT6zd2m\no5EowV1FnELdcqm3/Vh8bHAJCEVrkuP/e7AOfVstjJ6yrekD+uMwWtpp2B+m\nVltAqSA8WabVFmgLYmM2xOuc6+nvBob5IpLS51NfMgubavk2NrBcOMlBxG4K\nQzQG8BtC69Hrq5G+4xF0ME8i40nxNSrYkDGPHeUiyrAACA40Xk7hkF1SV7bE\nDhQaRHvnQGv1NR+92A7yvpvhG5ncL8iI5MinASwYTVt+XTKOSld+wTFFo6fx\nScTqRCH0OL8SwygCIkZ87zeKh0WXs8pU4Dqds9UTR6Nd7eJAuxS6i3O4/qu5\nEVRWmAIosW/4aDDzR5cAxPqIKm+KGCia6RFzSKsixOQ4pICknsYSEvtrZxep\nyfMUudCyW5VCLiMYIf+/PfXesBKaP40Le6sUJiU56NjNHFMGNi8Ckie0Tugh\n1/BwsvgNkLOTixYGfSGzQpxhfFxYZ3tWRC0K3NBJANCM2No6CT69ZuzjWEzi\n7T/lnC8JuHuzAzpq1CoF2Z3r9Q6LHrZRbpwKvIwvo8bp+ED5KdAoklPB+oYg\nMEoh\r\n=ZvYQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVUi7yXu7hVN73guidWV8wJOym7zgA/rO0OuqVQxUQmgIhAMrOAe1M82+gSaLhh8dtA64hrCBinoEWUoclQ3pzf11s"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-13cfdab.0_1561045906799_0.7362173093935973"},"_hasShrinkwrap":false},"0.2.15-761f148.0":{"name":"graphql-toolkit","version":"0.2.15-761f148.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `Resolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"761f148cc19ad4b1fe4849cf6d4f4bc6fffa9f38","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-761f148.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WHbAQIsaDtVXVvQxRuP6CTVDxctSuaEWnq7mxPzsozaE7qhmXMGQLvE54Cbs2eiZYcAafRKWfbHVdJJPy2X77A==","shasum":"75e9db8f50055d5d0c570b2633f40beac6a222f0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-761f148.0.tgz","fileCount":269,"unpackedSize":308997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdC+aBCRA9TVsSAnZWagAAQ+0P/AgnDxFauE2sucJ+jtpk\noB+Ss+jdYsoGqpUu4kYMAkvLV6mbSmha3S19vGfvx92ppufYD5xZPO2OdBjU\nERAA6vJklIN0hlLoSImcAedQ3YM0fuAg+6WuLt5WeuTCaCgTYSE4weSbDWky\n5PbyCWkJOVOXx/tcmQLiWTse12zn/W5iiKDjF/Grbf211vv+J9t4aHWV+ij/\np6eAqLC9aVqEnqF8n78sVCS6DqFzMdTt7Y4M9b+QMQYy14ZgMy8BAoaoJWam\nZf8HksErVqSs5iEUHDXgYyaLIqVN6b6wbBlNZgM82v31hMLm6GVdHn7aHa0O\nk9Bo7I8gv59BJMmnAaWSLDvdX55JEE9knpmFKT7JWs/oUjl15lplk7AIbRGL\nWLBrM/rXCDur9JDEsg/1iYYAY/nev+eM1JK4V1Wgg59zrRP+GfBN2pRJjtyJ\nAUN5h8Fp3zjkZsoT+kS8gsCOLIHQ40LNlYFMD+mrPcIu/0ZUCYBPEjuu+jrb\ncC552IsduYVOVAjP7FSTCok+TGORvUm7rnD6Tf93eezGKtP+rdKnBlYx1nu7\n3yJPuk4pBuFZf+jvQi+2e8c85wwTNYKy+VWILs6RXKx1wr/P2OohuUUMj8jD\nfSPJq7ATLKb1i8QoNef0M2qPe+D62lZinp6P3AQV0HtzINTuHPyH10fo/IFW\n/1b7\r\n=xqd1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0vXEo3q2OmLXT2M8mFWnlDtKQAMuB5xo4OPyu+vZtPQIhAIZVohdJ3G5ev0HdmgVcq8bakQGpvRtytulyeV76Ditn"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-761f148.0_1561060992672_0.8189044180126344"},"_hasShrinkwrap":false},"0.2.15-6511eb4.0":{"name":"graphql-toolkit","version":"0.2.15-6511eb4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `Resolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6511eb4bd0840625b033bdbd85e7e624e389d2e8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-6511eb4.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ckp6w+0lT+gVGf9LAC5NyqkYgYcqK4s3d5aehqPi8B5pSwPsavC6KG6jptwvTj5VMxrIZlcHlAhISs0veDB3Ww==","shasum":"c74f408e09fe0b606514eb827ade775e362d65fa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-6511eb4.0.tgz","fileCount":269,"unpackedSize":309001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdC+gDCRA9TVsSAnZWagAAMBUP/RB8mf0srdwd+9wpwP/a\n57ktivVf+M2c5VOkj+ynHx1NynbS9mndo4mOxH+XCiei4n3tjpbuCyl89wwt\n8jgeYKUF2gREvwMFIr/WEh4sOSq5ZqvXeGXVf+VdpN6bYKlaQAmBRBYHp9HN\nV4k804/NAkFs6gsJ8iOfznwwaJn8CpIdflW6hAGD7hhOYjOwpZl3Rrrn6xdY\nJCEu70sZ1t08oeZYTLPpVmqbdm+gBOFp13PiDZvT+69WLVKb0Nvk9NQFdi8T\nTMuCY+8JNTSzk6ToNRoNSLH6eR2LfI6mDRpM9fDok+hS0A0O5bC/8O7hCrmH\nQN1fBlOaGl0jnGDdc59AlE7y7vT+lrhyt+1au0hBM0uydMc2+OAOdYH8i5A1\naXoJIDq1Wyz7/6v30k6ygbO8zNQ6UNib1AlmSm254PnFTvdu+D0mqm6BIrfy\nmv5oKu1jenZ4fLpjNpOHkpa2rnuttJeljQpRlxeNj2mhUeiecsKr9pHDiQ1w\nRgMJe+i2HRhTP47dgzJgE/iM3EwsQKEpISkmHwJbI9wmDjb9Ciwy7ZThMwiR\nSfc9niZPMTQgYapu4PXeLmsZr2kVOJj+9DcJItORdsdAEEljqx84hawaPMnn\nH0BIsfTKBNTPH6+MxiBrNKnBJhH9QGHVEY2OQJVhfjS3zSOYM+YqelPsRq3O\nlEsZ\r\n=1xP6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHapK+nTQTzTXGTWXHjZPqU1C19znAxpTjrS784ZQpfQIgYIqdD320JwR8aWs8w2rbobWxOwoP+aWlF3L6v6cyxTs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-6511eb4.0_1561061379157_0.1345145489821018"},"_hasShrinkwrap":false},"0.2.15-9d48153.0":{"name":"graphql-toolkit","version":"0.2.15-9d48153.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `Resolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9d481534cca7c8ced46178a9a76ab74d52497424","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-9d48153.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-o6+UzPfZamH2CF9kIDy2nyv2Tk6JgX13jwcJueUFAc443ucQXk0zv69C0ciW8i2AmDpLKzBUD7ZgkyZvZeRJ9Q==","shasum":"b9bd032fdb40513c8a84c1b58c6672c886867fc0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-9d48153.0.tgz","fileCount":269,"unpackedSize":311399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDP8XCRA9TVsSAnZWagAARGEP+wajmeFQksatmjjIDttR\nUylsbLdOmhEJiFwNjCN78duN7Kgv1PPYl9OGWP4OpJxaj6NoI/wlLpXyVajT\nHwsVnpIHoqLyOlPDwGaxdhLMyJZjzimQnI+CNE7O5ARyAELPoUZkLQEGTmgI\nMwi49ERKfjVeSoSp4D0XZdbs1cQCrpG5ss9GpemgHXYrOPdRIh0S3qbGHb6v\n0XWOrGCq9k2ht0feT0WQRJvm6Gl1DDjcBX4W3c7tcLCSrLbP75xY4AIHFMEi\nO3JqIeLFPocCholYZO+nk162tMCQuQifVFJYti02IURcmfIxjX1JsPiUZb+o\noaMefPYXQ0b7We1oSP9PBMuijtSRPmYXNzkCfKkEF5GxW71MbnNW0KVoPQi6\ncmzobBRoZ1T0zRkBy0DdUcAZQUHC3ZPskzNxG82u4aEnsNuV/ScN12v+7WLB\nUpmEKIe2L7AvpgLXFH368ji+jBB5hdAebr8jBfwsAJRdRKW8o9kVlySu1+rh\neLXF6v24C9+8JcZc9sC+NkUx6wHc+e0dUIpAP7dLMrNgNbW70hvpMyoS8ggX\nw4dhvpnTBqLNyQgR7s+xlH0cN5Dgy8DQigCGWh9Qi/i44C4UvTVgpSoad7yp\nr+yUTbaxpFVQxzwU63x34SifcIPmWfXf4qEV8w9s3MUM0hy/Ka18IK3bz9FG\nAttJ\r\n=EwLd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH22EDZkTyiZK7i61BGCDKpjy/gmpaO/EjbgKjpTLhBgCIAgVkTvNQRrjXQVPMV5WljwqEV/88B26CMasZ6t5fpCO"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-9d48153.0_1561132822459_0.8958317717528554"},"_hasShrinkwrap":false},"0.2.15-21d3c4a.0":{"name":"graphql-toolkit","version":"0.2.15-21d3c4a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.1","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `Resolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"21d3c4a3b9a21df91b8ae4c811017653e5cd1953","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-21d3c4a.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-o6epG1BVi/ALibbUfsrZgOkaLIj/jFcG1EDdMjYubVzTbRVJWS+Js0Dmx0SUi5zLeRmC0Q/uIIl+WT/YMHproQ==","shasum":"5ab75dfd670a21a7090f300af9c0d69fdc499fc6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-21d3c4a.0.tgz","fileCount":269,"unpackedSize":311811,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDP/PCRA9TVsSAnZWagAAziYP/2NGzm9fKBKx1+185IPX\nL8hnEyLByQnlmHHw2mR7WZ/NJHkdvdQiQ7Hn1OMXcqfBld7q9rL64//dXuw5\nO7bTWZfxqZE596oXMypMNAMs29Sf3IGZrZh8GgB6CRoBJNztwVKtvOcrCvxA\neTJSKMpGzaMAX4mk6T7GkhzrEtsLXUbkPTTop14jaDEqb/0LTH9oH23v4fRn\ngTPQ+NvrMS6VDHGcuQ1D0FRagYKV9i9HoPyea1Viukc5gpBngpf0B/awK+fI\nXPJcV+R/sv7DZS2AEPxjXpjHA+pbNRNtQ+b+t7/U5oUfhB+Sgn669hGqwed/\nog9jp5Iz+YyUp7mLqmLwlwcMrigohj60xGQz9liVHl4QnakYiLANOdiK3uYJ\nwq5ADPGsFzdzYyC0XAFhTKXtwDE5tvjyHxXVzK6QzuU/JGrpC6ZobnJoum/q\nduWbVylVERg+5PtPmQmx7zO2PJWVIuOF7khx9wwBSqD4yM5yC3v9RlI7LsMf\nJ+ali/YZl8A5hVadIrVFBAb8jgB2OgwlLHBE/mLiJXd/TRFL5JnsECrlJH8U\n7qm6wBXEebwJH5uKCLuM5PQMVJ1aqsWfUlN/BhS7r326Ur0vHClEGuXZcRa0\nfDQc6sMYDlmDjc0aPH6bBEG8lqQ9qaYnUesvaBDe+TQo11/fzlQiczp5jIG+\n6eip\r\n=gc+a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJ2Oqisr/LwjUiTRobdvPSgDGcu1MpvdYHuGCMAvoEEgIhAMiEoGvO/TbSYCho31HrJXkIbKpbW295A8/Pui0cyPhL"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-21d3c4a.0_1561133006525_0.23288578822184558"},"_hasShrinkwrap":false},"0.2.15-ce0fca7.0":{"name":"graphql-toolkit","version":"0.2.15-ce0fca7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ce0fca729daa7099f88743b4178735e58c8197f1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-ce0fca7.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-3Kh9OkB3q40gOMjQDxN1NRXZUgjKDesH3xIeCAh5yBCRlkKv2vHtGzIogI/dKdCsXYTnkP71Fr5xb55h2TU99g==","shasum":"0a9a4c2697e11f4a9a84e5be30557ef0b310b993","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-ce0fca7.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDQk2CRA9TVsSAnZWagAAZUkP/RsYVQEGw0BCxC0OAypK\nE92x0AP1v2u6AkhtDDEKEPfj10x/A/hfrvDupNs+UrdUFAddDSLUoZ3WLfIq\n6Bl21O8d6lFznQQI6xh4nO1nzVWL6xFm/SYUXrTKnWoI7+KXVtVaz5s9ijn+\naHrLG8Q/r4DHoxT17AKoYenuRQANyO6VHbVaHgUIzoB+VZuafxuudQ9Ct6T0\nJPIgidt0h+dWYI3rWNRnztXDhS/+A59spxpYCxscwnjeTqabsI2xmLc8kvk1\nXjAb4I1J/z5VsZOdfYhSdRqgZ0HGrgq54g2bksLarXXwmeJkdd0T2y+oH13H\ntLJsaDLKO1eNZEGYgyre23y8y0GcSbM1Px/oBlOh+pPhpJQwJ8mOXO9dt+Ov\nhDIEgCuuoYcWopOlDPRM5vxvfHr0uaqTMLoqz5zz73apo27JN9Wf6RIocI4t\n4Y5UmZozxrzyOEZEV1+7teCMZWIzUmPbOphcF0ecm54LKeiaoZII/7fyNSlS\nlfs56QA9HnphcMDCMg1FyaMwJ9tzk4KDIf/WyvkXjJ/gMEeVs3KhMWnKQQ7N\noj3ge4j66Rwpf3wKqrxG/OsyCWPbSLCR1AuBr2gedKFVOxawnN1RL+lOyA2Y\nnmwuVWWaizdYHmzTvJ/Cu1mLFj1sqTyLQ1h900KhH0GWkQgZ5V2O8xSkMCch\npOeK\r\n=/DgC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqJFHr7+1T5YXyHcOdz2RnQfUCJMvYzGTUP+8bTeYXtAIgSR3rxyCm+pu9lmKc0rrJULG2uBRImxd5cAc+rhzeNyQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-ce0fca7.0_1561135413555_0.3713314854175034"},"_hasShrinkwrap":false},"0.2.15-b2d7a22.0":{"name":"graphql-toolkit","version":"0.2.15-b2d7a22.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.14","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b2d7a22be6b037daae68b2133767f546bced0887","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-b2d7a22.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Fc5rv2K3W6QEeQ8+xoFwnKnNPCkKe5LylQqh4WZGlKEhAccKsNz48SWPK8/3jfFIsVDwoW4dWAZrx5NThnvAAw==","shasum":"f0111c3696873bb7ca210cb91d0a5959c4847017","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-b2d7a22.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDQk/CRA9TVsSAnZWagAADikP/RRPk2u8H6xir6IzJZmS\nMvpMug7mmHftSi4jB/Pip1LnBSwMsZpIJHUQQMwmel2c3mzYCX2t/SOhiVed\n0ixgmvdB358Z1uk9/DX0EiSfF/Ho4NYYUrctNPlnzTyDvxG444fvJZNvPo4k\n3vXGyTYnqqXt6zraMMUxRqR62f9gYFsQiHwIGxDlmj0lJvgp2DT4MtHi4oaU\nVY4GUTB/ZimPXo1pTUwLFIsveZJR3C6kY8o9JfqkJM4d+KGSSQgOgyw4yFj3\nJTnUxiHF5QbyZSOUK6Ch/Ahf6Fiubzkow7C9BVlIX94ScmswY9JeyFkL/XM8\n3nxE7rS6R97axYRggua7SbuuMj+nnS6rbeNRyOMdYRLWcbdtWstLa7sEzoOM\nyOWa2DX+6WqXi7bDNwybymQccOFd1riZHdk8XtuCZi0H6H2eoBtM0ZsSsSv5\nySJcCqZzUi0FSzxNRjTYGIwC8vSROCiw1GYJs33Je+RS//EZbWLRvop1dZ/6\naK8G4klrXe2GpQCIod9EooqYi71r0MkibOrN80iGe0x2dlmF7WYEZy7Tnzc5\nSmOHSDsSB09ZETpxyjVbLNBJ+vFOJAF0gHoDm7XtPYe/3yUD8rUJkvUGF93P\n3oAAOA/45oo7VbA0JLLuzhH1doR0gI+zdrOs97XJqe7EIKnQhLpWrAGFCCKZ\nBfid\r\n=fasH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF0p4yGd4HcCiNKOsEMCDEjxZuonGJ9hmJLVaYyJerDzAiEAxeETbNtnZ6kUR9c1gi30PC4LHpSuZ2bD8w6egYTE50M="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-b2d7a22.0_1561135422549_0.020279928596187657"},"_hasShrinkwrap":false},"0.2.15-7f6c5ef.0":{"name":"graphql-toolkit","version":"0.2.15-7f6c5ef.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7f6c5ef009ebc3afbd6b85434b4ec12fcbef7997","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-7f6c5ef.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-aPtqhVWkVdPtadSms40G8RFbhmS9p51rwI4TezR9Y9ymwTgInmdXrHizQywySGUmx7zLIRnNHtCbubb2E1UusA==","shasum":"76479e7faec5b0519ccc8acbe8257de4aa876ec0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-7f6c5ef.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDQlPCRA9TVsSAnZWagAAObIP/2XdyPMEKW2KIHOB+CyU\ngv9k54b97XIITCM47mV26IMSZrii7HDbjueWsnUU+CGBJr58vgNCHHSbMdYZ\noK/UqhmEbk9M8UnFfzo2xHsCnglYrZ2bnoeGa2dalBGTEDSKhRAQmN3xuZcA\nVVqHsUDb9gZG+/AzpFS4mM52xVCKTeTdKOSkLxSnVt/nP7s3xYtoeMnld+5I\nfATo00Zoq2NBEu/n+oeG6RUJI92scofVWaS8E5l4bhvakLaaPCmXvoE9TomU\ndluUn5Jh3kj8VK0a4j07SdXhLjygO3oo1ikahx5s2gv07lJcPfg2YGR0LXp6\nmZiYIxzhK/THZSrC8GY5vEh8UG2u6BpzlcN3+HzDkGmauSqZc/Uhq4xTkBxv\n63mSdYCPHeAXQfjoZB1Zkqr7JbLdnQrj+ZxpryhZbevQRlWAO35NIkW9yk7H\nXjE8xXlXngSK+T7zK15qirwOrIhRM+a4kixy6SrEqjC5kdNdigK2hsQ8ccWu\nyZLzlhvD4bctj2oHpH66ObdomOLtUQW3dNP+7z0R8tI2NjVdGRvUxGqxrdsK\ngKTZuC1JeBySTL+1t6RRklckofVzbh6bBLe1KmEHWwe3e/3dVb7LW0q8xFZ8\nI/w194nl/clkk5P2TgI3LYULP1luL1eHyxXycnrFwCFZIYVppZ5DNEDsMGC0\nSG39\r\n=VDxs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9MawO5gGJGofrjVvPUycyzdV4Mb9nGKV4IsinVV+9tAiBC2qf/iypjMAjdgvtpdV05RYdvP2ADn3lh6QWQ2mcBIg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-7f6c5ef.0_1561135438460_0.295153852621562"},"_hasShrinkwrap":false},"0.2.15-8b031a5.0":{"name":"graphql-toolkit","version":"0.2.15-8b031a5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.2.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8b031a59d07a3791a4784c9ea82be00e694a8b2f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-8b031a5.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-gU4aZD3WhEVclwX/anBLwmdVFswaQt4sUeaJRPIyA6Csktnbj/89R0WJj4agP6Lt804mIM6GmSm6acY+lhGmUQ==","shasum":"9c8bcaf5fcfaa68022ec607aae81b93ba512561e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-8b031a5.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDQlUCRA9TVsSAnZWagAAbsMP/3MDN7e/EeDGOAE64xuw\nW7+IE6rSuuapmiAsj5JiRHNNBl99iZuogiW0VGaJKkYbB0DFqHS7K4kk/Efu\nHYXTE3gnJDgvJ5ZvBjbBaflWdevZ06xt2RrguetA/rn6HW7knj09Rp8irniR\nQck9ySptU85Q9HWU1zvr0YrAt5NzeA+L70xznK9Tc6VtQPby+DgNtLaYxf0o\nHiWmrztwktzPlz09ke6318ToP6o1mPK9BO2YPbcXmlI7nO6AFl+mrAhdcrZF\nq7xPuIppZpwEdOVMMneNzfmc0Pu6i0hM5uDJCPB3qP3P3AVfZozOWL+bI/ml\nEuNoJGoP5x9llWbin1f1TUr+I7qL8G0l3twpmJEWoXbdu9+E6YShSrw3gdXw\nvNrYXkFwf2o04bBdgZEsfGjc4+63TzSfnjO84o5fKIWRj0ffEmZPt8cj01gU\n2bqcJCecgyVq2TXAuegm72iVblkCJIfmcHTjt2sVhAYhzN4hENzeCBc2TkpR\nDd5i12AQOs2rA28Ugiy+kZQxbUnShzQFJTtxDar0D0DVaKb6lOSlLpfzEbfm\nWbMhHYrva2bCwjsbww46Dp5vSCiPknFhOA5dEmPTNqnAnrYJjxYFaZCWkTi8\n8ZldonZAx4UZBTg7sYZw57E5lNXVg0+DX1rzWvVqcWk5BpOQDYNAfo/HC1WN\nRcsv\r\n=xHZT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICgs254LIVnM0/qryRVRsrsLtPjTNiuUYmhCBgOhNpmvAiBFRL+Iszk9uWCcmi2ScDxJzv3l8XYqix8Ws/uNWUsQoA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-8b031a5.0_1561135444138_0.027703509419266137"},"_hasShrinkwrap":false},"0.2.15-38949dd.0":{"name":"graphql-toolkit","version":"0.2.15-38949dd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"38949dd335d6d8b6888efbbd7a5fe8650d967aaf","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-38949dd.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-miavDtoBV/G0ppLs0NkmyLUhCzCcFkLjQyt5WkGC+DZae7BqqMTqrWFy31DwL6pAmubdnGi5HytNn9/p8niO1g==","shasum":"433a30857a6735b64187e1393fef356b6e5d6754","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-38949dd.0.tgz","fileCount":263,"unpackedSize":308172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDQnTCRA9TVsSAnZWagAA0fkP/24PaWMsn7bujYKg/UW+\nM/d9Rs+rjSbzlvEJjZ31+Kj1KB6ojpNBDm3tUMCCGpF8lvWA/lIoeIKwLTwj\n+5FAFZT/Q+BwaVSq7kydwh0bqSeuWo+v39+h+WNbyHWLbBGcEcXUOccoliej\nhqRZTad0l3Kk6XPmNTNuAdljajQdkB9AjqV8M+0+Es4UIRK7XA7BDdDi9XS5\nGBZRLcFxfe9vTcOIi2GQUeB0K6YFKYaLCSsTbqna7l6Q3u6vRf8Zt0W0Y+Eo\nP0FQXIFYpIDOATxniWerrHJNCpTz8LW13SETYReAGF+xsm8XDdovCcqpIM98\nKt6Hm/jCHfW3PuBxErhOF7c/6CRjj1YHaI/91HZW8m/Yv2GsizJybNjXReTY\ngOfIcauVpOl05ezi1AZVYJtcMox9/UkAMaTC2DjfW0ITFrJ40/IcC/SbHL15\nCWoSiNx3fgzKt7Ie30MflDwGMkSm7l/J3KPWORsQRItDzdBBI5fBg1O+6PBD\nOd5+EdFLLTPNXcdRzCgPaAGtBDzeEa0FmUiJkE6xyDajPmYiRg6udFa311SU\nweNmHv7c0o8y72iatlso4l9OBD1TSCwu4muKSRka+Ked9fFCBN2TuBXCG2O6\nhVA1t++Yety83odaW/vdpVux6NKhWHAhCWS5PPJQWiMXPB6E4+Qy4Hy4Ic+A\nlvLs\r\n=u65f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN+YPsen4J3yoADDZ/ph1+GyT+eGQkI4UfArz+ZhreiwIgbKKlwgizwy2z2Azug3g8X+czOeiHIWwAHOYQALi3wQs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-38949dd.0_1561135570481_0.6583377531920183"},"_hasShrinkwrap":false},"0.2.15-d08bdd7.0":{"name":"graphql-toolkit","version":"0.2.15-d08bdd7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.9","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d08bdd79392d77d16180230672c93080b38d823c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-d08bdd7.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-QEwoRB7GZWsyOs78orYDQRGTEyXfKH0o4e+Togc8+pApVGyw4kFoQ8cFSFR1HGLUv7uSN8oUSWlYuaiASzxfkA==","shasum":"22565528e58da2e82e9acd58285727d1470eebe3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-d08bdd7.0.tgz","fileCount":263,"unpackedSize":308030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDQ/0CRA9TVsSAnZWagAAb48P/3+CzmePGX/T83q5EfrK\nvNK//YHjBOgRRMqcZmOGvW2p+ettubmt6WCRMgWotvA2f4GVdnMi26D6yGdu\nJy/P2JLak3MvLPQGQcP/nA8RffKtErz3i3zD1mHm8/edzegrOjETeOh5y2xJ\nk2JciLOn9HiVhNFpc0wTAl2NpjkgYTYhCg/faTdkzSt9A7h4IGByAO4x5Y9s\nR1m07WiWMHCyBd+EER1MVcdvU0tYsUzAlw19CKXK9hCOO7UuCcFKJN4YedXd\n6DfyKygHL2FLV+qCiwMO+L0qEzQir5iuX6w3GQeXSAiNMeVP/N/v5BARIfx9\nMkmKs52vI7FEgl+eevWrScDlbWybZGDIM31bIxfB7keqZ93Z4v0HjZKMFHcv\nHNiObFwHLoHWSqft1FX0/xvX329thXBEv7fldxptQlp0QJUWuhWo/5TDLAmB\ncaW/QGAlXNRDqkUUxDoeeYUcshju4TE02N1mYRoPVNba2OIZyv+wrwSOqcpM\n6/125H9XJdNcmRbIDmMaZCqL99e4jfP009VxBypH86/0jbxoDH5zg43pqt1K\nUW6qdvweSQUTwEj0jPYCXahekUqRffPeo2GuBxlITqywro9ADNmPMkmtwdqg\n3R0k4Hg7CCnVrjs1T1vFqXpqPatKr9wpGRhu3CdWiGBcASozKwskH1PC5yuv\njBDk\r\n=xC0P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHkAY2kJM5+Mex5auULfL/R+dINYRZYEi4dri89MzfqhAiEA65nc1KZxN0x3S+nndNl6cvD9dfPpbIFNk4PaYwR4paA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-d08bdd7.0_1561137140130_0.004976219155842454"},"_hasShrinkwrap":false},"0.2.15-e72f6d0.0":{"name":"graphql-toolkit","version":"0.2.15-e72f6d0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e72f6d0b9644eca22ba37c85b42da0adc2fd086c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-e72f6d0.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-1tQsVCLCJW8agIHR7Pox/HK1v1MM6aQp6vlFpxlj7DaS9PTwQatya5Hk68ygPOkJv0ND/4bRdIbMbUCvkqCWDQ==","shasum":"d27aa835d1907ddf109c1169ee78a62ce04baa49","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-e72f6d0.0.tgz","fileCount":263,"unpackedSize":308173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdDUwLCRA9TVsSAnZWagAALFkP/RtmJbBH8YWu+tbHxZrD\nOU0qMXkDgwwDdm8Q8muWj9boVAwmA/ox+ucB3q8/jk4/vcT4/O9lFfsIhT9x\nYjk2OHD80Omz+PD5llkY2Yk9geNq7vXr50ZqWLMXcf84TTMABIk6Kop2RKUj\nW/RVqhm0paxXDvRjJBfPD6GAGiHusRUNR6JIsBZjJppSpfOwACx0DOQiVhM4\nnlhBvH9VYqUVfBLgDEOa+qw2h8nH/fXGRtTrvSQKfcavQ7Jwd5khAjj3psf6\nfcDqsPLviEbBf4V4KfpVdiUmdUXxAb6ZK4e5JORnJWKftBGz1V0kkYbg9lM4\nCCLsxZstorpTmQtys/kEpDkcg6MmlJMZDbT1Wg06gvj20TMIJI1g6PX8x4X1\nNype16IUHStbZs4Y2Rc9WGbr0ce6Phw9Ozup2DviqEcKih8NogCU/30o9Q0Y\nr/va/DbtYo4TmocGzHMTPztcmgr0Rqaw84i8HOZUXfMn+i91Cci6mZJVye//\ngK5mH2juEQsL6Qjw6W/b43usaYvV4UixrXEp9Cp7Pkc/gC0r5ZJU44xcOe5e\nucX7rY6K2jJWl3qk0nV4sIJZMGKBg6MnJnd9GBsLAxJ/ngfc/NjoN50G+htM\nXZnvrKOPKL4WQ68jRjkkXk7TxcDxOHtsHjY8Ce4UkWgXm5KHrZ8vZKwYU8TT\nmKGF\r\n=ZmBv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4dqyGidWbR5sLxDxKjaS29Odpg4nan1TCaTqxCucfpwIhAONhIih0MrfLEx3+qbt2ENtol/ukvyT49eg9IeV2kofG"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-e72f6d0.0_1561152522606_0.794164756683589"},"_hasShrinkwrap":false},"0.2.15-44568ca.0":{"name":"graphql-toolkit","version":"0.2.15-44568ca.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.1","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"44568ca65d1fb78b3265c6d1e82561ededb39757","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-44568ca.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-eeRXD9ep2X0fJ+f+ppbkCdpuAMxeaaWBVQ1pcdB3d/C9qig0qeydoa6EBz3KzaHkYh3aGKfFQxNQ8dAOyXoJrw==","shasum":"ffc9c781329e96099207abeba33245020512b7bf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-44568ca.0.tgz","fileCount":263,"unpackedSize":308173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdD0tdCRA9TVsSAnZWagAAgGIP/ijl+U7WAynZVMqVgKLT\n72isRpI8Ke1Wgz5zpmMOcG+Mor4X8cWZSg7abjiJXuLQxTEtlAMjlc70TazF\nOXnW98rpp1GsF7rok8RQ7C+ge5Ba9fUhynNQo5mqHYCAovPqId+ClE/jPvnr\nxacP6x87B7YxqFcKqw/47Dp8vthPH/EI8SM09LdX5vC9Uzk1xdNZjO0YAB8p\nnKAzJ9REKVuJuOlzSXWFPf9tGWrTyuNYsPPtHVBjqhpWSCBsrFbBNSicRlDE\nq5M6ZgOxOw7gLEHosrizH5NwsE9LTJLNVM/fmxiWnBrc64HMx0tW8SI24Ppi\nXkzUDD21uCu+LftWZdXrFot14YA3C6twKrPzofJvPnYbnY2WlSpEg76aZylY\n52bbJmw6r9JHlKoY/wXy8Vidj1lqc8EQCiEwW+A24pC1nyu1sCiqKdNQyIUZ\nwk+ObgXLcNmbbkZmN3d3eIPIt8TP7VMkNEd2zG8wc6k0sZ+GSCcud25ns8B2\nRhzS2HHxoD8/pSLVPuRlFQ41BIcaUFTzggFUCw+wK1M7a85cu2XEm0vLm09g\n190qO9obrl5vFjSN/7sOtZ+lj/1b3euFtfzjLRpYR6lANsiRlSyBBwY4Jk90\nvVfV00RcgJe1dgwbE9Lh/G70WHJEL+rmjwfzXedZ2/CcQD48h0e/291O3xuu\n2l6q\r\n=WYYq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH3+WaYj43PJfPLTUc0fQl9vdrjbVH7mXUTyBE9PxdJlAiB2K3OvbacyLqpJEP1cx7qFpGIjYV0lc2r++fxsQ6WPSw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-44568ca.0_1561283420394_0.7386045639555019"},"_hasShrinkwrap":false},"0.2.15-c3b151e.0":{"name":"graphql-toolkit","version":"0.2.15-c3b151e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c3b151ef3cca62247b9ef93deccf22f88eeb58f0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-c3b151e.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ybaagVRGGDBl/8ZBOtySemQUG2Uu9fyHOdmR5QPhq8Ejl38kxi+TSkfRjaqAYnP5Lqi3JHlUHOO1hviWue+PBw==","shasum":"404a5aaac04f4bd39d7f0f24112556061367e7aa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-c3b151e.0.tgz","fileCount":263,"unpackedSize":308173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdECypCRA9TVsSAnZWagAAJn4P/iIA8EvT50KNXJUuajN7\nLXRJ1iQYZtk8fDiZX7zBXlfKuPo06dy17hh9fNqVVCT/0DXHCt/y8HF4YCu/\nExCWKYJNFN1qNi4eXKIh46sGFyTjxmlBNGp/F5HUeh6hpoC/42gM7iIV1O0s\naZ7T/AfVWSOIH3G5a3i8jq9XhZ8gCceiapzI5c46itXiAyW2gNIc24OFD8fD\nqWOfCif/vxQAXem52+/nNkWRyBip+XSKLKt870sLEKQdvJvB/i2WNbtd29P+\nwkMIzrLAM4gVgfvt4YFoZpEgobR66Oe75tvC1WxSjT8H67Ttouk8ggUiADHp\nCLYUGtBnIXy7u0k6hIur3Dvbgn8IXymsGyaQz5wgFk9KyZoZycPmRjVhiG24\nop1PU3dGemAIPBreHaVx7RNr0RopAlBOoM+6+qf/bShx1LvXlysrRlLKJbC4\nSWmNpWdXOr2BrMlHsUN0nV3nVOFXCc8yZDnEGiEifhgnkoTbO1wj4P/uPjp1\nOhQYBVZeGOcAl+JkvB/Z2N16T6uWxRp8BxNoDWEJunPqdlchu4CnJTPWFi5t\ntoOGdutVn8IUB3FP69Lod0lI9pwoBI38vdG+QEfJhQEWvdA8CU+nSQc1DlDL\nBZaz4Vzo2zaGcz5CjGwB6H1mhcX1tk6dMpF/TUdZyUxcCXajb7tkqW7MDGyZ\nal4g\r\n=lua7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFOQifIow4a90TOzcN1K2SqpwOsRBgQYQZe32Q8Sak0uAiB4nlNLOl+u9gevGMYLENFj/0eLzibKDGXTNYp+Mt1Fhw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-c3b151e.0_1561341097138_0.6684433486046542"},"_hasShrinkwrap":false},"0.2.15-38d2cb8.0":{"name":"graphql-toolkit","version":"0.2.15-38d2cb8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"38d2cb817de6212f96330b855027df4fcc9b36ac","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-38d2cb8.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-RTgYpxpEVsEDpTx/dY6ww8m/9vMRpqhkcIHW8SDdG3dIkzyV7ZoACmLGs+5tBXWav0LLCby2XvZzqf31FIfmSQ==","shasum":"807c2a7b2737601d662f452cd90fc68f29c42ab8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-38d2cb8.0.tgz","fileCount":263,"unpackedSize":308173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEGHhCRA9TVsSAnZWagAAx2gQAKTwF28++SV/Zgi9pJS4\n5Xw5uF7V6Nyy8OyZzrKjZa8GuxMc7iQsRVE7/pHdfs1BS/SmtCVE9P1yar6y\noCt7J9YsC3mv803ovRxaTgBv83qPfIWuXJb5IGx7HkQwFiHRRpDdERiaCvn4\n55hn1TVMqzTkGbptCfxZ4XWQiuc1YjB8wCRjMa4NdzRBceqxkRSC/MAIxP8m\n4jQFQVurn5fn6y5za5SrM0x3Edqz5LCGMXX6YWF8VAgdXQZQIAQw5OUi8Ti9\nMGTqxpQdFYrwwwaXDzwFo4PFg6nl4BljUh2qQBbhLdQyc2GCYmj5Oo1DCaEz\nV3Ub9+P8yMei1silZvC4FCS4AEyKOTGaUsO+kU8RmpznYDrBIGWO7YsLBUmo\nEylVUFaVRMKTKD8G2TVUEtRYJkPwsVXDc1iNd1BpQktWZeCx/jokFgKDMLPV\nfo2KYIQwmbzExF4+tm/712Dcnwh4B7QhiaoGBeTF9JRCoKnaFlPGEaKiZziB\nVU0qP5SL5O4Gm/lANfoFv9M58hzDLD3f6jvcp/uRTMDK/V7va3bWqG3pBfIy\nXdtFycHe4jIGdGR9UNLtQ95DAs3gRfofh84DkweG747DyYhDWMVnq3H1ZLRy\n26CMWGZm/ypVpCHw/xXi7ebC76rDfvh2V03UGus4ARsxgtueftvmkyGrRyrb\n5bYX\r\n=cCvG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXXcBtcyLciSyCFaDOzzZ0YFvtEwY2vVaxv8/MmWoh3wIhANNUEIOKf7WMFvBfvZMs9WQJBbGhbun8nODOMgk4Mdq8"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-38d2cb8.0_1561354720941_0.7105280663210802"},"_hasShrinkwrap":false},"0.2.15-e1c814c.0":{"name":"graphql-toolkit","version":"0.2.15-e1c814c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e1c814ca0d0fb5eedc6f4ddb0c713bf31e77a3d8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.2.15-e1c814c.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-HjgCKbn7iOsygbLsUIeSjMQ0u7+LXfpBzea4ZEmNQXkRBU7If5/I2UK4IslQlG1JmnGJ9dUjHu9XGcwTXTjkBA==","shasum":"1ea1909a17a78c04ed4f4c9c0779adc13912486c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.2.15-e1c814c.0.tgz","fileCount":269,"unpackedSize":368854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEG1bCRA9TVsSAnZWagAAvCwP/j2qmkUokVoyt5N6CByQ\nWqDsLiTS2WxtrMLbdzcqZskygC0k1D5cAQswpzC3NyH4J8O9sWEBB+Vuy1b4\nCtqOquLVjdb9J+YDUFYovvTT4NS0TlaiXf/236+fRERVkKRiutheMqVdHrVI\nVGI2hhieKKkw5gl/FS4Ds6rflBipSsECkcM3b65KQvkDXj8CANqAba933A/e\naXQ37gObH1jEB/VFzkqN21gtN3Gf5AXueTZxFjZf5VWIx89gibh1NV/LWzG7\nZ665s0MGx3jt/C/8KirbFF+Axr1Q/a59DXfBkCs8KvarZSZAg3hNVMgrEHV9\njO9nZp/S4CiPw3tzD8honYT/SxDuuarwOkVKmTE2HstB0WTUuyshZhBeanPI\n4EumoTcqrMF4O0hSBo/5HAyNmNAj2uzpYM1J6HLs0gTU+fPPVu4fqhmiC0/W\n87gDUmmHawSoAp5lOku4GC9BrUFDMjLDuJ3ZkZ5aNqinA2cRLlojvHNE9qcu\nXL7A/04QS1kVxONJ26JWvvq5av2EkG5THiMU9YTxstdZNLaja3/m4aOt8A+S\nCKgm1yqj3rtN4ECy1q58ZRU90k0V8t4wk3fllXEDBtkPasTxA3/qCraNQYRb\n1c381Wj1sSb/R31Jd7SodnxqCdCDxREdPbg0/Xn+4HWxxowpV6SwT/fqwzMs\nr28q\r\n=UJf9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBUlgf5CboUHNYlj4OuZrMz3thL6i7FiA9dUiqYFLpC/AiBur1Q7wY6uxNLn61439/QUMeGiQblsxi4x04kET0/gAg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.2.15-e1c814c.0_1561357658935_0.7184016322000597"},"_hasShrinkwrap":false},"0.3.0":{"name":"graphql-toolkit","version":"0.3.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"0607cb0e30d811a008c26abaa56e6f339f0511ce","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-4ikecqnmFtr8UrKgbfA8UD4DmVnCqVHEQSPFb0BhIAnqiDiaY5EGI9fa0VJQLGCpBZYwSvaW29hdu3jI+EykJw==","shasum":"9b754bd7b657267dd74f468e27513f33c52e81fb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.0.tgz","fileCount":269,"unpackedSize":368844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEG2MCRA9TVsSAnZWagAAZqAQAJ6EvUmwMCcKGXqCrCC9\nI4U1AyL/IXx9LXK1mfodij5CL0XwnYEj7xOcFae0Uh8EywFmGcIeMJu/B5Vu\nLd7lK8GaFj1D1X7vzbu+m55/PuzAEY4pzwijVc/eiHD5ZvCsXyxGqzabDHeB\nPrngjN6Js4aF7GN6ip7Y1acSf0tOEieWwB5E7gX4tYRmLXAknBxh6i9VuCg0\nNTNd9ZosYbN1CMdAh0EuEOl+i0U21kEWzQdK6hvIRM6iuy4/jopyObpamuX8\n0cnNKtP6WS4Ikjw3ikepgPVtB/fbw01hX4ccgCSbG371tAtPij7QPGwgn1/P\nbqfx0JCShVdhumv3UNqhHE8ZTUvZFKN1x4M2309g9b6Wa6evkU9ug512+SEb\nXlOE+CD+1IGAa0KWrJ5tq46OhBRCFEMMwm9maqh2bjcdyp8it+sMlrwktm05\nIcW/WynRiyRJJedepwzksIrvS0AORG6BscEn14qlNl73aUu+F5S0KmsawMCq\n6DJgLkLC0kul2akwrrH3cqozS2mqpsrNU26g1EIuEth/k9bwizC570p/cc8D\nu4FlU5OXCBhkKHSqJlP9nwcvE5FMPUPh78HXHQt2/Hn9Rg4xYtq/CMAtyqfe\nwItNbupUNUmYGs3kH7IFQAb64DKP4L4tp4uWxuDj8PM3h3y/aZ5cGqdRNbv9\nKjOW\r\n=AEFo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHV9Ru0sR1MJ9cxe535RzCwd8X4NRad3vk8NkZxLeKBwIgDiJbqf+0Cfmhd94jsyo9adlewe83UyFVLMQgrRIHTg4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.0_1561357707359_0.04691556630670757"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.3.1-0607cb0.0":{"name":"graphql-toolkit","version":"0.3.1-0607cb0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0607cb0e30d811a008c26abaa56e6f339f0511ce","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-0607cb0.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-/0HCv9fJ7PD2bI4NrRlg/2LyQx/sIx4fwK0pgXtULEaCbYd+HTtisyEL1r5ERXMwvzikFPM/1kjhdcZnr3C10Q==","shasum":"5f84b1d301069c3c00456353c345463995484f6d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-0607cb0.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEG26CRA9TVsSAnZWagAAF2YQAJvgx/Z/lOJmou0oM2X7\naFpgB3dK0nkSGFMu36ZHk+yWSzhIKmT5F1ZPjz5D3k5siIgYq3ycjknukvDg\nNNZVqIo5IE0UO7+KQdfLwJXeHEZJzH4chMu8kn8HfKT9BNSEP0a4E1EM+S8K\nfEoXPOKJ/C650q9IihJdlt8tGLLWC31DET1XrmLDrDQYLxof/G9H8VkkFy8L\n8U9AfcVoo5Y8JnqzdZja57nx5DRWTRTN3p8yt95l9JP36z9/h7o4OiDyAe30\np6crUMW04GJjt/vktcfx16LBGHKo4tfG60fD3hmT5bAi+6IbENGSnV2S5FZx\nb6ijDcF4o/gRi1LvsaYxYvxfmwLyAKxZfmG9wIpalpfc7Xy7W6kbpgeFKZJP\nOyki5XibNto9Lv6ZJITBlKd8zu3yNetSEr1PpJcaB1mW8CSOwlr2oilEDpdI\n7Tzza8FD5+J8Y6zZ1EjE6uXgFDiMrFmg5xVy/2XCuH1VQhxE5A5VwHggfg68\nHQnSdTz69TwMF81OOgz7Wm53T9I4MVYVQRdASyPKyjBOtvn0CWr5e4nlSf5O\n5/XfJecY8giKnXk5DLE54CIcbGki3rGK6qkE5kV5z9lyYRW2Rw6YtILLjCTq\n4rJbuzwYLzkNPy9JLKz2y90+mg/mYBhCgy+Pvg7kfsrtlh68B6dEoLAQOWbQ\nTlYS\r\n=WmXD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUAOLP1OYEEfIpdivGXCQ8ePQFUWrwxu+yFk6U2e0+IAIhAPR4/9cdaSwSUyp6tZu3bZQyOawneZq/71P/FPUQAOQH"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-0607cb0.0_1561357753156_0.5305336338227484"},"_hasShrinkwrap":false},"0.3.1-a420158.0":{"name":"graphql-toolkit","version":"0.3.1-a420158.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a420158f97f09d1269511df9684cb8707270a3c5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-a420158.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-MY4/YUpHKSpdLLjRLLsXaUEm4YLwnqnknFCBt7BwtlmKKh8q4C+00oiF6HsEvqu1Rxm2xWcIdVIfLlk2T8+ubA==","shasum":"fc375e40ac4594561bcce8d76f9ce9e772ba9d52","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-a420158.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEHZ/CRA9TVsSAnZWagAAwUAP/Ri3+8cXS2wSXQEEeM7R\nqVtHZlGTTvJczcYrth8qmlfA+GlFaeY40Ch0IewlZ7bumio8p2LIISLJ/fYc\nKwSLWtV4FuWpAs4dV6I4Vee6p/2jolt7G18nefR8npcnWgmMnKFEnHS0QsAX\ndW8VTeqXu0JoPolhRVLydVgApm4wevBGnYd40wC1ZFtUeVvKtomYm/beoeNh\n4z7gil0oaIJ1igtkmeOBBaBDj8+m5f5mg+vyj9nnf0+sxcnRC84NIMPVIcNy\n7uwP/pssNl/pAb5bLC6iMTat02A95Gbjmd5WKeCVKnZTaNZY3xvpSkqhl/xD\n4RlJgJmWxXGUUEGcwQnB7sGiiCBULSt+6gJtgUaxAlzzR5d/GT3n9o+MVD4R\ncLBxAnxxc0F083PfmeyFUkucMIS2GS/W1Lx9OuVknbBH7n4q9Hm2JowRKIXa\ns8884kCZc4cY756bvnHnbYQEqae3SSx8TLlPyvliCUseVfUMongsAffbvop9\nhKotBINWgKk03kwvuaKlAqOBDTHPVFa0WuhTBNnAdP53TO+UpUvaYEPUEtzc\nABSCnozbpmd+n7kvoWAt0bUOYOaOM8Idbuf43NL2LhDbjSzPU5TLJAlV/7gi\nW8Ovhl8kB1nGeONDMIF1ia6AKE2XPihu7edJ666cXMImM1Jz2ggZDF/YD6+X\nnQTQ\r\n=xki3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDq7UjH/REEV8fe8QePQSWLkxVXlGopH8ABC6tsslqOIAIgabrTaaANqe3NHBzFoJ52CRdzHk1Gfvx3eH3GoFKvlz8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-a420158.0_1561359999098_0.4413830583971121"},"_hasShrinkwrap":false},"0.3.1-5a8d226.0":{"name":"graphql-toolkit","version":"0.3.1-5a8d226.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5a8d2261260fc72b19a773ad53d8f5029f966616","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-5a8d226.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-RwGd3nIVtNF5La1YAu187r+3M5rRKpM3CxuSn1VnZD9uAX0ZLk6zAQo4OmSfwmRr+EPZC64sy4Z57gyqGh7ijA==","shasum":"1372b41fb136985d41c9a983d4f406ff34bc621b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-5a8d226.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEHgaCRA9TVsSAnZWagAA5CsP/RnQf5INJK/pvVOHax0+\n0v8AeMZwsiS4xpVuatFYsNDJOBirTs5ej2gwl7bXw5F9XxyEvmx4RD8EjWye\njTrITJd5K8KEY1PP4KGOgc+DbnUSCzKjMbhcn664v1exRlj/0cgs6GWB0GtH\nwJuQriYbNdqco8ycGXwHrIRO4mY+TFMEl0KRvOtd12AG07o/vfdfiKsIkELA\nN594IIoxk5LxjBqY0mCrLB76Ta+IbSUmTIqiDsSBzo4iMl/QCIQ+9gcbszH+\nZXJMTZwG/0NhMRWFCilMnKovW8qao5XRXh9GHdIgYhAYi6sdIphm6nsITJ/V\ng/hr0LcG/OOvFMZXNyNzLwKmPDk5X/DzRALRcdc0/Zds6NBnpssnlV/g75mH\nsCKdauQ6hXYMQRAnCMdA9H7u6NHUQhTiSxBTx3u8+gI715L/mq1+mUhPVLl4\n9JQBqDIkoxY2Y+EuNNTwCrp2l0BY26+fn1TU2FhvRy4YlmPuHlDQnEk4nJSS\nG1IfU+JM0yj/VblxU0T9WIxMkBboEWRM2Kb+xQRljR/VhpvOxbU8jFkjxtVW\nozk6Cn1z+RpMMfiLP2xGBi1+B/L7+nYhsRxoJzWV+n/sS0/DDlVTDZ5ggkey\nQ0InQG3x4w+PbYJZgCTyiTnMaKvcrjEbbXRPpTySvBAWEW89OPqEUgAdumHa\nNvjW\r\n=rGDx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFZ9ckcyr4H+1ogHxv0InOC/+ge3EdSIHhHM5eePUl40AiAe3us1t4WHQvm5b30S2Wsm5t1pFImZlUElnOl7aOh36A=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-5a8d226.0_1561360409424_0.1538465354623133"},"_hasShrinkwrap":false},"0.3.1-2a12bdb.0":{"name":"graphql-toolkit","version":"0.3.1-2a12bdb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2a12bdb7b6793e7b4ddd7f596382dab2b3ab4e1a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-2a12bdb.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-J2Gh1Iod9JSEp7aAKZTC2Gv1rd/koeOoI/ld5er65esDUnbhVJ/Sj/l0aHISwRj7TPAKWzMDwh54IbaeEkqQaw==","shasum":"328ab4140717117bf883fa44e2999ada78f8f0cc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-2a12bdb.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdESkyCRA9TVsSAnZWagAAeBAP/0OEWP3MqnJmqFqcDx2a\nR9zJLkWs/sew3LBrq38kdVqZSU+nYHcX8Hu5YVb8QOS1YauvskJb++f3QShp\nouaAgqIQodlOXZFd1r9iLKiPosCSCPQmHGL+vHu/RD1l84/lrK/5GqCZhw1M\n/8UsDCmNXCKDg2Y3FeJSshjIkVrVR9yNqokBLXkOB41nLM/+RWKRujfFojZi\nA3SRSOFkGXcCJNvg9/L2SzDcOfBQTTdmaFd6EJOYZdvTfzOriA7VRtzx79kG\nVrj9Zg4FlhO4Aq/SpEYqT2fQxab6S44Qv0zxze+aEmjYAiqNC/HMnQqgufCB\nobO992PEb1Z4TPOGs+iJgwGMaOVXhuWGPNhJDNU84thCLodTSXwzWNrAt9Ex\nuVeUqu1pJZ0L4yCT6lKFmlJHt/VdcZRhcNfwpN5tIm3O7v4CtEy0Ksh53Pln\nc9WHUWiNDbA3r9ZfpAtaXaAqouDpA6tl3L65GUreumEDPVilJn86h23bkxCP\nhTx8QTXE9z4mDbCn+4BCuDhP0uLXL2l9yrafiPzOYiMPE+EBrYE/geGucqTG\nypIynOfL9lISxX3QFNiskmrtcjXI5ln7JHKYQMiAsQZrTK8kP6K0AOJBkn/K\nb8VC1ArdPz8vTvgwiXbtkZyxvDf5jYcDDQmEhgd/HGwkzhshFNHNzggBH7Ac\ncQOg\r\n=KPIi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDvqn/XFJNN2/HAUyhms5Env+o6okqCcoFdxpuU5D7gbAiEA3WsWAPUUJnrM1BbBIJLHu6Qq6PhBysNWF3UBQRFzA5w="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-2a12bdb.0_1561405745924_0.4270928830202323"},"_hasShrinkwrap":false},"0.3.1-a0349b1.0":{"name":"graphql-toolkit","version":"0.3.1-a0349b1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a0349b1de4401ad28667b675c668dd3837b21e06","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-a0349b1.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-aPGpgkdnNOw8Di4cLCyxBYPDIpzI3Sg/xYxXZtF1Mj1Ss5bkFEhh6cmF9Z/xWihxsnXk3WG21fgNfGliBU9lLg==","shasum":"88c98d7da001b86006186069d5e30e7560dc79b7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-a0349b1.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE5+JCRA9TVsSAnZWagAAT+QP+wasPQLWTDqGHelYjHcd\n4xHsXzNTuxecUuIJsSPPi+JAtOCLdxvLQiuDjcb5uCWJGbBXXTVWPSzsXNQu\nj3sFD+O1Hxg15H7QAqMwHl77EnEa8dkGAnPAPT8rpVszqZWX9iQ7krIr1r5o\n0mZiDLrlowGEQpHTneB4rCFUsbaEG3WnTHTjZfsMFt/sUhUvgjK9XvcsQ0XU\nFZpentx+JvRcpJgJdr5X7ERwA2jPnyvOd3Z+tw/piPRDVTwbqiumpy5NP2bq\n/wcPjXmpFEH5tiEgel1ahBtczabw9r32c24VdhVRGRq1mdKdTJ1b3zg6WHoa\n+2a/ejKKFo3F9uwbuEzvAradDahPVg+kf4q+Knl8tJbpUhFZNBnRFYgNagER\n+7VdXCC7hOAqPkNzCfr/TOogiM36CtdTYCx/jwpPGAEfCNW3oC6rQrqY3LWa\nf3FHWT5AsTO2BKw3hu4Giur+tGjFGZgfqd/Zq3IO7NUNgeHAYMZX3Qg3Aic+\nfbjch43DpnaRj397UAYLHwgw5IXK47zCqB8Cx2kxQkPn4a/2RuDEfDHU5mg6\neKidARswE8ekQZyDHXFcsy9yprBd7Y1eSDVooiDnymK2X0V+qHPb2A5MLQ3h\nHnHKKeXnkE+asvHRRaj1wI4FPlEE06kIJ/unPYljjOPNqCrRYtyBxksjNzdq\n5VXo\r\n=ZC4M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEuPK4w1r/QLDWAZxVRoyFDdPOzof5/fMtCyTNfMQMCAIhAJxX8dasDQ64zjJaJIAoRyWl5jSwqVSlsnACSXhW6Afm"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-a0349b1.0_1561567112642_0.184106592536895"},"_hasShrinkwrap":false},"0.3.1-d3c03f0.0":{"name":"graphql-toolkit","version":"0.3.1-d3c03f0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d3c03f09e42e462167063c547a3c85adaab2105c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-d3c03f0.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-vv789AMBMMsdfeX7sUoXfuuRSIiDiv4xRP7ES9+hCzbL0v1hq832DwczDQwQD32HqUHEmsypLZh0chg9zZx2PA==","shasum":"8575c655d2bb580cd771e0b29773d80a81d16a43","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-d3c03f0.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE5+RCRA9TVsSAnZWagAAIsQP/RPosOMQqcOL516xS1Aa\noDyxMnPmMBFXisOGWhvbCW4sIN2XyjjuurxjnwxzTLX/J+6S4Nbiu//k74WQ\n5th/0Tx3Awe9GDH3Ynw545stGFfc/03FLySElHyVjag1RDJwpVmjGFo81gfJ\npWOmAj/oIEzmLZWf1mRovAZMABKCPhHAvJPxlhhzqywPjo2NDN2I+h9dCik8\nd+lrKGNpNLGxJj29iBXVgbMMAFAAnYlUMTuMaNxwD1XMeAkJYRoTPz+24+uW\neXEdzPljPOLRHNcvVjgq7RJfKm7SPW42+MfdY39PbjCZNkv2ckQnTjR8b8vi\nLAVCgh9bzSl2fa5ws303jP9Iac9ovFwWeWKSPBaPwW6pxiVK9MlQhyJSPqV4\negQuCx+5+DX6ExNR0lS4Kd62RbzG9p/idPjmJM2Th1U5bXBXHgUTeGRP7NB1\nWQyoB9Oso+K9Af6xUfa1wdIK1pMsf16vnT78J9ZCbuMI1n66HMzn9aEdW0m8\nAg+w8azyYz0kuFv6R4FuAUI6KrLIesbMI/nr8+DR0+Oq1IvgMnEWKwYcvIfn\nwcpjEVCGLqID6nqLla9v0PtapxoCV4ky6c+8mtePSmSqmXRuKtT7lX6EMGr6\nOvw9184wjjsl2TgEXNE/YxyeiEC6ADZLbB4fE+r8accaAPLU3QQ4SRvlFzii\nCCeC\r\n=E6wK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEESQyVxP/VPmh0HciScqEd0qlnVHC0AGyc48QyY+9lgIgYwtnul+QQe2rrqaxWjRckRv86EI98ozYdIuFRokX95M="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-d3c03f0.0_1561567120766_0.051093631572692866"},"_hasShrinkwrap":false},"0.3.1-2a0416a.0":{"name":"graphql-toolkit","version":"0.3.1-2a0416a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2a0416af58ff1dd36fbc812c3e787ca318070b84","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-2a0416a.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-6+i/0IHngSXpjQ0TlNK6O6ylNX3MqlEdZwElCi5lQ1XdYm0+ZuBvU/WznlVoavqjQl2i4T0lTne9WHwK7Aps2A==","shasum":"b02c9013cf009ff2ad8be691d98762a5752aebdc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-2a0416a.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE64wCRA9TVsSAnZWagAAVA8P/2096OCmzUYyFc2lPO7m\n084ZZrZ3F6iquieneQ2rxYIiVzfJQw0tPcUrxN5IC9QGwI7gsVe5l5XVPKb+\nsfdNK7Pm3JJQQxUAUR7qkAH6EOex9PSIquA8yFKYFIR+g2XFevsd+OHgBqMb\n/4BKKtHOUrAUeHB2T5Zhcg3Mf+0+pX/8kL3pp7zl4xGsFeDDo7WKBHiNF9Zv\nPn0OOWx50gIojCkvRM1MlvaWCrU6fEKj6p+W7BuBdIX1wI+ZS093ZSy+qrxf\nj84X5+7cn4F7uDjOQwnX/hEp0bNJhXG+MGMoRMqV8DrxWEGwwBlIUHXWndso\nUTL3ESEz+M7oC+EO8gpxujv8eyREBkTmf+Ub7/xdK6ORyfGuw7R1mx+QfPLt\nZY9cXgCa8ggBFDBjAlr8w5zNQ7SVD8x/mB+MG5hn+c184GFvhDPPD/cNv4vn\nEEgpnSxUXtC2SvqzMtHmaq6IrhWvAq5drim22tsQL1naGYXja/8cbz/bL49H\n29I5RYUBmzle5lGXSJ+QHEjPmFVRspIbwIUDS85Z7BjTDYsJFA9t8/xKKVJL\nUXEq6HmwYSsuRB8QTsZF5vIlG/LJ+LtkITjql1GnxtOe0YnlGv6DfXdK4WNc\nX0RJQX4tTA0MLLBm7B6klfX+u4X5sbF+BhT5D0ntGrATSXpG0fyEorLF5a5l\nlrp7\r\n=rVdc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+Q3NUSkrruKoqr9l8EfKaipbI77nAuw92GVRDaVhG/AiBc0O1NQJ4/eHIrvTwKFbLTrKBhqJhMoL6Si+YsZg47zQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-2a0416a.0_1561570863448_0.8469184463098416"},"_hasShrinkwrap":false},"0.3.1-fce3bbc.0":{"name":"graphql-toolkit","version":"0.3.1-fce3bbc.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fce3bbc988a6bd5d180a657e824b806886603f5e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-fce3bbc.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-L0SqlkEMqCWn2NXB7dBoCvas5IPyFi99vAgsR4W/AJxi9cQ5D17LvLVAP+UV9DoqKV+M6R60bjLfDV624DMvKg==","shasum":"b306b0ef1cfe8f5edffb9ca385bc8669667db0b7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-fce3bbc.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdE7raCRA9TVsSAnZWagAAZUsP/27/W0LNJmoAnRVU4IpG\ny0mV58CKmlnCf82MFy+eeXACnurcUvt0KpiH4F4u8KQE1SDlIN3Fj7z4MJo8\nVVibhX4oUWTG+BQE4WuD0DPP4gdo4tC6J8m0g4VM23nLxdWqx9vdm6x/hAnf\nyQJvh7iXAoAo803CM7jtg1mSF/mgQo8s9iZzUdrEkGPXX5sgxTuqgCttN9jF\npy7Rg2gwbQfXn5JNSuDFrB6oA7NDgSk5Vbt7m1wP0JY06GrAcLhOZJVdYO+W\nh0G0aWltADde6SRJz14rpLd1Ld1djrKbbYNQksm2rAruJDSRZT1ai5aEvRSG\nz66Un5MRPnV7Ic4jxfoPptOgF5gQSCikN3L1AsGUGH63foTMT+rlRpVy+RB0\n63eUUFu48XNyUJ5PMMzjbolk/luW1Mojw+kdLKo9/VBDRGVu+Ii20MMy/Lo1\n4J490ZmoHMBs0vCRJrC80x/s7/4URkw7vnk8dujg9KB1HfKYXFSYBTAJLkYY\ngbs7kRAVLFMbLSYH1Z+KPLMRqnfG5w6d8bBIsS/W14EaXgNWzSL/Ouv/gtZn\n/JzxT15Y5atjbIaPxNHp2mjbLf+M+j+QlS761Mjn+es/FhJqJep6Alz5Ke53\nvYVDv3VPl+lcbApWkMfSlaaa/jWPiyMmDCalGERmrpuezueoShvCPoBVVGWM\nf4jX\r\n=mqcT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH4kuxPUDLk6ipT1Ae5cZowKeuDJN31tGtDXLt1rpEzUAiEAxDt768y3Nesu3hgQK71TQWJps+p/Ym6W79uYokuK/Eo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-fce3bbc.0_1561574105870_0.45895046124672945"},"_hasShrinkwrap":false},"0.3.1-6df616f.0":{"name":"graphql-toolkit","version":"0.3.1-6df616f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6df616fc2ba7131374f6f7229d7bfe18492d5d7c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-6df616f.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-FEUt11Ns2hXpzsRy8gFNbfm7FD/ZAGslumPGxbWXSRBMvgEF0IDOC//IISBPV1cfFmQ1OGvV/kPP+fkfrucr5g==","shasum":"74d0c076dcc23aa95d9ed85b28136ab460ad3028","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-6df616f.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFVHoCRA9TVsSAnZWagAAN0kQAI3Rb4NWvqn0jxl+pHlV\nnb+2KMNAWACWamIDxos7Wsg5mtrZONLANKDnun3S9Dwx9JCx05fwnh8jA12O\niqEGx3doGl5V7NucLfkfwgQkSVvQW55gpMvh3eKS9ZxB140Kmj993gLCuNPs\ngaSUNGmxDQN2E+FCHvyIhL3jXwsTyERX4Q0sjTBan+ztoal9eZ4AcHk/OFt5\nzmjLPhshBChnaO+TbiHtNtyMI26wJ205Eqa1jvEkKOtvsZvIzw2+4XDJvqCt\nI0ee3e+cRIws+GFR/FI7Vv7Tkq68rQyFI6F/aHTOsMxSHjDGAGZ98Ef6hky8\nhb4meaq5vAO/JtG83MXb4kWTYrKHbiyDvXcNn6vtWbr9SJpxYbCyayi2IsM8\nopmnHiLYi1+mykyYT5kbjcz3ebc4VUM5P0n7ZcSMaUGrPgR0haKmeZDP3jUz\nwdrOO1cBT/YetkrOPyLthls04hiN/1FPwslRbFpfPHQCUeiMbzPRkCLFf9zG\nivuVsx+CVQ0iE70+kZoTkbcX4F1HL4Nn1yu9zzQmts52vLzXBSaAG/+ETWYb\nd0Nny/ftwyOYeiL076Gv8FF1EgCavsozlz8qKVaiNnkk5BKvJyRX3pHhd3yR\nFpWNj9iubP53kQGG956sVO6ugmkY+dYyr5PDtCSI5JSxGHPeV3qoDjvUH3uT\ns0Nu\r\n=cI8M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4Am0ZIx9A8S6/Iev9LeT21X6AbvGrGY5m7WY/hKqJ+AIgEujtkA/frkp3YrhrlujoM+ngjzsUBr64hMvCd+v5Gbs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-6df616f.0_1561678311400_0.8553219274836945"},"_hasShrinkwrap":false},"0.3.1-cc6ebae.0":{"name":"graphql-toolkit","version":"0.3.1-cc6ebae.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"cc6ebae2fd27e8ab49275e62c67be00dbe1886a8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-cc6ebae.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-UKiHXErmMBj0rWhd02w1pMzCwxIbHq3We9F1+nQAC+ca5s1cLuwLVRvpRm+9e4vwMKcbnviloy4ecr2UxATDkg==","shasum":"f60d7791163007643a294d73ecfeb5a840fb91ce","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-cc6ebae.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFVHwCRA9TVsSAnZWagAAjOAP/3RS9ikPdbasurA/qmBp\n0L8LG+lCYltLDjsQuP7klUFecpEKn1qw3UzpH7bSII1PKpqOnvhcoi4DMWKG\nLeUrL1hj6mnU3RL8oRZtFdaJZj/6asVdi/VKgJ8PzQ5P9sh0wtYVwQL+ooAe\n3YGnzbjmYmRgJVDrBMlbZHO2TDI76GN/C80jVRdXdwZra0pp2u8Ao10yDAMI\n+EjTMCgu7U6mQh7NvkQ5AsYYQoOwZ5DQAkqPQgrYvfS9qfDFPSbdPg/fABhT\ndySu90nOptFBPR7bzyDG3/9mOjiE/UTb9ANK+dnjCicLWGO22thgw/q/1Hym\n7zBJIj+cjQMNOpXI79C9iU9N3fb7hjlwjGE8InQd9RNsbP1SaPNM0EEZMe8P\nTa+eYFhV0IgFLDukT8HPtrpy805PyY5FLtJJ5IKR+LFmNFuGRYBEXNaTxBwd\n5PNjxGOweQe+UunSD56iwtXUCMtAVJlbOpjF5GMocXf0pG3CQkhhAs38qBtX\nfmoo1Nla1ZnNg9U9mlOIhWtX1Zig11TMT/GeRIAG3YR44lm9I6RQGv4IrklS\nSAJ/siNBaR/1EcRXFs0YnvDhl/JkkDshyfIfFleCDr9cIkYhAAUo1A0LYUXL\nBy70U9HrWczgCaxGHkO1Mf7SjF1mBYHkn9jYy5PLfRrJ/7+qjG4wiEBWo/Gj\nBzqk\r\n=1K+W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICWZXHlZHRb9CejrDNLvnlpAt4+t1ug9OJmeiTMcL/GbAiEA2erX/PG7VDMFT6W8OWEdiNV0zyMiMjVfj6mbAQ4gYDs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-cc6ebae.0_1561678319226_0.7763575983522908"},"_hasShrinkwrap":false},"0.3.1-c8e2d54.0":{"name":"graphql-toolkit","version":"0.3.1-c8e2d54.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c8e2d5478bc8791bb061d8390b4d817e4723e463","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-c8e2d54.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-zIqfIkuBL2EBqVPKkyPFMrD8vZE0kRFcl1SkHzlLSuGn8VXrzuEVc6HAdWwqMrBd9gelafRFYkDSzdtK0nHA9Q==","shasum":"ce2684d4b7656c8ce0df531466b12780b6e564b1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-c8e2d54.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFpg9CRA9TVsSAnZWagAA1KMQAIYduAEFzoQWVjM+rX74\n0mYjkfECLX8tZ0LnX7GLDvZPlycxQq9dPGBFddgKNDSbBzvgasxPHDlR3Jrg\nPgRP1C9wk2IEodbR2FXTyH7gL3GloQhYcJVEA52gRjtezvtf66Nw8njEAaR9\neV+wFzOnH9oGWZ0hHGWmDu4Ak4V6AmLLcUx1LyNTIPdsg2vOZZoo6U1uLob8\nTjghDtURAWOJB3/rA65gGpW+DplHaLR5ulrRf2RQqVa/wpdlOQKKo/+P53mA\nKnc+gfOuYj0CmzaUJQwA2GPyeSzV1IM6xg7BtMU6R+pjuauSFYVGuaML1b+o\nbICo1G12f5GyFLpbhwyIBoBHtdAVu52+3H3Q4/8i0F0/2a+UBLCM90jr0+j4\nCZMPUKGQd0tk62PptDw5qK3zFEf5fDfZk84j3ByuYB/qOmCxXem1NUL9P5Lb\nRFb8A2SRKbqfdGyKPsL7gPxGaCKEkd6rXjdJ+aXcHGO7DwoccI76GaxN69Bh\nNsdVbIEvyq5RcrwC4eQDT6TakHgDPAg2vkX08/U5OqwmXDDxct9JID0NA3Ei\nrmO1Ub5L+/eJUFbD4sZ4u5iVWmTzibQnpHrceBe0mIOjuZ/UbYQCcQkkeCb7\nVyuSTGK4VOc2YxVR5/+EU4OI84+XQw8lrRpz64UcrJQQPocgbg+OWc9AATtz\nSWaT\r\n=8fv3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDnpyPoVFoXVdscoMBq49zn7YRlVaFCbZC50zX9XtOtQIgZJQGQjJsASY+DpKGFBwf6thp//kPB0PSOJ2tt4L0P2k="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-c8e2d54.0_1561761852764_0.46907998572140563"},"_hasShrinkwrap":false},"0.3.1-7c32e1a.0":{"name":"graphql-toolkit","version":"0.3.1-7c32e1a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7c32e1a8a4bc631df3df44a61434271d741de907","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-7c32e1a.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-1zPCqbaouyIXoKF3DOUyv8G2017gBOzU1/aq3mQ6XMImsZODWGmsRRz+KFqK8GFjeunQn3rG8reafDx6GBq8GA==","shasum":"0cff7fb0499b9250fdd92e4f1ca300dcf8cc0029","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-7c32e1a.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdFrSlCRA9TVsSAnZWagAAK1YP/1oJVU51RWl+e44JVNJ/\nwf8whD4kAgt6MIOkHCr7HSH5rgrmyDc0WYYvy7AiaUAlFfwoq5szYrgR2DMP\n6fu2LBBTR+WV/SVsmv7LaBcBdECzd2yiklkkQ0pkTRpG+sw7HexZOVEybcM1\nliE5WIYUZG3hDEtUS+k8c2b1PMNWeCWQYOFEDVdzmckJksPLpcvWTN8S/srE\nu9rmWTBWRvHZYxmv4s7Cc1yPuonrkuKGlPpivnd8BraOsdoIaXrzGLmi8iQf\ny2wSNZo/wRJgiHgqpGk5sWEweQOdLSLlNH/Sq2aw1oJVBhequE8lZNnq3ces\nbKWUht/TikOePjrqR+C6wmSu0eh5PRthEsFcULNVzkf0jQSVqWRZQ2IjtVW5\nQ3JndX/0Ml/bIKs8TdE8s7CcHhByppCSGHz2xXdYPjwNZ+Zk4WgoygrzOGM3\nlY1Qu6C1p8bkls7kC2fcw2VdFCvXnBet9++6kGPauDR7KS0JxU2BKYwN3Rwt\nMtQ1++BSEQ2V4zk5dUc6a1zyVu4rXIcsvJI2vmV1P6jYpKEVnpBW9sbTD5WA\nmJz8/nnBcFzThfchts5SlWc9y0qVMJJQYvN7JLHIfowKFPCMlyzxgb6PLhek\np//H8BojO/JuteYsjTzihqfu0Qoy1KhLHyfJNVgHGGo1ydAsKEaZt5S5MupH\n6N4C\r\n=21Ew\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqxuOCzlxHsKL9FqR4X7FQaAoEJn4ic9HR8VFGIisa8wIgJFFWv/5qEomauD4rotRopsNxjjZFzjJ/A06DoM/dwpg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-7c32e1a.0_1561769124814_0.013336964855948041"},"_hasShrinkwrap":false},"0.3.1-e060d85.0":{"name":"graphql-toolkit","version":"0.3.1-e060d85.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.0","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e060d851591e61500bdba3cda1efef93e481e2cb","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-e060d85.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-fjKif1twz05TPFYrg+0mkqMCkWLRRZpjEfS3d23xWq9G5iiZCR6mXgkKAt5c7LQI74ozKGM2b0VK/AcO0LoyOw==","shasum":"50646874ce880dabac948afb9f515a0f27739ac8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-e060d85.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGARTCRA9TVsSAnZWagAAxAoQAJjnuZmtF3iI3OIoJM9R\n5npAEvAUm8ASRMa+kEaOwNAzHdBNUEHDAVoStpKXwb7FhvZLSSObOCLXgGG7\nABP9FH5Cx3l1VNzT/6bcP8Rj0Eh+Rz60Xxjvu+nPZoOm/Ndb8YM90OUxhqPn\nVxGBYOFfM9W4oMbNpvhgkWMPNs/vGcPnYwOAhRvGfxGZfhmPjNDYBRBswl7e\nD2kmu0BSJuiPifBa1gTypfw18XazUvJSpIMt4uP2yg1eDG3JT/BsDhl98e+W\n+bA4G6o9N6hzSwQGgcTreDKSNuWpbPv0G+BPxfKILAM16SdU2iKb4EWg1sM3\nCIkU9nkKZ0s1yVOtCMEHrm/Zi//vUrtAvvYVFsbrh6dFjoKOpuqRyiklzZNK\nSVf29V+2GNgiURB+zbVXO0unmPtNWZlKqMa7xzLdxwAazqvMrB+Fx1G2Ubfv\nsdZ1t1eFCoNxGFJIH1Y3qdh9xJr898d4pfTB3IZRY7zV99NThMropmyZZnwc\nVK+57j9cJM5Ya9RKcUGJ+eXB8zBuV0B65/naE6URb/pDBD/8Wk5mSQM8EZQi\nheqStRXaUE2Uvp6IDbmAsFk9sjvYbSM68cflnQfgTZLsWjFv5IOGIPpuLjq1\nCAYS9V6aMLXfU4kXhS7BBk3tWxp662+RQmgzvGJGJGmZu2oIoKQ+C/Dr6rOu\nM5uH\r\n=K+Ti\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF4tQv7CCJu/SkQtf5iiSGDn9PvQDACO3RZuJSium7ABAiEAnqnXPSww6OPrZISiw6WGXwyek4e7bviBSjUEusCjyvM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-e060d85.0_1561855058321_0.16052812527196525"},"_hasShrinkwrap":false},"0.3.1-99856e0.0":{"name":"graphql-toolkit","version":"0.3.1-99856e0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"99856e08e0b0b5d143a958b057d4b1447a252a32","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-99856e0.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-LL5oyXBPmJatRVtAps68+k3Ngub3zBwbu53eC19CBhUrLk2HF5bJVpvqVqa3Q8Kx7NBPRw5QKa+8IHYkQR50LA==","shasum":"758e8cbeae1b007998af74e75252f1b72b071fd8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-99856e0.0.tgz","fileCount":269,"unpackedSize":368853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGARlCRA9TVsSAnZWagAAroYP/3hs4WkfmHDcZECobz39\nkW2hSVGZgsmiGvHoIPNYSVbDkj7PCjHNt+3KupTF6eaGhXo9z3D4gafdzA+Y\nYOt0Y/OeFopaZYhiycGdCIguDKVrp1PLAUnwHV/BGDZmAAZdk7I4h4AQ0kgF\nbxVaEMzWmaCHlhUXq/DSiSwKPTa4ybpTtQV1kuuAsdprbAWbWIgpxn8jX7gJ\n3iDXV943MZ3cyziAoD8d9+FztdEBnEYZvegmTfy9QBo4TOpGIeVE5P5iDEGS\n0ahW7XtYeTIMeORRgcvz6BRcu4wZ8MrNKTMI1i4MMSO27JJL0c/xlsBje+6r\nqRGh7rebFcpGdeKctlpxtOxOPGl+FfFVwvST83IKdo3WrnwSyDEs7Ol0LxsQ\n7LOE249a1uZFKwm4T1KuqUS3QBMVMkRYJ43Q5fvKkx6sTFjJhBVmUN96c81n\nVNmuf4NNI7+lTCXMKRJUykWcZUxluLhZj9Tt61h9FHcgU8lMbSVFRNNMnzYT\n9z5/DANJTd5+SwT+lvcjMSrQTDwKPQ2jPbxWJcMPhVhjptIFoK8yIEb4BfAi\nGi/n9lrQr3DrZTpX1sQHvMqPrKyv8A3u2k1CeKsQQ3IStlUexap+K1lJsWSY\nVXm5uUKycvBZVfcEBx6fBLD/VYXsSSN67M9WFEFPf5gtw8rqmOoa1cl9N019\nIVfc\r\n=cqKU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF8uhN1j6+bweW6VDxptjoQFDSHv1faCaAREGCE3sjfoAiEAmUsC2dT7eHnNT8Ac+0WuDJuQWvHIaZBNbLDJYvvR1dE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-99856e0.0_1561855076998_0.5599888948323688"},"_hasShrinkwrap":false},"0.3.1-214699f.0":{"name":"graphql-toolkit","version":"0.3.1-214699f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"214699f618e0420303b9d53e23f71a723dd9faf9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-214699f.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-+A0FhafPriELLdfD2ADR/vpQeN8b04ABmaqVQ3/8BuYKQAetKeqKsUIBO6kGTMT/HC/YYg7kyzNtpv47m75e6g==","shasum":"94e0623219a596d31078c8be003c32ae56754097","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-214699f.0.tgz","fileCount":269,"unpackedSize":368930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGSFtCRA9TVsSAnZWagAAVn0P/RZuaXaf2Y+amvrBWVA+\ngCN97GlNWd9HMp3ZJ+Mh2Lr6h9B9Udzw7gawz7kHLs4ZnwQuVbQ1OAisrLlA\nhmnFdhoQKGEcsMfrIIfLSauU4vSY9bZv/23UZfClsGY7rPGgh2L3k+irp7ja\nPBdzMhdfDp+XiOE1wTqET/UJQ7SazA04rAD9tGV1WXN8u8GWbFHgK43M6I1F\nEZ3FMW+ZTodMaZA3+1wYWm3t5jfVdj4UhP3J12RqaHTkdj69fQRGXhXC+rpd\nRIcZ0Z7UPY0CnkMXfpjU0ot+Xuua0wnJo8s/RZfnTxea2JerEz+zpR5x7kWx\nA++ygCBOi7Hh1I76QWKKnw1wNwoqZcDTRO0caGG8nlh8zoC9CB//uWjTSSwl\nD7isH7JlXUNmzqf3xskGj6bXwX9ROcaK7c0UON0/yxsowYM0UlSws009nNQx\nyCxLNgNKldqMF+6Vl0vwgyoFEu/R8+3Ub/7q15FjQ4APSORYT2Z/hAfkL9i+\nhU+8+wQ4XIYSYw/EDrA9J92MNhebXNXrm3VuA+kifKmHXMnTyP7rkf0izoN3\nhz9Qesn3T+9qu5MdnUrwNYJKj+xlCmxexFQUalg3t6qrfbo+y+sigiWNoNqY\np1j7lk6YIHabf7Hu7F6asR/T1RjXnQdtUI7ql32nGTU+iTp6MFiZle1RrvMl\nFDxS\r\n=rKDp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDkYDb6LIZgBAxdTp+669HigdeH6Et5iiSy+CkhCHPXaAiAav4HTEGIJ2IKwSOJ1SevEhceaf8MifuHcOZYnk3i9pg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-214699f.0_1561928044313_0.5309733276859239"},"_hasShrinkwrap":false},"0.3.1-06fb701.0":{"name":"graphql-toolkit","version":"0.3.1-06fb701.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"06fb701212d18e95243163534c14a24b8bd3cbaa","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-06fb701.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-zUv0kQhKCJW4gcJSpu4Z9LbyfoOefwyXzqtK+Udvch7/iBBRvldiVlWcTZCd5CfSVIbCoSM5K15LGtDsytvjEw==","shasum":"2ea06780f56eb9177d2d7573b2bcbce307ee06d2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-06fb701.0.tgz","fileCount":269,"unpackedSize":368930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGVwZCRA9TVsSAnZWagAATuUQAJYQU5Lybk3Jvl6XflQW\ny4HNGyWaJ8v4HPSCSWLuNY1kfCLZe2c7DhaA+reiChbIr8DSey+BazTLxdJE\n6yEztvz2/HE8U45ccfcMvUgOtfOnaSCF4XYm15dJnwCyA/EjrC/93bWq6MRE\nqUU3o9vKEopFOBiO9wWrXzsq9qe85yc2hJ4jvl6L24uCcc0AD3nV8+2oZ9jG\n6u1Mx12iAE/THkUBozGCGVuTtIZwyGp4ZMUmiWhrtY29fejj52H+tro2jvdw\n9AMLTahWyeFijLhKHyT12tVkoP1+yPUxVUOF+koOI3TGjsjklravP+P6N6n/\nhHQFbwie8od3AD5cz3y7AV3yao6oJI8wCf/2Jc1Kq9D9RtdCMhtO4kkFnbgf\nvCTt4qzj/Ak+dPREOCR+a8juvZoUub4KyvFczoau7KJwZTacttxoalULyptr\n2UKRyy7vY66a8Ea96O+lYxFTosmtHEOvTgyQEqECEZcXnzane3lFV1cP41mt\nn4nvh2LoGxkJK+8fQo4mytFFDyUwZfAGStZ813wq0EnmXGyV11zRpFqDV7ER\naQJfT4ghp+uB+IBV3VMWjiHjZV4CS/rppd+8e3AYKUiBLEefuSa2pkmznDJ6\ntEorPT3Yc2fDUua06Nmdi857ovx7tiXzEfAtE+y74mzLfjsWopgDp4xx6fci\njvDF\r\n=vXlW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQComFHKOthMirM9r+G+fiJrTKBT5eYDGB06zezpTFeMdwIhAMwyxusJc44+g/fTiM8IyNId6bviVv1tbZZSounx7Qgv"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-06fb701.0_1561943064737_0.16307339921487074"},"_hasShrinkwrap":false},"0.3.1-6d7fcc9.0":{"name":"graphql-toolkit","version":"0.3.1-6d7fcc9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.3","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6d7fcc94980f4e26aaeef83d9b41fa154bf331d1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-6d7fcc9.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Z7xnJ/xD+sK8AAfxWTfBjF2GElSTnQ8LJ+YVh8aLC0Ux1QksMH0VaQz/mApUUs4c9zmqjzWKSj38EYLj/oXvLw==","shasum":"6f78f6a55d17554c45873931b43d5c31432fe0c3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-6d7fcc9.0.tgz","fileCount":269,"unpackedSize":368930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGaBNCRA9TVsSAnZWagAA/coP/ida9v4Gr2T4l1Ti81AX\nUz/Eq9V8ucTZmkZcnQks183VlnVZzSAs5rEUhjth81A6C0FdCZvG4VH9Q+Bx\n4HSNwVtX9myL3MF6Otz92hHmG+UM4vjCEnC+6C5WAXyHjByD9MUVbDns9rKz\nT2Z5gCv4fyAaEdEsogpAcf2spaLto5PkYhnILNfXjuPKt72uHcasj530wssB\niaJ2x+RD0aINjHlkmUIPPhDch/o5tZaAftVVYos6CsCVh+Fcax3FwPNMOIYL\nKZNdAYzuvujGSHJhutGRG/tM3vyas6u/zQbWm+Ww1le1wxL+/HfekVUexf7U\n/yaTwKxgkoWWuEJntTf4SS3+LGgtJOJvywNs10jV8NEHhBYmx1Ci7IC3FJa1\nzFeGLBKROhnaOFJtEYTZM/KvUlduUAGpviKZ9hacB6mgftQ1AKdQDHj8qRwO\n/dxO4y+dBY3Ysyn43sS05UTEVIS0ZtRMhY32MIWNpHxXzcc2x9WCZ6/jd9ko\nJTBum/v/vRhJwR4AJJyoSuwnxEHoi9nZnH2A5fhSD8VFrecZJvmieRCHhOTz\nYlI46FRYPKdNnazs8QqKvYR4vLVZF4lFMKIVSSoatf0pPRWz7OgSuhIc5lR1\ncBlyPxFG73oTyeA1xP37PDxeKouVww8CRvSmMfiU+vsURGM/alL6eaGvWpQ3\ntyYW\r\n=9A8x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICALiuC6FkCVJe94euB6uKZ3ENhmvXsGTuJxgNO8Mv9UAiEAkuzNtZzQNYer2xe1229cfBLgMc+pXDYVdirI6QDSPkU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-6d7fcc9.0_1561960524667_0.4071966526659774"},"_hasShrinkwrap":false},"0.3.1-a19eed4.0":{"name":"graphql-toolkit","version":"0.3.1-a19eed4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.3","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a19eed45b507388c752aa69e701547c59be1f976","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-a19eed4.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-4VV0zpORbEHLqm9hXswM42LjG0X3XVGHx0MLIcMm5IdmF+uLevpdcjO6KRskxtKzBsukYKGWgzDEnasn9VD3Lw==","shasum":"2f3dd99b64848aa803be54cbfe8c831979e58c45","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-a19eed4.0.tgz","fileCount":269,"unpackedSize":368930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGaj8CRA9TVsSAnZWagAAe7YP/0RpulE8dsBVF9mKRe1S\nTdtKw1rIsIaVAapYfzGy8GMO2JOUlZUk7korqNX6mvufLAl/7i3YcaZDWDgl\n2pb3hyqEYmti2vYHj9cHkodpU97Do+lCa3UQIkpGO2lnSeDfuUBCVBT1ALyY\n3jWgspIWlXVdWPJEDXg0YYKpZFwStx8F25a/rsricNbu021LHzZM/8UmXoQK\nWr8ROFhR6+UbTOm+c6b8yROUH9VkT5EFC3S234M2rPO237hbPVdGm8I9lteJ\n4YeMob2ixzm7e0tuACJd2OVLNwzNceYsqvNdyP/UeoXbqlMe9PZuukL0EP3S\nitW2mTbH1bTtWrjfSFG9bkm28ret9Ws6z8egEEyeeH3v2fHmXVgTd2yYXVLM\nUh0E+5tXAkWlDvi0eo7NsLeEWEgob1Vd5GSl+c9PCHgtY4dAxrC8AoH82fM6\n//VqJZtK4McdQBxehHAkOiF+AhCnhtSOdFAxIbNyabzp+aPO1E2upi9ay2Kg\nCOPdIGBQM4lxkuqwTcILm6+DVFBcz3hq+wB23sm1HyKSUpnlUUtLzq8tAerY\npBD2TsLp6y/LU3z5vsNeONGpvdiO36OnZD74p5U17cMuTkBS4NLFgHzHCXo1\nHhnSnqKaRBNi5eYNUUuky2C8jdV30p06ygeGumscaYj20XYMCykBLre+vNqr\nbUy6\r\n=cVKT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZXfxoDe4xpsswUilMar45vuAlA9HdGiSNGeqt+d9O3wIgCnFuCXC/+xODfvGsSt0gU5jtbH0TrRb09ea1GwN1gZ0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-a19eed4.0_1561962748273_0.0377564366510974"},"_hasShrinkwrap":false},"0.3.1-df912bf.0":{"name":"graphql-toolkit","version":"0.3.1-df912bf.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.3","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"df912bfc2543463ca4cde3d429c61cdd206de32e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-df912bf.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-6PW3Xnm4Dslt7XmZgart3N30KNNh3ph2u+f7xFBWmtjxzW5ds50tnv+9Iqjd7SAvvRs6qMM8kr7Ro8HGc0GFqA==","shasum":"881cc0077a7f395962c97b8344d27606fde02f55","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-df912bf.0.tgz","fileCount":269,"unpackedSize":368930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGdI+CRA9TVsSAnZWagAAzl4P/3TmIcu45twBKSV1wjPh\nSQns+pyOAvrK4hDeKp96migJcObido32EMlSDDJ+/+m+QdkqdO5IplbnaQzY\n4uDEENWyuHsrJ2RuVosQfXCKC/S+VLB84Yq1VNcXhqB8Y42UcaXVBPKxy2n4\nWCWvnpvbj6NOWnCYeC0JkfLd2pFLhiqgvlxcRUzsYfdK6Iij6rMRX2/l3fnp\nSPU2W52AWIXJZyIyZFFI+wo7GhMo4pVRQecn2l12AcAZfO61TosRrn+rTPwG\nYmkUue61gmBYFJAcTO5G8I62lYzjrrAHl76hC5z2GVtpxw8/Jqp0TM+J/HwM\nqoVnkgCeXtvxGVXiCGqByOo7sxK/ibeOzjib56cje5pTZWezw/8NVuuvSebD\nkkMBYguGMwGCcJQy+ynb7seVNxCRnKYMV/A4JQONLrkORyowL1W5RlSifLre\nhZpvDGJFH9Gds9Wwr4V+v4FUUKZFZRTwZziXsfLaMMKGZwRb8XqAXvTh+a1U\nPo8UTSntiat58cVp5xEtvRUGjWUPOEUmUAAbzra48PPIHuv+4WcyLVly8BnW\nMA7T4BWoDC71cHh1qW1aMqBzB6EuuuzDOeo8Ch2uB/OyMM18wPvWa+bp2PfB\nxhvhecRkJ/GIk5scleSixH+iIdlof0C8Ei3oOZppzh3KDmabns5ZKfHKMPoz\nPEGJ\r\n=v7OW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGJx0uAFdwDPfelvClAP0jHR3fen3/Nh7fUDouw7vtA8AiEAlBujtCcd3X47sBRXXlakJ/XKZjrwMpAeJJj7/3QgI6o="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-df912bf.0_1561973309284_0.4655138843539737"},"_hasShrinkwrap":false},"0.3.1-26e10ca.0":{"name":"graphql-toolkit","version":"0.3.1-26e10ca.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.3","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"26e10ca5e76cbba4c5707b4dfed47213dcc7415b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-26e10ca.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-jmSN7q2MgUSQYA/kjVSE71OC7GvMLyRq/52qI8uKFawKvKJlWi1SeYuCDqWZYTEDRJ5xp6zui/65CT7hZIpUMw==","shasum":"ba0604f9897f6b99166666b563f93b06c976b059","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-26e10ca.0.tgz","fileCount":269,"unpackedSize":368930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGgQzCRA9TVsSAnZWagAAo7cQAIARUn6Cyto+lcLG3uKh\nfQFF0OsrcwOBJfurEFGzx76llcdfULA6FwVsBIADJW6Gfjau6jYK4qMu1GSi\nxgcXVtQEjoJboltEv1XK/nW2eKa/U4AVWYmrLShUyXMLsIJumOjrqIa0LGbe\nde6uf8voZClfkZ79VFUu003erXXRFWVQmDS1CSlUDAJtA3/0djyCK4UMAbGh\nUO8h7QRwZRzbhq97fGuxa9dMQr4lt/HYhct2Ua/lLHWzI9V6mUbXCqt/afTz\nMnYDM33GU/LPrgHJcal5L6646uKDKHRjcLkkKYK6Hz/JHbFLFcsLxvfQ/HHo\nlv1UW8sr1wbYoxrO2htWdV6jEAfKbBxLemHDxLkFxHOp7/nQfQsMNTOWxYn1\nhW57KtBfctsvqR0i9Qba43O5VLvvVUcgsn4ONTWjJff2al47YtNximShzbbS\n8XTr39TjIlhdZCVd5Ja/K9sCUdUY/MoE0mL4hd/ilczBS30DaNncM7TwN0u4\n10cWDsHsFPSd9F7N/aAEwcIbNikAD/AcGgOyqeDExnVA5k9uEvbm/aYgyD8H\nSAIL4WI99VBvWAedi0VfHuKeaZgalUtFO0QeFC8LRLDyM+vwqcPiw5Nrlpqb\nmssiv5bWgm6aH9PhdRVztfr4P+kTDumWGsYEonMfENDCVXLw97+TO5GthMg9\nOjul\r\n=xOgJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGEAyZ6wAl9UewDN3Ky17DG1pc65NniFZoALFSyVY7BsAiEAnaOhCBcV9WQ4hpOukz0gzDloOkSoQGundPeICBw3feE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-26e10ca.0_1561986098639_0.15893023930401395"},"_hasShrinkwrap":false},"0.3.1-8e124df.0":{"name":"graphql-toolkit","version":"0.3.1-8e124df.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8e124df82ea2281a95f7593351d95255e370db15","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-8e124df.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-5zwd5rcGBNB3yKqBeM99SABfUYcW8Bhw7hx5zkvoHiOn3ircMvcV1CGe0NDNlwSzMtx5N6K/CujOMH7xzcG8nQ==","shasum":"bb933bc20e0e3e855c783623f70daabb243a24c1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-8e124df.0.tgz","fileCount":269,"unpackedSize":368930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpJsCRA9TVsSAnZWagAAxrgP+wU4vkjNwXg0Nc75rrHL\n5yT2xscbFnmxWNf9jdEwlrsfpuF0QhTs6NprkNo1F+zeB5/tOjMHGbS6gCrG\nJa3D+yTC57ViEtonfKVqxklB6uLosGJ4+mmFKLHkaFwvOjZV9oyxmNMsL8iE\no7PBG9/HMSVtZ88J2kG1INmwCDiOAiX3i/CFviAAijTKBZ2sDS8sJ/ZAZUK3\nvlmJUlD33JZ1qC6xMB6zTCpMX+L1PJv1cfFXwgJYk5qPWDD1qwoGwVlYosYu\n2OwBTB+UeSRZam0nlfrdMy5Wkuw3dwzmx84kWejA+/tqpKS12UVbgeA5ATuW\naJU7SbmQhEPgaJauhKFgQCfkduJj7vARFwFTxvZhmRsih7jo8zvJ7R8c5kv4\n4nz/1H9p6JXg5Qbb5dKul4zbmUh68t8npoQvvEqILuqneReENSEB0ieHegxZ\n7j8An/Q64UAoNq3J2pCedPrSSdbrlW+txMp8PgAyA6RJSYFQo2V02R5Lux+3\n28UXuZDIWorbZCqmD1qV9SHsaXn1UIIXoqmrUgjJ/hH7W7JRjPVXJmrWdIh0\nGJiBHFi+xiCja6W0audG8aDzq8GNkfas2RpLJLWYypEvUO8yrFPgfl3fACoe\nIQrejkJu/asWCkRxK/m8pQ6kkWHArs+HLB5L9bawlS2z+U5GCJoN/MHnRcUw\nQXHi\r\n=FHp3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDts0THt3HyolaQnqGp9hSA6ppNJX6/++w5EGsUnNd8qgIhAKUt29dWNlw913QQ+c8oS98znGAYMgy7p0/e9eRezJU4"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-8e124df.0_1562022507598_0.5202180957963829"},"_hasShrinkwrap":false},"0.3.1-bad97fa.0":{"name":"graphql-toolkit","version":"0.3.1-bad97fa.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"bad97faa926da39b75da4942fa8cb0fbd3a00191","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-bad97fa.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-7a7SxTTTtPED2mTQ9vgx/NCud95sk3uw3cbsr7+t1FlOusGHPvhh1EvZv9z1HlNRvgoqSx3l0Q19gyh2xuKsZg==","shasum":"ff618fe6a45ea4af585f586c01acc2ec7c84a58b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-bad97fa.0.tgz","fileCount":269,"unpackedSize":374431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpXACRA9TVsSAnZWagAAveEP/RCtMcxfHsFRlQ0l5UHV\nlzU7YXRIBhOCPzIE/GbAaK/Qi+Mjk9VpSLZYQ5PPwa0/36EBx+7SU7CN8oX2\nrLi/5LJuj2dt1Ezisx4fmO091iSnOE6qFunZAszxX+UIqTkHbfmxSN1c6rsi\nW6VUfhcWU89rf36iVNIDaQkpBfDv+wiOPqlwHMaVMnyyEEDYGV3HURX7ciO2\ncyC9ypxNjmIxuaXxAm5jh9Z3rECxsmUPQVtQv8P2hrThQWpz2zzzYlpc+MYf\nJPIDaEmE3WyXifoVvBIjvC9YLRT6L3G8k0tuvl019aBzY0Zll7MujF5zifkE\ncUPYoQWDAUoHeAgQ858axJaiRm7vH2JnvHNOaNvwkcb8UsrAZ1VzubW7N4tH\n/vp7hkS9DGJ/Thr6Edg5D7nQj0OWYgOrd2QikOtGDot+iaqu2oB3Lg1XQIA8\nlllxCmMu2EeDghbiC4vrBjWTQLn9owQdXnCPiO6D7HkKRKRFObkeevFXV7Fy\nYeHz1AXNMHSmyJcuk/r+L6DS5zgjkVe86+CUyhy03rPQud4HmWdT7sacf3rx\n1x20Plqgma8hO2IpYKHsH0t2ZQAi7Y4VKDKpDLTyMjab6o+/2FaJJWRV19pY\nPxdHbHxgggs3Kg0dIzDXf2tBKmrqjhGc53DRlrrYzYmQvP6mq8scxxS7bQJL\nzUCP\r\n=8uy1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBxcCjUoLyjtm/Lo5TiXxBIUUk07soyoNkbclbP193HgIgOfDu+MAna/mzfgZV9lDSlqOGMuaWZNPs/FbpMczOzW0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-bad97fa.0_1562023360419_0.16702287555093154"},"_hasShrinkwrap":false},"0.3.1-1847343.0":{"name":"graphql-toolkit","version":"0.3.1-1847343.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.3","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"184734316b662fef09e137a49fe4c33cef73ac6f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-1847343.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-kAmwpSIkFA1rn8+7t2mtFfvXE+lqAAV0vUVaeHzmEPUAku6CFgbcngAldqsJ1/gZ4OlC/uxtsO4bUsNJQMzAkw==","shasum":"ca2bda06a5f7fbb55b2f5d45d07ef648238e2f2b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-1847343.0.tgz","fileCount":269,"unpackedSize":374508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpX9CRA9TVsSAnZWagAAK3wP/0nvABE263Tny5eJggAu\nj/2TOjEKvwI1+FMhzray3shjVZjs95sb9bQMACROlb9mgnAb/EgS0kwYIVmL\nBpJR+k90gL124Rhfc+rh0KQRNSte97Vm9Ls5Y/Z1aI1rhCcObFeaJOr/L93T\ntj10qU5NhMninaxzU4K+OpvWc2/+7C8tmr3Ho89/utMSIDm7SXrq1o/59q6L\nN4Oo09If4oQ7PIjViEvhaDjaPIxhPC14hpI8rBVa9ScNyZFC3GbFmuLxZ5ov\n2VQ0OWFtN5U6/uVIXEdQLqhxX0UIimcKYkDeOewtWZbqD3Vbjdkhio/PtlDD\nwB4X08hU4z+M4sbw7c2CyuJj9513rAlTg7EPHQQeYS4Yy4sJHi8IpYNOaxuI\nGgAXiewgSy9HvNFg9w+QeAJATV6/VyOcU3L5Cw0M2KYritdJ9U08ex+5cHo/\nygbezW5adJjpYeLW1IT3R9L3pFSGOSGib9e3RKlUqg9Ru8LrOCXSk3N79JkI\nFIWaib3S6D3t27lmdlLbWIoFTROtp0wRjLR44engzEIXJHAm6HeDwn86VAgI\nb2+1KNAxrt1SGZUfTZig0KxMJqmFSehbsDvsfFlq5+tQuO1Y7dnbgLn/FCFE\nkvHHDodfmWobpWTEkQkCiSXm4kLq4gDOLY17jD2WMNjYhqXkqjYVnieMB9kB\nTgaQ\r\n=Qhqn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNSq8QkTaJgD4mczgHm2yIYCOr36ZRW3uWEuempH7o+gIhALiCtx+vHaJ/PY/ThyAu7SRmbxg1tPSbURqepfdUTO6q"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-1847343.0_1562023420812_0.8098580007688567"},"_hasShrinkwrap":false},"0.3.1-90ab89c.0":{"name":"graphql-toolkit","version":"0.3.1-90ab89c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"90ab89cce5d1ffcc5bdab3646dfac63f42a9f527","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-90ab89c.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-9VFpFRAeQGDhsSYuhvwDV4YU5eIDhrL52kZB8lwyeUde+n7IFlDoJohxW7OgsMLD5l5q2ZxGvIz7AP2zflZasQ==","shasum":"6b212ac4dd2c6106f4d9a5f982810301aa225904","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-90ab89c.0.tgz","fileCount":269,"unpackedSize":374508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpYdCRA9TVsSAnZWagAAwoAQAKTb+DOJ00exjIdvdcCH\n+wWubJsHtt/H6Rt3swWj+ouWcyIJVlr6vNnQflQ9aooybRBUuECEdKzfRkpe\n2vORx0oGY1WsKNIwzWzT+sK5H90Ia0OnXudi2SMll8JsW9p76/+pHpmB7yVL\n2cz0WBx/mFcDIM6L0IfIZEDrCODRJSqSedW0isuqGM18NE3RFvmqCa1wC9ce\nIRUYmjeR8A/w9UELWnzLNlDtzu3iMyWPVkHMYWNWp2QEjD58/l5qKvaqJBHt\npUHIAe+MRsjP+HdLbNLD5pNpQBZrkhSUpK2mhRScCplIGwpnq8vXqNf9wa5R\nX0fTnZXBCaV8OjZB1brhKcOGb4s3wcJe1DZ0KNVRGfS/wuPc2A1CDo9kFXhG\nUOuQQ20qgPlXTDV/1hTCn0nodPOeyEhL0kN4k3LnY9YB6PeBaAZHaI8f/Cgk\nrZCJ+7hEC2bKjnqrfRIix9Jf0w/roCCDcCtEudQScMoit+GWICzjC5cxxGFO\nQhK7GZSkMFMdNZwrM716wstje9U2FuAt8/sK5z9Jo7YawaFyAJGRJXAY0CN4\nDosYeP2wj9yoheulGSewRLScoWhOM1Ru+1xmT4lscHW27t3/WjF+2zd93LnL\nlfu97irqem02mtI3G3AbT/bm+r4t0ctCHRnL5DD6tEfbraJ16O6grzQJZqjR\nAFRU\r\n=Zwuc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcIGHCz48l0nxvu5FYhStTxIcQ1zKMx+eWumg3reIs6AIgeUdkCnJXLg7O4orwLaYqUk/4h1DYtMywmlZJkokZ0/Y="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-90ab89c.0_1562023452512_0.4381804858735856"},"_hasShrinkwrap":false},"0.3.1-55d0529.0":{"name":"graphql-toolkit","version":"0.3.1-55d0529.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"55d052912516c2c0cc443ffdb8fae0ddead29cf2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-55d0529.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-QabhWxjGuHjB2BMNcpfXcq9OZ1xLmSGfpHK+l3qJ0MrkI8Fc7aA5nNnFf1qjMvVonCxO8J6PuSedVwrgQWBmHg==","shasum":"1f6aab284aa36298a6aeda7dabb1a56b1d918633","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-55d0529.0.tgz","fileCount":269,"unpackedSize":374366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpb3CRA9TVsSAnZWagAAdTgP/AhP/Mm32zJnJQ9sg4eN\nRoA684A6RJAIs+hUdFwwhVWsVVWfZV+jd7UHBIRj3z/MRN/PwESmt4lim/OO\nLj+Yc4VK6tQssYBOx8tBdzMPtIKW6C0BuuHkgxbZVNzRMqzP3ycRp6jGf7CE\nfBe2kh/AysI/WSz1BwvFk3TXG/cNYyVc+ebDTKcOfQJ1GWnyOctZjx1ny8E0\niGtIANjrCBaKMfAaMDUk606c2DCmnDZNIc8n8BGHXFKIdouZY+OfoZmiRW3L\nJLGumSgH4LwEFzRHOorZiNoKExvPbr2+JE+mdXXEeH/V9OZVM9QDF4F5O/Zp\nCqJuI81zlc8MlplHpZ4YY7uZ4jzinxaSp/1Fx7oAYUmBpdABztU4w8xCqG3h\n64ocyRhzgUWV8EDGVXmLISVTHOWOlVVelAusQ1ovO53W6xZUcXNKnZTHhHhE\nesUmX5zleMifwRpMc6j/91qzLobM8gGBw30T9btEGjJmJbv0blvG844L13oI\nXZl21czUxD8W7d5xBpTVF6RuShD2L9IbV5cyhsVPydWjkszo4GECgUFJ4/U0\nm8BblI8cMpYPl8nl7gvTouH1NwCZA8ku/M222FZoXmzC4hedM8dg4cTWqJsP\nDYg4XAhIayfIt9KtYciInHqyGvS/09piu2dTz8uDXFfm//8A3qiiTIZwKdqU\noPH1\r\n=pEMn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8D35gOwWZjiQHs4TH5JnXbAwA4wX2Pb69sEL5wZ56jwIhAL38r+xYfRmQrDlNm9pWDp6bIEBZRwGaX9O9S6pQgjFc"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-55d0529.0_1562023670938_0.14504727977736542"},"_hasShrinkwrap":false},"0.3.1-39bd770.0":{"name":"graphql-toolkit","version":"0.3.1-39bd770.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"39bd7701594a20de7307f3bc6e1e674be1429dd4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-39bd770.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-JVasNiTyJIMZzN6+X11B6R0Iipdyv7YMjrybsfv08sI6QCz6mmeoBq1cwFaK759igd3oogTODddm8rbGaocH/Q==","shasum":"129769fcdfea855e3f50b1ddc73421046183d09c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-39bd770.0.tgz","fileCount":269,"unpackedSize":374366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpd3CRA9TVsSAnZWagAAqn0P/AmZTq43OTSa9MhHPpOE\nEaTJbGRuW7yP3AgsfUuWjuyWMhOl20EWulYEUOmAGHEeOdp0e70bkeDHXDTJ\n9NjTYatRaMAXbPRdceQMXmS9qNrjbYwzTIfBBAd4zbujKVG0/CpKHhaWNdYN\nchxCOW+XbQ6nuO16WEyXR37NSK3r5+jN+RR3n6EAdZTjBiJJ1R37slUST6BM\npVwI7paVm47DL/HewQEmpsAz7t5i/VxbFaTpubDtuc4QicvFiW2gSzG7VLkE\nKBEl293vvS+JQdeCLXkzzs3Vz1gY4lbdO6D90loEjvFeHh6n+vFvsEBqWq3A\n9J00UOKwQj8shJYzlRyNCZA+ejWILMtfGq4cBQ4udo0/p8N4NvSDretfxpsW\nLQnzaillSA6KnUOSeLK+LKoMzrEtOeuTn4iYqDy1c659lFgTAWI+Nj0ALPRF\nSlDKvfpRkB27IeSpe3yg6JnWXSN815ZPRZqE7fJuvKt3+owqeL/GQdatOSuj\nm0yiQo2LRhGqD4wKLbnQ0f6lf/XZFY2qHcHfLW4NvkJP2ydaaxPKrOFmvU3A\nRDVM5tY1MGROElK3PEXxrInj+KkR7vrkXLcb7gQeJHRG2u5l45YNKqbyNiS1\nBmX4cAfZswMDaT3pu+ElAB/iVY6NG3xhzikI2lSlPf2f8zks+gFIL9hwhTNx\nlwQu\r\n=bpEU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxpYCb/PhvlQh0Kl63is3yfeMoiFxsdnVLNlXJqU/VGAiEA0PzIEXJMs9RWROO96vdHHG9by7qf5tHSv2NS9eJ2Ufk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-39bd770.0_1562023798855_0.6653698142969242"},"_hasShrinkwrap":false},"0.3.1-694aa50.0":{"name":"graphql-toolkit","version":"0.3.1-694aa50.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@types/glob":"7.1.1","aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"694aa509c5dfb2ee3322b1c503d915af254c3845","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-694aa50.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-hwHQUkCjTt/KAG9gntGOJDvz/X+CZ/8V6xTVQf3u4aH/RgXH+k6A3rkTFc5V/WHHzBqkrfFS6ZQJ32NBf7ILnQ==","shasum":"a3f9a5912e1b2cade3e39eebd743764485e03fcc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-694aa50.0.tgz","fileCount":269,"unpackedSize":374508,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGperCRA9TVsSAnZWagAAvsUP/1yqsgylp3FTGHOu+KaU\nNs3hnKnterNHCs4Tn1mfj2jinieFzqMYU8TxtvKt5/6D53fM2U2GhkAosKdR\nBbO9PY263ZMFUoAu1WPA4Q1ttxsw6T7dRsS2HNfif4lPiGziUAegN0pG/90X\nYHbWJMLgPjtM4UppXcnx7k4yBCpIlcWXnMl83eefFgu7A8JJyUlsX6AHUJXq\nsBpK2TzQ9DL6VtbFMxlYsnw9TOkIRCMvPdxqsx6YigH9lKHamO3Vbh2s65kS\npp0jVsdzVt++DxkKdcmq1vH0AGnKlYoXAaIok4i7//ZaGNMa8ODNp+DJGDG6\n3Ff7ANwT25fFjI+GHCokmUsh3VNh2h016YROYfEA4bAKrti19BCE/tMAlTrv\nR4/+ieaEHfMyovfV9KJHVktiNG/e5lTTI4GdGqCkixVTVwYnBlzFbZDuK9VN\nyVGTrGjJ3hZSFcxhVl+UhmhZeqMn/z2jDUrpqV/62iagdnIK7ojZsvc25lk5\nu7ohrEVuq40ImWSroggZqnCaNjAee9TEE8FVYK3IZai9uJKpdnQl9OwYvBBK\nBDxyDHifAPHqfPlUGbXe0OdTjxp8ZhIgaB76/Z7P/SR2L4mpqkn055uW/TpJ\nG+9D+D38Wmxonx6fViQgYJRjlU5b2pmaPfLJigMjP8LqjIa2Uy/jachmFWM2\nM+IM\r\n=fxLE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcxVyidntiESFh+skb1jo+d5P2/6jOJXvrXELKnMS/AgIhAL3vZ4EFydb0PP5ruFWi4Y4Q9dyb4SY+NZg3sUnF7Q4x"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-694aa50.0_1562023850832_0.9163710065734887"},"_hasShrinkwrap":false},"0.3.1-3049905.0":{"name":"graphql-toolkit","version":"0.3.1-3049905.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@types/glob":"7.1.1","aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"30499053a0840ce5a5ea7d6ec91e6f7912a33ffe","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-3049905.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-JIUh8STcA3v2dBYr/2tZg2L+5flLx1LePr4pX6y/ooZATw/ASK6M5HxTf2WqSIMFbI6Wm8pr/5MkFvfcgKYv0w==","shasum":"dcac0403edeb5871b595dd77bea296ee7b6661c4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-3049905.0.tgz","fileCount":269,"unpackedSize":374366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpf0CRA9TVsSAnZWagAAp/UP/2Nox90SiLSoX6Jaa8Cc\nsxPNNbGStwYe0It3oVCi9tBW9Dfw9Xd9BdNDcZ7jh1J7QHUMKrsPfsNSR4GW\n91/YBaAsAwL+XoT555AKN3RPER2XhU1QMTvSOTRm325g+dTlwMPxW9E1TDFC\n+1QlCjhnA/lcPu+ydof4OVrU50rRw/5xqYsN3Mzw/EufvRJHQOoY4P67E+MY\nJnfA5b3N0lx4cbSvmXo4VJGTFd9+RoG1Y0Y8OXtPYBa324t5uQWxqfV58FsL\nURZh0+6zDr50B4STSRClbYiLkwSQsDNgQCF0IFu9bIjXYwpY4BydIahzrh6o\nsXIWS9MFIXP1pdIzrrh7C0JacK+wORW+NmjVGyWcFKxVfCS3Bx0XT1IJgq64\n8F1CzFknIUrSzcU+O7SBYxMBmWQmMELfACq7k5m8yVeSAxy6mViBaso6+v++\ngUhf2FyVLVBNXCjnX+YkucGMm3BeSkDV2EXiD23shtXV6Ey69YvM1qsVWTOZ\n3+Ek8/CKHMo2juJBWI9D7kLYjUT0PoOf1ifgcJn9ifLxzCZwFQXJqtcxzeIt\nZxk9jg8olkzTpov5u/0weK/c/jgMZyln5FXK0Vukd0j5/2jyeG8IayyBEZoi\nq6arGIzSQ94WDBpTjurz64LTsa9aosXksiBzZuhPSBovj3aTu7K3eLi5FgWB\nDDks\r\n=KQqZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEjt3Qwkr2CS6yS6/l4WO9y21TVP5wCb0MFnOWBUUe4eAiBPUq302k6ZyVvoSY01kzWnL9tPyidFfWwX9ad2e5yY2g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-3049905.0_1562023923449_0.03090163597355966"},"_hasShrinkwrap":false},"0.3.1-177043c.0":{"name":"graphql-toolkit","version":"0.3.1-177043c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@types/glob":"7.1.1","aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"177043c1f9c6f7c20b01fbb4fa696d77490164e9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-177043c.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-yAhBEvdIrB53Rl/ViBrFTTBB+E9BQXeE6gZOnykDRTeW5Xp73U7989FRSb8A7KolBqy5uuboOB9L2Evi3uyOBQ==","shasum":"68b44b056ca3910f972aeac49aeb507bef63b9bd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-177043c.0.tgz","fileCount":269,"unpackedSize":374534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpkoCRA9TVsSAnZWagAAtU4P/iXwFvrVTvvVo4s9frFD\n1oht1ee+Pm1VPmjXN9lxS6m6wFdIMeq6zERxJrrxIQf/JTjwYjwtMmnXpJal\nSvywbsOERrbUgKxesB4pgJGmrLxeZVH8DV9DfZ4mtCpau5KfcQEtXNtgvUV2\n9VnY3OtEESCDpn4QPYbb/g4iy1vpgjIRnXZFW4a8ubihmntRFmIEGktWOr7A\nDeZCkK4newYtsnzxV341yILLpKLaTUu5zIrkRAPZo/KKe7oKCsEyXF/HWGNX\nxwbW3GeMhNDMh6TgKx5hYHqTZ4xD3i/vJWTCXwSL4hRY4pkavgdhB6Sjf0gN\nE1cgHXY6BG/JLA9uBfMixD9Y7A05XRTE+NDEFtNRPvd03RqiM24Be8atzV+o\ni6H3y8vdZOEE7dnrs8ENPkXDKVPC/1PMEgx86JzO5gjwa3/p4n6tlQl2k7K0\n4Px3jGrbZibP7K+tptxgykqBEuGtCpzjkeeiPpnK4OTZ3tqVmrVvxScui0q4\n7BDNDvUoPZR5uI57CgpLTS/znCe1OVoqPZuHk7I4RUnSVzZX2NsZyMXknSmC\nLrP8hkoAmtvCV9iPcMjrDxDDQ9IrgBPSOOEkMKL8d42UbrAoIBb9gZcIDd9D\nlVlK8TJMHb7SV9+22Ai8AAIpcpDaJUzxAkhN1MylJmOj1F14ytldc3OykIju\nPtpy\r\n=sGdQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFIsslyNS+Z+Pmct21NwkR/0+LEBnjYu3ULA3cylQ3ZbAiEAkeaS/O8BuYP1+LQOLCTMJKlxGCv/Z8HKQuUdI7KRN7w="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-177043c.0_1562024232003_0.737751552000524"},"_hasShrinkwrap":false},"0.3.1-63d612c.0":{"name":"graphql-toolkit","version":"0.3.1-63d612c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@types/glob":"7.1.1","aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"63d612c4798c466058c04409a740f0a947596b0d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-63d612c.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Rug2kx9yalbFVcbnpSbZOZK/R/Pq1Bj9zEuY1ijyXjd241kS5WZOPJqi2eaqudW4kWsq2QoJyzmbPnG8tVixyw==","shasum":"a7d89337f3ce7879f9aef1b73ce93cc299070293","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-63d612c.0.tgz","fileCount":269,"unpackedSize":374534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGplzCRA9TVsSAnZWagAAUWsP/iiyhgHSlp+lcMJTKWWy\ncQ0v6TGwnrjuoQvDbh7eBxnEgomJft3SjpGkcTZuqZSMANYK2qhA5GVDs15d\nxW5qHcejv2vnnWbarxXne3e/RK1JoBypsi9VRqBUNJl7CxdPLd+0Sp7sOpao\nKP4AxbsmJ8sT54lpu6/cswOMr3adovqZiHwmqQ4TZI8q89rdJ6QnvUmr9POz\nNUW/wfuoEZrs4EMlR5yck8SIpH9IAOQ6b3l78QHGOYziu55YjZEL05oOIQzK\ncjDVu/GixzV+ry4JEsL4wYWRZ2KBheYOO3CvZSLf4MfpJMFC9Viw+qirDKVd\nuz5cGx5NV2VThh+9EGeUzgrcN5SZmK0ey8voHFuc91czh5ER4IxCv/mhBpOw\npOe76/pFMKYtHxJ4XVI+Xf9ew3UuzETxbQO2W0jN+JOuCeRcrSAdOGc8vmly\nplWpTiJn0FFY4W0GX/A3hMluTUZKo2vXSbvkj58U+Wy9z8/O1wRs5x5qkLiv\n2ksn7x1RB6QcFxxpYqNz9JcPTXGVa4Rs6Q0+7JtvrAAG7Q9+WjuOp4uKSH4K\n9AidoBroIQDD2bkepN0P50UEeOx0U+E271l028oskUDevMmnYduKBRS9hf15\nuJo0fFoNx0puvgXqAD6FKVc7se7ODMCHNwuWFBYkgLB1rBFszTjsqTtQhZIl\nkF1G\r\n=zA7G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCb5lwzIvqYLmivdCbB/R52m3JhXuiHMkwTrWvC6K0eBQIgPenLDN3tuP2dbJ80p3BXx5cdzqELqtqIh8O2UzQDg/Q="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-63d612c.0_1562024306586_0.2914887549504468"},"_hasShrinkwrap":false},"0.3.1-aac21ba.0":{"name":"graphql-toolkit","version":"0.3.1-aac21ba.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"aac21ba88e7a4c311f49f175acee121ff6d3660c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-aac21ba.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-0JZP7SvVLI4Q5pQ3LxaJJs26U6GBacKmnAmJM/71pv4aPikmaTgC3DjxIEQrQbhRes/fwLDAVAjC7xVmBUJKcg==","shasum":"b565354802c40be1f805ec3ceec71f5aca038792","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-aac21ba.0.tgz","fileCount":269,"unpackedSize":374322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGpzgCRA9TVsSAnZWagAAXvUP/3fXvI9rULV9ygi03uU7\nSzsE7skGIH7LWn8Uyl57mvZB3vfU7cRY4a/RwviBpp1Q+xa7VkY0CPMGeMB2\nzS/65NXueISq5TJpblHPNpq4GECf7AOVHNx/mX1BOAEAG6gPIuZqlilXrsVh\njR8ouBaneebD8JvjcJPLG20+SOQflGOq4yTCOb7qABEKOHKW7hGwcrcAgPaC\n/HMUv+vjtLZu9ekYYI8BeWgbnSxdG0eH8uCNNwLRvb04WnfWwKx7qk1dDqIv\n2DXxVJSH96Hu2geWHpfYK7GnDas8oLcONR2bZ5RRRvfE6tpcYSb94MpamRzR\nhroPjijxHrkakR2hRjuBlSbE8oJRbsje3mKoTuTOsrY3zea/uvPUwflkDi3o\nFZn8jY/AMySz4Or+2p/H0z9NILycVJ2Y7G2kXB7BdGDmJAJ5/kNr4VHzUliz\nR9Egoa0ytoewFcvUtSPqkUgXCDtdrOR4CmsdEifCCordVuKM9F44gXpde9cg\npAo8e8Ra6go4godEom4cuR4DFycAbh+J3zBlYe2LpARgXN98S8QFKuqS3j39\nsL1ZsJ0crswcU9KekMxJO/rqsrGrYUnWJrua30NenPh1XdKjP2GlVm4x0yEP\nG79eSTaFo7jgZZfmvFpMLCdzxsEJArk94uIAeTodj/oj+oceQdD8GXzZ1gWh\n4mpD\r\n=z/5p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6Ysu3YsVlbr84lYFF7TvbxEplnu6LWli68DMkg5UYEQIhAK7kahYHno/iO76xj5p4acoxq5wTRwwv16RvuvHNWhG9"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-aac21ba.0_1562025183563_0.8286785228412035"},"_hasShrinkwrap":false},"0.3.1-e17a63c.0":{"name":"graphql-toolkit","version":"0.3.1-e17a63c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e17a63c0af0b72053e44ca2f5e4457c859549eb2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-e17a63c.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-vXqLSTb2GlVO82Bgt5+x8VFo0EEadbFCQyY0sAzLfO4DDybhNH+1BJGp6B2z7qiV4FEWoRPxS0mwouv+jEBnTA==","shasum":"bcb7455389c2c2836777d2d959f40e281562dff9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-e17a63c.0.tgz","fileCount":269,"unpackedSize":374490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGp0VCRA9TVsSAnZWagAALxMP/iwN2Qg+uo7ubct3raP5\nSRQjcDJKKAOsKiwVc+fupsQapLxAFPYgbNLRyaNMJIiBvPjtABrPuyWaGj08\nNSQ+rJGlsqNReqPg/FQWXGFe5IxnGTXREIn3urOuC1a6QCpeK28wOEpcja5F\n3eFzqZdTenYisH1qBC5lc/1bxL6OhdeVwSZ4NBNJI0MIQAPSwGnDfoKnb8NG\nNSUV1qYSJu9zVkxo1ZKUNmVSw4x8yvjkT2PX39Q67rqi0yWhBxOCyvyFKuUp\nvKValmBc+h3AwxHnDewugtS2zJct5GH59LHys5hpWqMv2ACBOYSQvI/dSV01\n5SDA6pJLVI6R9ncDGjHh4ieabflalIKuLnr9CJo1ClnD2C+qTaG09QjzOfaD\n4FgWmiet6RHOVhnwkjndydjeo6sFqsyJjVbgrzmfvTAJUauYCHSzFTRQsmTF\nQKZpaeti4uKKinNOa7CHA3Lrf/twHoY1+m11pVo4ZQEHKJdbYNYigvuj+EJS\nlkGofXfTaydm9Q6g4K3G3F0B9YYTlaYuwYFBpVD7pK09u12BS62RkjMFiYWR\nRFJb1IHqi+om+KA1eXc7Ur01vc0ozgl6N0qMyBKSpy2HJLkoMSYis1X5nRtG\ntgpGdpXZDdi50FT+OFvLKt6qYi78uEV8xm5BTTXOqoNo1wwVLI5GZ1lAPmcT\nanJ9\r\n=d+GS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRbj/S3QKLbf+7M4IrwJi+5QF+xq4Cca0qouBxBv4hawIhAMXp9CH2+l+O4L9wFlswWz1DfpLuTNraRJTmTDaPr0Qw"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-e17a63c.0_1562025237184_0.9602762444488131"},"_hasShrinkwrap":false},"0.3.1":{"name":"graphql-toolkit","version":"0.3.1","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git@github.com:dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.6","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"licenseText":"MIT License\n\nCopyright (c) 2019 Dotan Simha\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"graphql-toolkit@0.3.1","dist":{"shasum":"2a66330a38ae5c1e4d276a77f73f43b8a4d0b99e","integrity":"sha512-KZvqapHMRjQ68HB2winh7GYV2rCiCgrK3BTRFRvv25mlbTQpunklDVv3YUeHHhj2us5I0Qn6TFxZX7rJN0dhxQ==","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1.tgz","fileCount":314,"unpackedSize":381979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGp11CRA9TVsSAnZWagAAwRIP/Au4rFNVkc7aJsmqIT9h\nfaBqGV3NCQ6R1iuskyJ11iTQImvFar6gcrp4EkMfcPo7bkHxtcRKbMH2uauc\nrilxNOwnlfLbNVE21Iiyg/bU5ENGvzyWy3jojkrjlD3TLUbiwInaaTRxgeoI\n/jFxTrao4MuVpyqv4p3KuLr/c4jn89m+ZT9ZxK7n4isUTx/i5dsmzmHvCSXh\n61gY13oqQKFjGUPJoBphQHAhVvkryEjCRAdCfUUqs4blgcg7u/e2tca5yb+B\nvZVM6JC8UxWLP/qmyI0rLsIL072RZKl1ou00ylZJMj81kxa81QpnxlV/i/4z\n9LSMZtrsRPNyM0GQIxY90/ugkAhxwKaV/Sri96UQWlY/70A6opjGG1e1quPr\nQvD1EMjgKDWnBRynVEAA7STGAruYcn56/slTi87PGcx+bhdk0EgDd3uCOjR1\nPEOG69COZF73PfYw8iuaSuwACAIV1n/EAgnHVUzVQsFtgz8VG5GCrAnj/K9i\nxbWxHYpb1nzflqlTYIzIt2ns1ircL1SUlAmFPvRG5vOabsYT8nB1mpO9AHp+\nwvmfM1+chJKVCHD7ZkVGQ/vQ3ACqt2VSv+F6heFogPfYAmO0lYW5OspwC6Bz\nWk7VwSyHcMwAMfhISNuPw6a2/3i88ZehUecXaAyfayruJg2MVobKTw5RhSBP\nNDFO\r\n=ZyDB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFvdwl1+1Z6p+g7ITbTdgRCkp+UaN36xEAihGBH/xilVAiBeH1n5UGUQWmNU6ydt3TpDBmRPrub3V9m51hnvFyOKAA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1_1562025332885_0.39372971393589995"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.3.2-88d6e58.0":{"name":"graphql-toolkit","version":"0.3.2-88d6e58.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"88d6e582cdf628d5ff142504f766caa3153fddac","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.2-88d6e58.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-1CnXEUjagmyeuLb9CUJdtF2Qeau0ZoYp2bvujVI+06i/YTWUqdrgJTluzrZPMTfbQB8zb2Dv2UObYpWVFay7mg==","shasum":"7fdcbb1bc658f498380f2037347d9d8d011b0285","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.2-88d6e58.0.tgz","fileCount":269,"unpackedSize":374502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGp22CRA9TVsSAnZWagAATboQAI6yA05D/WbH+MgfDAyg\nocPCHBlB1OK7QpO0s/sTFV1t+ZPQbJBKCVxXNT3o1mC5eFJU25t9dTpJXeIo\nmk+wbt3WWp6UgD72zcFb4NX1tDHBFYjcCHAr7UaNSVEkb81jjgDzYTs/DLBM\nLmghw2dl88D+iJE3kiws2w1dIEaAUJFBPAeKnNYVB15PINW15miuzPT+xlD3\nbCbgAWhKJEK0WS61GQI2fl9eqsswYBV3+JY49fhqfTGR/8miosdDonnA4E+d\nWUt53mMLh8s0MH+w4CVOyw93Zo+Fnq9pqleWmKJy9fVghMFiDfUBuBGb8KJr\n6nt27bd3dFDSyO8kd/oxqDFoR6B+G4fykVcqQGVInipRd4InZ1/gy5NQNBmC\nMnNV029GQAs+J79t1TAmnmoO+axbE4lcReyL1tJnEFIiV8Ip5V8m9UyDzyr8\nz/XKaxUw3UhiHIVlLu6F68Ehv1YkL8QKE/tmlnf20bttU2hBudxIstvJy2po\nnWwHMMZbgNlxUvDYPpxkjOdL+YVG6JtoXvxEgCm5zNoPk3Iru8p64ElZEYML\nMyPzDWiuY/BGpq6BJofCYRzgm11wog2HgvLuiUKyoQjQteDZWNnTKRC3cHyE\n0LhCHUKddcOS1qBXDPfXKkn6NGey29mExJcLG3d+02iazYjqS9vgtGXPwmBq\nvH2S\r\n=aJCq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSBo0QzIUOaYJtufo5JNCfCYPPd9kQBUGhwXGe5X41BgIhAIuuv4OpuBT+Zhv2OssS24b6Kr3Y6l1PyJ8zg3o+/GXt"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.2-88d6e58.0_1562025398177_0.14235596531557682"},"_hasShrinkwrap":false},"0.3.2-76d2637.0":{"name":"graphql-toolkit","version":"0.3.2-76d2637.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"0.8.2"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql-tag-pluck":"0.8.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"76d26378191f137c9f5ec6b4335168a999266666","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.2-76d2637.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-TfDYGxV7GnIuLIcf5VxxxkR1agArcY+7z0ggPv6MQgjADPBLEH2ut4kcPDplfnc88tniIVF+smuP5FfDN4bZ2Q==","shasum":"2f488ac3d529947594a7aa2641f661dba5d447c0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.2-76d2637.0.tgz","fileCount":269,"unpackedSize":374536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGqkZCRA9TVsSAnZWagAAEBgQAJI+EWlVddcNfl/HFRbZ\nWhhMUWdwnBygb50EKxaFTIfK74VNUjauvVQEsIS11gWEspfCNTf/+/tsSeE1\nc5k9HlHBgtI29kfPPdXIeCgnQdh55Iex70Caw4VdnIMA2ytU87Pir71g8beZ\nCEfYXVuLerDPD3AovO8iwim/lgHC5bhV2HfIGs0KiXfTfQN4nxgsZm2qbHUT\nfJSfYUY58eFg++su2/Of5igzvUI0hmCp00317JS9gsbQvdEeJPWN02YpSQpC\nxRbGVe9zWISU0abhYt/Cu+1N7OjpWQd5umzGCaDYIHdR65QcWDS/9jGORg56\nxIFvGE1xeOIn1zl+C2R+MeTpxEdIzdWNFb/17v9yxca3B1lpuv9mQDh4Rw+9\nfP6hiJXDKjM54Owmv1Z6iUnYG+VTXzIq/B697EXYr3KTvW6VAxvzhSghSNqW\nV7m++AXgqMT1LyJn63HZxmoeP2WXvDE355ZIQnBcqjskon4ryxPG3qf2F0Ly\njLsligtKhKGz5b0SDFjXFoz33iwRPvjr60sUqv4IvoMv59yDNv+ffTXj5gaU\nqubD0gDWDCmmMOcrMy7Q2RN8p/+EkuURkFQNyamAfq0zOLAovA4yUjmVKA+n\nwOzLs/aTh+swxJz7fNP89HeMlm+v1BDV6hqXXvE8x5giC9GY81HzPyqrkT4P\nI+jF\r\n=x0M/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCv/5S8nKt9xg6KGQNZjsFvQpJIRz1jda5LbyUdt6l9zQIgAeudklvbRzZX1v46f3E4m8VeP0g2KLPkvFHJN4/t4iM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.2-76d2637.0_1562028313106_0.34192520700834117"},"_hasShrinkwrap":false},"0.3.2-87d503a.0":{"name":"graphql-toolkit","version":"0.3.2-87d503a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"0.8.2"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql-tag-pluck":"0.8.2","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"87d503a6e110c91775aca257bb3d2ae35799d638","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.2-87d503a.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-IycEvBF8saq0DkzFH6bJHxHxhROHvw6mtnuSU9g9DEWwyWN41dQtE8WBu3g+xUL9afgv6ui2CQMRXa4uNiWgdg==","shasum":"e2cc4028c4ac30af3d7eb7f057ac5bfe8d115692","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.2-87d503a.0.tgz","fileCount":269,"unpackedSize":374536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGqmlCRA9TVsSAnZWagAA7UwP+QE8X6QgzBKygy3L871o\nBOaNky+KRs+A9G7Yv8+85WQCv/NQv/xRGt5xPZTPfWcNHbkzqYuJEhCsLpVX\naiG4xTDxJj1+BQni7pprpy4aEIwZytvPhzHc+Fe5D4atQ7Mz3U2kj+5VWl1b\nBr2kfa+xQOPWVw4P7b/h7s/FX5A0cKfsuxHyeH2UU8lzcRZAVuYgBbRxzxMx\ncU4R/KxpM4f0EeHSxZjEy1Npu0XJmYxAPmQxOVfqg9wH+PRbGf++Whq60xId\nx7WfIr9zANGa8PgvYjbltJ3KgI1Djuulaj/A9GGG+AFj/d1f1TmgA2sYXmng\nCIKnw8sz5Y52GHwXJmVvgnsO2WTj+00ahlQtIol3QPpgHhAE4RMD38JfZ+L0\nAUXsm4GPTtP+NPNylaU+KTlCWK5cY9cHoMtxwxWreh1f9qhyX4e6M0/PM+EW\nAT5bALLqJQPncqtyMqEwuH+eNhK2Md0xZ+CPZkoLmKxy+4HgvPg+TqicQvc7\nyvRNEZuIew+zo3MhN7zTn7dRfHe3jgfx67LgoJBMSJehyOAOW4NQ/pSfuNkh\nYbc1PBM8jHjOZIoUjvGY87FZpoEZpOttJp7w9tQq19yHoYVpTj+749cncP+y\n7wBXSjw6+GFHjALyJgwYl1e57FfDOWOzKL30BWZcEI+KNeBaZeCPL4EMFzBU\nFHhE\r\n=iPjm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHnQg2qnL4TxBQsDZzb13cbisT1dsM+ZqZIBlER448NHAiArolyW/y/BboVOsZ6ZZOVJRIokuZn4JSuZ+p3y3qPvXw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.2-87d503a.0_1562028453297_0.8359179766330624"},"_hasShrinkwrap":false},"0.3.2-6b96fe4.0":{"name":"graphql-toolkit","version":"0.3.2-6b96fe4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql-tag-pluck":"0.8.3","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6b96fe4a38cf99343551578ad3c03c6c98bf3531","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.2-6b96fe4.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ubaF4EE63+9qiLfC0x+rlJCj5XJmIuYd40BWwa4DHjQaVoqACKYyDZg/tkZQsNRlJOpeXKECIz4Y1KclBXV1pg==","shasum":"562532f7fc2a5e008609e8df96c5bb08037db9a0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.2-6b96fe4.0.tgz","fileCount":269,"unpackedSize":374536,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG9aiCRA9TVsSAnZWagAA4WgQAIDl94y2txgjdjZjW5do\nfX3M+rGlK0vIkQVSONFK0cAHC+N32/PbPTuqkvFE3IY+VtQIiTp2Z4ZsoQrS\nLexJuRm4RrOVnLoe05JZLeXLjUCM7WD7ZJXg/W6OCcP/3/XEvAAEin4Oc+Kj\nOeWpv0nw4cNy/NLex5kfZQMVkVY78GPKq4fs4tPP0Eqrmy8iZIHrrpeMVdoe\nYxW+q1S9RpIax3DQZPCNGi7CJ3GmaIumF4dO3tV8T3ZMHaSAL/jQCHYXLhSe\nBOKv3gZP+3Xhviyix86RMnqV+lUFEgOkMd4ThMrFXj+9bb3a2SmHDrlGGyTC\nQ8ozyouwb1V9pZUnmqUCeyvixIX/YI77ExaFr8BurwYJvxKYSlDYRgQjwtQh\nSMe0Wyo0fJpEbOED1XdFNiUf5703WFivmPBA64U7FKbbAyelfqamevYgWocq\nbvDv7LHSrRsHwkD/Iv0t5tYomiszoVZifL1fIjlJc2xJ0dOnkwIlnA+6UriI\nFIce7iW20XLzXG9zxVSbL2chEgekHgV2i5VIrlOLfoUZdJUu8nLaQNFDvW9/\noTm5GiBzb4NibzlI5UpoHukeFGjBHQj9jB4KbPXomdrQE2kMqINugzNBhkU1\nMlOWIMTJ7Lao4Tf58Cd/OJed8rYjYtA+J6NrfS00AKmo+lJt8BiPfPBuD+w8\nNZXE\r\n=xqGi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCGLOOVDbtdqMLWkX0F9sXlK/9ySwnvDfHVQgyrovzpwIhAJSOMJwHIhviYbd5yEcIKn5ivdKvssbtsE6PcVNGcCTJ"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.2-6b96fe4.0_1562105505766_0.8133329754100072"},"_hasShrinkwrap":false},"0.3.2-a1149fc.0":{"name":"graphql-toolkit","version":"0.3.2-a1149fc.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql-tag-pluck":"0.8.3","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a1149fcf0b199102fe1dc7b8ec56c3e35011f635","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.2-a1149fc.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-cDImuP0D1gf0/IrKM3frCAT5pPgZwzjc5Jye/dbP1Lr6Nbm1+Bd4/7jogEi7AzAcJx1UqCwYuc9YC0nObzO/FA==","shasum":"8bfc27b5a47880f601916b256ef9bd7198fb0801","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.2-a1149fc.0.tgz","fileCount":269,"unpackedSize":374537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG9bvCRA9TVsSAnZWagAAbMAP/1rhOwV95WWOt+2xzemL\n64DKaXfY9SeZRM+kQGCu5vfa94eh1+3r3kLBbgF8ExFNM73OCMp8R/aPn6FO\nn99dz3GKSvq1l03lW2519iP+Dtydce1MLvdRBZjz2uGOTkRawBBwYAoYytFj\ny2B4ofHm8hwuxeycPihqbgswcASZUFHOXgAMqkaSZjks+hF4WALsG/86lA34\ngyM9iZXEGqlIL99i8vUJYBta09cSTsN/zqMwuT36U/kyOnIGvRIQf17Zz5G1\n01F2PlvMFBjk29vtkrVNe14n236l7HCDmjwsQ2/260ZSP9XzPxWffl/07BJi\nMpFlj9Nd2qYSVRjHI/ijfHvesssW7JNSoyQnK5Ns47ku++7nyMj1zw9aOTXv\nfOQsyrXFflgZgykJNOZNPglhbBg/1DWF70VUze7NhBpHPjnXwVT9C3ui0DAh\nxrgwyq7NO23K6vMnyWATOCO2Dl1NHrflys1aLoT4ZsHdn0r81yavfOruyNtm\n/+OPihDEiVwBOzABkvlQOyc5hF6zD6S0I2dN3CmkvjZrWnlP5SNHn+Gqc9NH\nyBRwQ7ZY07FgyP3sHGrnkZ7BmzpdnoaOmE6OVFtonlGBL/qqxBKji1bv7KrR\nnqBhaJ5Us53LXCmc4LcOOMi9fajNgrFCLzQTOHNNbQPcUsVIq4oIZjDoUHoa\nJ5Zg\r\n=dQG1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDOPhLXAtAlxrU8eL5nBbPUoIz700A0k3LR6zf2CJQH4AiBkkA+u0Aj/ypPDIrfVUNhKBIwOJ3MPru6N8cBV8YQujw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.2-a1149fc.0_1562105583359_0.1585033166984895"},"_hasShrinkwrap":false},"0.3.2":{"name":"graphql-toolkit","version":"0.3.2","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git@github.com:dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql-tag-pluck":"0.8.3","graphql":"14.4.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"licenseText":"MIT License\n\nCopyright (c) 2019 Dotan Simha\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"graphql-toolkit@0.3.2","dist":{"shasum":"cdefcc2a8c0f6cdaa0d54f362fb4fe91e86bff00","integrity":"sha512-nWLdvxdNrIKQwxx87pDZpSllKkTZLTaS8o3l+S0oFNESEIkkuqToQabrDDE0HBIVub5EOQYhDtkJe41AFJhkYg==","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.2.tgz","fileCount":314,"unpackedSize":382014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG9dxCRA9TVsSAnZWagAA9B0QAJVeWYQunMc6prImXjsg\ndt3mMnu5UOLXwgNMlqPmQOD7Vpl4905AAeeaCTxXC7wQ3cAseW2yAWRfSKEf\nmuaDdNLEtc4bGBRxKQws/OQX0GHBCDeGvncuAVu/O3VSVLHW2IGZaSQMDXyM\nS8KMLmbbGRgSS43W5Z3BMJTbc/ioezh5pj08qojTzl6OK7sWluDjFDjctk1h\nvBHOji4T+kmvf+KrkqjrVpSUBPzOm77mUDkuDAqj2to+8dRbjExUxUQzwbBY\nh8nF4lZd0OkW3KFVBEov5tmXNcuOjzBRXV75Rbk8yXgkSrBgNf7bK/Vm6ErM\nJe8Yj1Jx7rL41+mD9vnJZq6z98S4Y6CPXhvISDus6+GR/ZCEiEhI+s6tGsa/\nWln79bHPABUvhz01zt8rvF10M8ZExiHPEJGi9sY/eOaaUPmVl74RVhCd+aIj\nnN6GrEMOE5Yu5c4qsJtb9YJMek/g5qZdgn2BQVNAgYEpENuZ9c/F9PVc5w8l\nOw7fI6T3BiY+ShSPn18LCacO8ifnrt0j1eImlTR6Qo+GQWLWqbT8ArBn70TE\nLiQ8+k3ElP9l5dBH60QigB8PmftqQyLPSkb2Hne3uv574O0j6n0eRTlYratq\nF4SToj7WzEw1yYXJCOGL0KYStMnLqA6YRHYy/pAw3/WJwhGh+jMJ5qIZwlIL\nqpKW\r\n=SZDp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCguqmUHJ2wthTIh5Vb1ozBmPgZ+7BhNAjEX0XRBVk6egIhAI3c0BWeiix/0L2RFaUcSx9ToozXVMPXqSkS0Jh9K7R1"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.2_1562105712530_0.7598022409685927"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.3.3-a01080a.0":{"name":"graphql-toolkit","version":"0.3.3-a01080a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a01080afb6c94847dbafab4ecf2c2a7f560bde43","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.3-a01080a.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WqJXerajoFCGpZk3JfRhw+QjLH70dWnw/k4FfkvFTEHq5LkbsILTZw3XKez+hVFnioeN+RZCavrXTmQKgRQ+Lw==","shasum":"5292bd76b4222fde63ac1c6ee021812977c109d2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.3-a01080a.0.tgz","fileCount":269,"unpackedSize":374537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG9e2CRA9TVsSAnZWagAA5C0P/0gtaJLa7UZXzo344IWh\nWTqkq+r4gtFPHl8lxeCCaIm59A4SqKoSSX3xqMmrcHcBN+GMI+zh4RumLxuj\nstuxmTVhoaC7ym8Q/qHA5qSPWvGSmox2CiM+FDAWa/urJ/YC6eMgf3tWF5vx\nqJ8pBOst/4RSjYbfKriO3yow5I5LoyM09+964pI75CLSg2O0Np1Z7kNltSkB\n+VH3ITI4XcNWR1rfKoFbsV2AVUu5GkfdKOBLywt0QlHbDSemJmb2yuxbrfns\nPy8boJhHWAGoL36b8whXngl9Cx4oNkC7x7J6YcKXeboPID8FKOvgk5twXVLO\nJHVIZc0KNTFdhCzyK8sqjI9oqFssPKAKPxEXeNoRkLCfBcEGxZ1VckvgSEb8\nKoAVgrqWxm+Q2o7UuKMIDT6B+LwTvLcC9+9wJZJM77ZSi2nD19fAYNrmWU/T\nXIROJfeewdmg7YwhBoVwkM7QTB+juCvzWssEwmXTMSl5o0iEceONIdVfOwK1\nGdzdnNNsn5Ya/tsbU7W2IC6Pc7phumRjAihjyes7uooQYGwsOEOsfIpi0wRX\nyfL827V9mhbaRfC7xn3m8ARK5KcYtKQ7lfCGvYbRQlUq0S/5F+n0Jb5G894t\nL+Zb3W4B1NsJ+y+wjZSEjh7/dCsvnb1jMNNBegAUZj9YI/VlwejvO2BySYF/\n1t2H\r\n=tGut\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDs8HkCV7geHITXTpicByfXrMjRagjrv/F0ZDNCRlMIFgIgcjNZTj3euAIH+MZaiaRxWiDD3vvPAIrM+Ls/CJvqysM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.3-a01080a.0_1562105781848_0.037910752347481536"},"_hasShrinkwrap":false},"0.3.3-3d0c0ee.0":{"name":"graphql-toolkit","version":"0.3.3-3d0c0ee.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"3d0c0eec75bf04eb7d3673f703a210c046872703","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.3-3d0c0ee.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-nXEPy18HS/02iBx57C/LA5lb3fDB6GYHRUX70bWagQqIZttj6BW1t+Y/k/NXYYfuAqAXQ5YBhJ6dCKQsRXdHVw==","shasum":"fe4a26f9d013982be52fa0fe0f21cfda7bdf6e83","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.3-3d0c0ee.0.tgz","fileCount":269,"unpackedSize":374537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG9f/CRA9TVsSAnZWagAA5nUP/RNicYEQ3CZ1cwOGUidx\n7YNd5rrb4LS1VBov4lMAlZE2/lSiQkvn8Zz0QgjUE0N53X3qfzQ9r3GpeBsA\nHZOiULTx07+zrIL7g9jdfpeeZjiFTyf5Jxu54DVV+nl/eVDBY8MDx/Igr0PY\ntTm6ii0MMiyeKu5e8XCx/LwEVWf38+Oc5xkVrEL8vYkkom9AZuXEVECGeM1J\ne/yoSJWVTQAvzLPMCDx2UTJZy0m0eIrlyvu/Nglm3FE0JHSSS0dQCFD3GH3R\nVzv1Iz60V4OZqtyFPa3BTbfI1qcLtz5JPCR/ZPpykGU0AJKkwSxaSdSDPtQN\nb2dkuVEntJbbA2zHKqXDBUlzNfbfncPBJLbIxmfHGoNWVlo4TrFHYB99zT0P\nuQN7PiDxxW/Es+b+3TrxQqvypOFhG/EYPNrvawjkUmYD8yn0CN1TaO+qbwvn\noSCnxZa2r7gzm2yoVuq49X7Gh+dxocksPeOFZ67II9nB7szCOOb+RZwP2jJ6\nN1rANFE4AYS4KLY9y5TWAeITGhwU/nzXOi7DAzuCaJ5rcLveiN/ufgeEHX9z\nVqKRnRgx7qmkjFI/e/WdI4/yXr/SW71rjfCbbpgem3Zo3KTswBZ+lRSYjpA2\n/CJGhYN80D+dFVIgw92rKlqE7HWRdlKQRiyBIBdJ5lMsoz5U/uTG2QK+ofAp\nJIFQ\r\n=mUbk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaigJys3S1rbPypmwhX+zAwLZDbFTHoHTYW1p9IZBkewIgKHY5vqPe9qLJUyLCrxLLCUDPMsu00NxhLA7N9rPvJag="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.3-3d0c0ee.0_1562105854829_0.10574659873608572"},"_hasShrinkwrap":false},"0.3.3":{"name":"graphql-toolkit","version":"0.3.3","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git@github.com:dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"licenseText":"MIT License\n\nCopyright (c) 2019 Dotan Simha\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"graphql-toolkit@0.3.3","dist":{"shasum":"9d7d470efa9a1ab107cc7f9279148bbb1459df34","integrity":"sha512-bYzwPBTAQj2NJbyAmQuAfZ44az34asc7JV1RW1DWVQdB9E6xY1aMfr/c840IFhEgGcWHCkJO4olrTScVVTCzHw==","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.3.tgz","fileCount":314,"unpackedSize":382204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG9rNCRA9TVsSAnZWagAA6OEP/i89OhHMGoJ89wIgujEC\n7baPnKoen1PkqS++A8IHC1OFBObqotiqfgeSW+8+yBFb8pC0V6MoyN8fFd6L\nwR9QO93ND4oVV69qbh+tr9hsaTxhr+gfEkPfB8foxMeL8WUBCD8cxJs2zlv8\nqW+j07XqE2ZFTYm8gAc27Sn2j4OCZbx/DYwh1A4yZ2+eFzdG45mE4xKiUGFM\nIdNild5+ZAId8eVwJ4IKYaIPgXrYWYaqYo9uFzoG7eOEclkfjkx53oRHSlXG\nZ1ppfRpVDGZT0boUlmoXBN9BdXUWEklD29zROaYCPKU61mubzLB03Xy7Xc6H\nl36WJ9eAaw1ZT2CZ5el0Lb3z/bX1U61Poa9jCrcMdSPKk13xaqm/OyBRZ0Em\n8JrgtMm4iNi4CpFktU7atIwOx2NRMU0wE2KUZX6lxTUzP6W7T2TU3CJMgDjY\nqt+HmEQDtqrtWbfAbERTgWcs2Oc5kCIOujg0YOb8wOyh2vKMPtdt2IrS6xVU\nTTv0rqUZLmrrnHDcRzN6mfC0AFQcSEaitCssqJultvj2Std/ozAe8OQnt3CC\nNHspXN9NPtypFoNtiosVsSBtyTYwgQZZ3bjpCGBzjlpnn0U9D33GaK7S4gOi\nODgsL3YfOY5OM1hjL8AXNiwQFfwM38PppZsuUPquFetM7q2XNt0InP1/4AXn\nVJp2\r\n=Vx3I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEuMtL/Vl+Sbl+Zq3WteMUWegl/oxHjOibEn8Bjj6OxPAiEAs7/uqVgr9I61poLf1JE1/c9ma8prLXQ8YWGIbLP5c/Y="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.3_1562106572674_0.6299800193453724"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.3.4-a25eeaa.0":{"name":"graphql-toolkit","version":"0.3.4-a25eeaa.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a25eeaae5a0dd20e8490af65d9bb01e83d49d25a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-a25eeaa.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-x9agxq7Dw6lfMJ2VOGqHrK6GpELvQYKODqbe8Xnfm9DYdzJ5/0wm0eOwSc4mrQV2oTBZX/+QvBqRAYuCiBKyQg==","shasum":"c66bea75697cecd9e3157b36d26b6f9bf8c1a7cc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-a25eeaa.0.tgz","fileCount":269,"unpackedSize":374537,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG9wnCRA9TVsSAnZWagAAVjwP/iF48BLoxf/xU01GJcCJ\neP/Kbs6tIItQQ8ctrNAbnJC5zeQ1NmHmqVv1FXeCcfpJ1nc/G/udX1ntWAgl\nyFhfPtqfRMJ2ILWEpxVq2z5hcXlyhe1OWgOaFtW9/gvb3XD/fEOLMb0A9ODd\nHKPlIbn9p3WrfzRQQv/sNAfFVyMh9fNsEf8W1avA2n4OyTr174MRO6Q5zapQ\nfxlFdCelrLz2A3Uu00Z9/BJaXKp/XYUZhaxze/xP6ESA/niTYnThvGBpo8NG\nF/qbkwV0K/jHMLUZn4KL3y82cT3s+jOCWE+YBHBxLVTnDCH7jjAy5GWQsMd/\nwDXQW3wbkIiX4Vysluoa9pO+MJSkSJ9qFdtTQ/OU8P96rlfPdG1PX/lX1mx8\npEqzKTqOqKxwkpylcG+/1c5DdrzIRywp6N/apQKutwBXyL2qXuu2xo3dan/V\np0O0l6f0jYXBYkfPlokmxjeDG+kXmYVhk3EzXoO8l8aBM+afhQO/0nzk4/rd\nhQevGh6oFnlvhXW1oUcSGyxYCOheODK/lLHOzcfKCEul4ChBZAe7ULJdLb+S\nCnvyVnI8CWO1GyZt7huUGB7s8Cu0W3y0uFMGLjvvhYA2X0bgMrqrb5gzZSv7\nHEmKxpyphGoxHe6Bp6NoytKRy2wNLT9OBOXMHziqHJHIz1RJ5xp8XPaZbOLw\nhu3m\r\n=xxGu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDKlAAzRJExYNcQaEhAJsq1r76PStpCzgF9EsmL5WXQAIgT9k+hCEk//3p7JZf2LOzfztf0CRtTQM8faYMWAXezms="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-a25eeaa.0_1562106918978_0.7605725724124208"},"_hasShrinkwrap":false},"0.3.4-191cd8c.0":{"name":"graphql-toolkit","version":"0.3.4-191cd8c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"191cd8c050f140eb04560123c4fa00bc3c218aa3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-191cd8c.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-c1HNN4MoDcEy7H6mudZZLLCXMR25r0n6LNmCjXgapvqSaYHyGgPEg+rWDtnkcWf/DcpuEu9MRQo+dDT1LxoQ7g==","shasum":"0df8e47f59b8f51728155ce3f1bb21fdcd2acf54","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-191cd8c.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdG9xzCRA9TVsSAnZWagAADr0P/30NdK0b52CUYcehZ9Xf\nrtsTNNSZX87JoFkE1mbygc3uEggIjG/enIWDP0S8xQqMYZKdnvxv5RSAcJU6\nYsSWok1WY5shXcmJYVLj4672zSdRhZeqcKFmyZL8FMVIJFpCB/krkBtI4ZoJ\n+ZA04SN8UqjXLnI8Eqkfus9jl8B1CAC3YmyxndwAzXABiLdUR/QBsJe6OF68\nl8vOtIEBapLOLvmph3RRg9CqS9cCHLS84uYTcQHDSCnKrJfBF2ztH8B0ZAnc\nLV0am+u4SJG4Pp9SG/mphrw8kQCte7PPrwvsl7vV08Dg/Qkmi8QmX7NAlGCG\nixikcMYwhqHy+25jIOdWmQl9fAgYXYmch1idh0NwRQUv2pL6f4wAiRr8CiBT\nYcd3bmsRbwYGKtW5EhBwSu6LdhkSymMBCIFNI8BZdvYW2RNEBbktGHogJGEX\n8aSnfY8LRAYb/vGYYnDIqd1i53VphdPxOefS9y8m4VwyLCMakoUtywPHrIUz\n081d371DvWJ8EjRytArm55gIYwAHSh51lkjkGQxpgiFPjdhhVkdFJeUNWYbC\n5YHy42P3Agc2JN183CbmsZQTJ+Bd0LNI1PkAxpoluwfo+GmNuQkQX2ZzM/PI\nylRYAGyBTxSOznPXRiYoMyasHJ8W00ftdVPY8UxNe2pLHXAP70EKCSysDkgz\nA9A1\r\n=I9gn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9F8vrAhXNr2IHTXgLWcN2z/qlMBoAgXa5ejUjhHWx4wIgYY2MtB1cWFbd7XK3KV3x0Sy96zJ3x5+xSWJBD0cB0XQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-191cd8c.0_1562106994267_0.7472131963125088"},"_hasShrinkwrap":false},"0.3.4-b1dff10.0":{"name":"graphql-toolkit","version":"0.3.4-b1dff10.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b1dff10c51c37a6395255e98073be168ce2232b1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-b1dff10.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-pEcnHL0/qkYY9XTzTp015u0DEYapjMp36Zn6xgGP00MnQKnRiLtNAxXcp8Jmnjy644dvbJ6ZGTeVpI7qohqGzA==","shasum":"c740b76660b5cf25eb41c89f0b90bc491f5ec294","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-b1dff10.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHMUFCRA9TVsSAnZWagAAcU8P/j6NQM1m+s30IvNdNwty\nLcpyoCY4bkNU3+kfhHaFyk1rpCXyMYaxNykdQrp4ho6cO9xRWkumUonnvji6\nnrixWFchpgbJrqvyKeGvOzdLJnzDMXUuK81fOMkiuWG1Kp3YJVBv6gzTsD5P\n6bPOtGMMiAdOSquzW8l/oNp9CbYcsyqA5BqFmIcVK64IxA3gWFObAJzdSjuT\nfhS/g8PTjBKm4IMeV8CdQ3ZfhGRJbR/shsgwiAYG6kCb7hVWGLfRe6cb4hzy\nrQWVZwcSq3pzo83Ag79mRwPd60Vy7O6CYAiaKEGrRhriVYkZdJCKll4PeUdY\nyPjF2sVZaaN1GNABWvk7DobL7krBSbLJIurhiV5O3cLvsIb7hnkJuZiJWMi4\nl7M5CLaTmwXpP17GS6DujmQOBNrMIs6o67qpcw63qlh3K3zfvml2MEON928O\nOtPgtoIFQPpXhqwuccLHiDsQ5QgM4R7bosxY23DGZe5nYjF7iNP4CLUXlzk2\nOkez4uCSY77B5I1FBzF9iRDaB3HXwJKcz745z8ORFz3fC1EhHnyhvlXzxiNv\nNRfy3p3iak5sIJosFOpAi+ngqrZThG8YYbqsUN5C93IyGAInaJREsbGm1mq/\niXLZ0tlBWI6mQu0ppQ05P+WUr9xZlx5har1xhDPmUDxUF5AJauliloXmTBAp\nut37\r\n=NvDN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE4i8WjKYRXjmRtWNPeq/ccD/J62/vyhsLae/JASfFjNAiAQXgay8VP6xAbyEiMFs59Oxp0EWNtxj7AsaIcHVjMKDA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-b1dff10.0_1562166532824_0.06811217979185491"},"_hasShrinkwrap":false},"0.3.4-b73357a.0":{"name":"graphql-toolkit","version":"0.3.4-b73357a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.11","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b73357a9e615676daa8097583a671540ba956a91","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-b73357a.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-VFX9R5zVl5GFoN3oVaMbF0kL9tzODj2NjzYqYBfcHtzViKMGggBdhkacepZwZh/1iBKSIrJMJsTLvQXLRifPLA==","shasum":"57506a5fc44fee1099ff074474cebccea01a6f8b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-b73357a.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHOGYCRA9TVsSAnZWagAAWW4P/0ldgwvam4M62dr8Z2z+\nYiLX0u0jUmQ6WmcLUI1xjn2PJlXWTximOlZ0CLrHbr9CTghBYUJuWtuAsyqn\nWKFWL9tU2PiRpI5668uodXVjcIunnwou5qWHjAkV7jY7VCn1nH/w0Z1lrH6S\nvXZ1UHoDTrj/iglE8tssRSsXOUvkt82TWypO+ic69CSYe/N4ucZU8iUz2qV2\nCtoBz6lgEqnKu2jl7B9jYEoR3Zw1BpW24u1mJEpFpJ2pvwU31nfRpr69hi7R\nu6TaqNxhKJpT8kQQFHLEuIgLBeKhfysEKQVhCwDjFU3Cgl4JKSkmHVBWRWdR\nwx/idBbaAqm/0vhXTpzlV+0kW5WqSGqjG7Sui3cGqA31dyomb+upkg8tYdyt\nKVUlyEXjDE84ROCXvDg/nvDhFuwUL03mp9eASQwOqEM2iPU3bUQaLVHP/UzV\n1CrY03xJKvRUHwaNEGm92K8phYfh3s0sooqOc7kv25fMLBgsX3LJ9fels3EB\nDhuUFUHdDCHx9ZO1FD/5EHU1JuLT54nvv5CBFYPSoY29FPOycJf6kxa8p6gz\n7HyJMSSU/uHxdt0KviUdtJkT4m6E6kKCOILTbGHz3IoOImhOxJnTOQwbGRdZ\nmBFdUM41W+8QWWWe8inPWxluU/vOXs1lkNJ0HgiGxWyXvIqqfzajC4D8+Dvd\nXl1a\r\n=BAnK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGGylFI7HML3D0TBuZAyklMg4NhGV5qSBz59uDPqz9zfAiEAqSvtvLpl20Qf7eOHzTPIPDA4ufubvLQDMD05PG/OK6E="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-b73357a.0_1562173847300_0.14249526733475393"},"_hasShrinkwrap":false},"0.3.4-8849761.0":{"name":"graphql-toolkit","version":"0.3.4-8849761.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8849761f48c8f2e2c606dd2df4bf6fba6a1ebf2e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-8849761.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-vzXRmnhhgwLOhkrv2Mo0b7FzAqOMsZPUvhr0mGYuXfmtxRemKmJdXsyWAKiQ9tMeGnLWb85svS7WdESJ5nigDA==","shasum":"9251e377e23763be7c2bc08aeaa94924344f962c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-8849761.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHOgFCRA9TVsSAnZWagAA+sUP/0FPYBWkD7ikhoH0IukN\nPbdpf1GCQfOZzj+ppSxx7jIEGjDHusNu3gdTPHVqW8piZAu+6BIKIwa6A9af\nhTOxg+/38TznfunPMUX442vVqHkIlgmcrCmA1bn4VUuV+xAh5MDEuHt3t1DJ\nH0FrWXmQFpWPIvrCTic8lRV4I6aSaLRUo9jgcu6tkTXHnr1INOSRJ4WjrAx8\nXw2JYcKVNQri9zc3dr/oOoYNzt+8OWgdW0PzIGQHWzjSmzFTT8e28sBOB1as\nn9V/cWSLK60GcuKsS26j5+Vmb2x5RJHk3+b/IvGx5vZjXZSSZXChqr+omEaI\n/Qvd1i2XH4UfvXFE8qAI2xjYtEYaHYSZA8CV0CDiywPi3Xwvt3LPOVrvEcnt\nuV3MSkuvkN43grktavhZ7ythFOnWcaojfvWdc+qHTclXyx50e41SJ7Spi0iI\n7oZRAVPhso2BI16IJmglVPjAm/UZI5OIx2Fn8hiynksUjjetZ1e1VgL12pcT\np+UbyWdkvYAptaMEcxp9AWEIpFh0eHQyqawRpX9AU/pTg5L79RjKZpu2g4lO\n5cD/8KXCJ0ZTXXDjmxjcj2n0ZTyD1SfvhXsXwIiMj1Vkrhx7Gnak4wtkjt8l\ni0wJEpdZRcTzVATQELITQrmpRtJplueiRTxDUIV+1tou3QaIOgDdlHpULYIQ\n7WKl\r\n=NJuD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBCTCs1tEbGNP92Sdsnvgo2ZKD4fBYAm1f2SrpP+iqZeAiEAxRREvYWVat8D9ohbVXimWBhFmXkAHAiHa/6vIVeluaE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-8849761.0_1562175492883_0.8351310191146568"},"_hasShrinkwrap":false},"0.3.4-86f0ca4.0":{"name":"graphql-toolkit","version":"0.3.4-86f0ca4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.1","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"86f0ca411f5b0209a942919f30a01cbb37217e89","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-86f0ca4.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-SpS38F+zo3atiCnM/qei7hRgr2TRbPpSL8nNgbH18tG43b5V198mAwhd70otYf8xUAKcislWbGeNxXJatEua4A==","shasum":"e609e472937ccff47d36237c32b9feb381665113","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-86f0ca4.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHaFTCRA9TVsSAnZWagAAw10P/iKVsWU1mQiB8QnGwpPt\n93DdTHsORhXeip3DD68IfC1svh8Zsa4sPxfORuqBefj/FV+QCjS12fyxt2cU\nwDm/yXAs3KD3Iyg60hhKhx7fhO8o/yiDvRDh/ZvuITuoLhfCxS9uXE88zHCh\nZU65vwaFxyy3176nVn9tp6pMZgjGxp5DetNwXxLznVkW9NemWfDf3qHsswxD\ngkDOkkyLSAzhFAnaQBE9gO+k+s+l568h+9DhFRGlIg4Rv9c3uqoEKF/OxOqV\ncZkbM2uLAqSQB8P7rY+xso+LmZM58LolEYP2KlrpSNKPkQTArjV495//s/rc\nCA19cCEABmWG3/rqLFTUARgv/ide3icCCVuQJo5vOY2TceKzy/UKJOS0oGf2\nEhd9pbgRZMKSFPHD8Um9nZPjtQj+Oio+GFFoNnI0mX6BAqDbR70QukZuGNpI\nDuGTqP+8XCmW7Duka0dqZ2VNoXmDel7uAbxczt/fOP3S8bB5OuKqh/8LRMbS\nGr90uZJ5Vt0Gw6ahXqUd7Om9khbf/icBVRGd6auEhEfYzyOXVC91iiNaBLv2\nAcE2IBQMl4Q8hOevOZXZ6f2zOufsMGrn21HuvlPG/QkQANBNSxdnSOdor2j3\nK8du7sax8sRX2Kvv0nulw9lwbcUbqQl/sibxwTkhevoCBl+rm7zel+UAecYE\nDlMa\r\n=ijQt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHDFf+UBLwE9QfkKmM1OVX4c5I1Nxqr3NCDd/8Ah+WKtAiAa9bZtm6mCn3RTsIb2ECYKIN9Ztl01LxfurSq7WnYHbA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-86f0ca4.0_1562222930946_0.22650098531971818"},"_hasShrinkwrap":false},"0.3.4-f83a0b9.0":{"name":"graphql-toolkit","version":"0.3.4-f83a0b9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f83a0b9061fab68745b5b911861a09e63d393535","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-f83a0b9.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-/GncBz9LgtGVvU8wg0ZUS8d4K91mzuCPlyQnpEDTZ6Woi1c9v5txrBxbB6l9wv5PWa+HjrhHa0aCgaNWJvHmwQ==","shasum":"ab616095179d61c8a2e1003ae2402912e945a35a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-f83a0b9.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHaFkCRA9TVsSAnZWagAAXxYP/1uvHpPatzbVT2kZJYnJ\nkiYXMeZSKgFOygeFYLeivyjZ0PetuS8EZ0NTgp02z6RqiyAv4xrHLziF8jrV\nBGJ1oG0GVWg+XIIy+x6zQEIWKL16+izA9yv02e/PG+X30nFzhdoNprjyMISZ\nuoyedySeVtJyuMEzREjEGweWZTFc4j/1my1UGRlOpA94QdtBARWDlc5F8Zpl\nXeSzY9a8++hz4q/QZeoko/5RRJPewc6Eoe4HZwDfxXzMRtqOsKCooVeDQn/a\nzt6xOw6ACuKGVoyt1vJ+Hxjx7RS3z3hxGSGgG/X6eIB0IUvzdRqzsKOwv3Ir\nY4NsyH0hgZ7TSPwqHI06PLFGPaZITQ/q7aku0p1QZ4AeZkZ8ASEaETTtTFuo\nfPGEe4/XA5/OwHaYcTxbJEqBl4p1xQVrw0G5S9onhTjYZgVUywoyXf6mpj4E\nDgAyjwGgl+m7bR5xlz89j7jTpSVzw092cq4UtyDIOCo2x8sgEO2gh7x6nQaU\nxdjp8GF1ECXVSahCD3guyrk2F0ibAgwEMCj67QYel5Db97A6Tprmkq5QpXwn\nNgZZmRbPBnCgAn+tmOyzUCW/bRXukTQmOYZR+tb21xh1wvCpoJFafCrCNuPj\nr8BwbLokoeaz6LZ46yWUgJvp8bJLEE9aSjQcxg0elAd05Rs2P8a7Q/DIpstQ\nfoZJ\r\n=vz5L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaYffO8S0xi17T6wvWjvvjyXuJ6iWIAo9mM5Rh6rwIowIhAOo1M+QVDD+bDVffOMuQAMrUL98pCCGSrfdMG7AVfjbg"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-f83a0b9.0_1562222947365_0.24904833942208882"},"_hasShrinkwrap":false},"0.3.4-fd0ca90.0":{"name":"graphql-toolkit","version":"0.3.4-fd0ca90.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fd0ca902957b4d27e295862d17125ce9a0a8e315","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-fd0ca90.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-8PvggN1zj3Usu8LtiTOnhkbDoEmSZtZHkUMFGbyiAb80TfGjKxda78vDJYmqmnrr/WOwP3IR9r/6gI86G/1UzQ==","shasum":"7937140c374d6cc4818f968969708e1a5936b3e2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-fd0ca90.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHp1rCRA9TVsSAnZWagAAE8UP/34gjnx/1geptrEBeBR3\nUEOnNUbtTfhYpnTGLlEs/wxj0UmSBd8t1C2WT0fh9zDpjL4ML/FRfqUR4ZeY\nM7ryFR3Dj4X75zDtcvttz5nIlvTXvxGml63GWi7+IscubGkaQXGSROo9ChsM\nXLo+xtDw7YmwVCDzJM1dfBkIgbDhebo1R3TwJGu/wtoSF/37rjqtY7eoBKNg\nUypy44FWmJizaswB9mC5grrb0Lyvkjc7pJfqD+Gn2cYFBQ2ftVbuaNK+vU/0\nVu6OmNwiSM2va4t32cGovtoFnTJhh5g4ljRODpWQa5WF89G3ngjheYattXFt\ncPChJaiRAgx1f8X3UNCgKe6wvnpWDrhp7x23IKkkKIKv0bFVZ5+FDrnWq0O2\niNnYZk8deJSKrpwzVEE/TJlRi2qrrb6E1VRiihYFTQy+eAmD3AlTPkYukS81\nWlU/y2Ss6UY0FwehNX4ho8KgozbS8cXIuAphPqooNkv8UuWp3OaHH/oP3/93\ncR5w9fXFW3eTAuYp7h0dbyPBjvaooNVqEWJ0iJJVD88iqcKuK77IBnZJZPYE\n1BDucWr3bChLqlGimLZekTKb0V0cxlTLBCO6n3yEBkbULr7rdDDZDqZtIZ8a\nxC5n8h6wYmdS3SRTDbgknjkDfCmDl81lTcp8RlXl4IZREJoCImPMRc8C9rr8\nbOmC\r\n=nyRH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDY+rHdEigQ9KkMHHz/n1u0AjFdcc3b0CujfMsEdz5ojAIhAM9U+ADJ9PIN3lQ9A0FwxzP3nI7yi9FOypnvQgsiqrqt"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-fd0ca90.0_1562287467209_0.3242771681610179"},"_hasShrinkwrap":false},"0.3.4-0e0a14d.0":{"name":"graphql-toolkit","version":"0.3.4-0e0a14d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0e0a14d865a1b65f556979ca639cecb31ddd1b07","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-0e0a14d.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-6Y1LwuXUDgJFHfbn/cMRGIAvC9VkV9tOlPnx/AJEKSlyCK6e0sjfrFhdJ7Vhnbyqco+8xJPkdWJgfceqUPmMzQ==","shasum":"ad9bfc542c6cc483199791821afc871b48924c80","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-0e0a14d.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdHq70CRA9TVsSAnZWagAACRUQAJh7dEiHMtRc/pQqbpPR\napOW8InFkq3a+Yz9vCYRzI8wLLFrLQvS43eLc68hvnnwWb6W0i1VS23fSuEv\nFHQNuWh4+6ZtwWsrADKlcgvXt5H/d+vboDVMcoM896qcKNNUEdPhKtxFCKi9\neGXvA5FWoASJzf70FQXiPrW6BYibDfznGRRdVeqEGiVs7Y65T8zLDaB4zz0E\nw+Uw5Pkw8gdvNKxsneuYMOJXr1AoosGV7ZQFCJbLS4BxuWejGvzN3sFQN5Nm\n0cWuYGY9qgHual70d9zMGdwOZ/ATqBPyfG9PZfhvafbMrx2QNXkLcnC/kJGt\nOSvxNpUaxVh9mnjvgdh+CbAmriuiopXJ7WN3idTL596llqLHR3CqCFspf7ZB\nTRDLnMxV+3rxcQ4kkiq3lOUlKq6ozEC/ylaWhS9sp+gX9K8ymmcPlfbOkH+B\nH3/loglr7DMEC4gAzLXRDx5blwGF2lm5LrkGPmk+WwB+cjglsJB2FqHqkxra\njQWR8EaRwivLXHkVvmblH0rNKXqW6Yl4jbcfERLlMCFpGA+jZ/LnNWAgyTPe\nZT0bZcBXrqfdl95ai6T/vzQ2kPzxRCCKq3UXcoRYLAdqxlbHg1nvcpm3TJ6a\nGzyrkgab+1MEXNEWWQaIFkT+ZOr3SWLR+amW2+WH8DYbxJdGz/Q070wJHow1\nsgou\r\n=5M3+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCURbLvQYIcWGr/KSudZKbq/1527Szu8scw8N/eTrwBeQIhAOb9gyKBis+0Pe3hmVysn6IkB96cwXteMtxrczRQmCJc"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-0e0a14d.0_1562291956148_0.6213254969515667"},"_hasShrinkwrap":false},"0.3.4-704f1c9.0":{"name":"graphql-toolkit","version":"0.3.4-704f1c9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"704f1c96095382ed1d854c440e86e9627373d870","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-704f1c9.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WshddoONUQNHcqexx6Iuk9O7RPdS6QRAia66tx/4S8TWtnC3SXxv0ilmG34JbNLaU/evwTL6Ik1nCElWuGrGjw==","shasum":"be6912438446d64bcc3dc8eebafbbb6cffec18ef","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-704f1c9.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI020CRA9TVsSAnZWagAAHuMP/A/HDO4/T73F+/PmCbkW\nV5sxmTIczlOb9PwCNu34c0AhhB5WjF9KFFR+u5UCDBSgGFAKkN8LbyeHnI1x\n/cnNBLDCj+ugH9r5rPMlBwhRyGCA30fPXYAMmiO1LC1obTeBf8htPulIYVOd\n//wJPBt2a2tqgfz1iZ744TJLDWwqSvgoluFHzg8NVkji4jaVEk7JXGYgidK7\nROMwlfu3JFp2Z6jV/fWQ4ITM7J85HH7qGgrEOTclwQvFuME83JIyPWA/EVKP\nVacoastA5MSZTcHPVcF6D1G7VPFP7Csz46AC1IZs/GBRZ3lWKiFF9vQiPD5J\n/hBW9hV56fgZ10jVknG5/EFAleN2buWL1QEdhdlzxBgN06w40QMHzpgc2oIb\nqVMBuJJwZY4BH0uug1teg3+fbkFGizPKJOi09eQE9eRZFRrR8sSE2ilQ1Rhz\noeCvU+yZV/IcCjmbEyo6ZC2GKr80bUJN7irPAUpPWk8pSY+ZGWZSCdFOX4+A\nc04PX+S/jnXFl4/b6ZUKHME+icVepegNCo+bFNoQpBh473XN/t4N+6pv9JSd\nF83+MlNLpPMB1Z1mID1FsL7n7pLyoIKoa6Uge/nTKK+eC8lpCTmDMwFozfCm\nbG8u+uFSNqI6Gc1glBa4rTOT5fNSCUiXgpKazUTc+VxNpilwzVBlbuoSw95B\nbemY\r\n=bm3X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQ7ylTe91BTMMwrD/olmXONZgIwxTHRELouNbc8ji2/AiEAvpyDMVDui+43v8uBKwLKZbe2r4sIEufEvJ/jVN3Kw/s="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-704f1c9.0_1562594739992_0.9311442458143597"},"_hasShrinkwrap":false},"0.3.4-d403b89.0":{"name":"graphql-toolkit","version":"0.3.4-d403b89.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d403b89a280ffb08cf1481ff3cf664a35ea0d3a9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-d403b89.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-k7PoAaRlUB1EH4KwCU5ETXEwelVqzp9PFQGc4xjnFJEb0Ks7C1IWbBJ1ZZa72UD8Vg56fUZ+Ytc9n/tTn3HSNw==","shasum":"a9b0bed7d3bff8aafc772d2a07e83ae9f6cae439","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-d403b89.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI2cOCRA9TVsSAnZWagAAwqAP/05DfFZpAq+WgiwjwVVs\n+4Of8F33mszDHGsqp3ldqHdBZkpvhlbNbgxaaJ7BGUXrRehAbiTOrcQVeVhI\nkF3hS3DAZVskmnZ4qYJsC4IpCKwzreHVBb0H1jkpsV8+TwWy6YWb/zDG85/x\np47kyjG/5MWC7CeUKtk6p0UklMg4KYt9muOYYg0LuZQMfPcnr6lJ8yGXaqNa\nvAW3FBGz+2Kx3TTR8M4tJnhbt4u/yZaXXNwsc6yMWr3xY/U8UI2d5ZMu6ew8\no1uNq7yCOcElHyXC/yzisUdcjiJIVYadF3/eoDMSmfOo5cOkj2X/fWBHybmh\nz8siXjZkG5dqEPHkecLUig6TEpdO/f6+2Q074LSg5E6qrxFDTlNjSBrWackq\nNP4pee3rYdZnS6DFl1YZN/49Ti26zqOXUVSSpCSVKo+uUlIpBkk0vMscQOnv\nVSzc16U5RnpojJYkelmkJolhW5iKye7h0HURsmFF1cUcbYTFrhy97hFLnaIF\nYc1E4vzv+OCjjuddEsfMPK/wGbnWkNmWKfDzSEKjvH+nPVbso5pD87o3wscf\nqL09AqFr5aelTwhxddZ0Js8t332fACqnDUT+0expldIhZJg/kie54oiSdxgq\nsFIWSJQSnhpCCPF01rLiB8fUq/mSQgY7X/3zOdh1rrC4PXZfEQTdddnp1iLO\nQhR2\r\n=QYlE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDYm1/7LzvYYJA2m8IsaWtEuLgSgfnVnTJrgXn6KU/q0AiEAtqQRgKfeh7qnpM/ZWXNuM6YilX8ixd0F8Qwnp94tAXU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-d403b89.0_1562601230000_0.935486888445352"},"_hasShrinkwrap":false},"0.3.4-e53d82a.0":{"name":"graphql-toolkit","version":"0.3.4-e53d82a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e53d82ab60ea0cff520b0339ffc7d0584259b60b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-e53d82a.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-x9PiLJSgBS8yFtiiC7RyTgGOah7ZTNaUtT0G99rGv8y6oR0dmlF35lN1ckWEiL55cJNw9+QDqE8Bb/bmHWVbhQ==","shasum":"eba309e0abf3b866277638358118bde40e64d4e6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-e53d82a.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI3k+CRA9TVsSAnZWagAAisYP/1v4TlokKNVdj0iWrj0j\nld3EH1coGRDnDWlY5hEkhXItycv1u1hsbSldxGygaxMxVujII9hAIiY6AZ15\nwry9eoUATAljKzOjlagJLsEcdqBH8irxwSZfj7KVLcyja/x+lzYUw4BfzsGT\n6udkomNj9ZDeSU03GEGSIXPFNljyXjL4eIwmaAIpleUnDi+bKYn8C9toWxV+\nCwOwWEHW4PLeHjBGjYHuYeVzpu2/jldrjtDWTFjpjjPX+IZKmv9fV/wYN24f\n1uxsSq8om2lZ4xew8zMouWg9a8QyGayCY2htiudb8Tf9IphYvVJJ/gbBmZH7\ngyWY9NmE59cOGdMGa85x0+/0gePpSoZLH3cE2wqfbAeG/Vz43UNLXr+gfdDc\nlF6G5NjWzUSr+w+vDJ3LNDj2Qh8hHnkeDWAOHmQNcfgix6qx8VhZXySxvR/z\nh22VQDxMvrPMVSzaD/TNqj6wKOgG1Vqt6h7XWShMxBDSlHrmaxkX+DUohlmr\n1SVkZDK2hppKYHEXVRlSbH1N4x222vD4eIM123E3SaWuzPMsbeBCcsrL+5rw\n6Auhx0xNCu61gl2SqTN6IM/8DO034sBTTQ2liJdFxC5acIQrVkNyxyKolUZU\nzN3tSf5AjvVOBsC7ntwfd52im0+P3famnAMIuIzAsbhtADXHxmmyK6qXkMal\ncYDn\r\n=M+VV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEiizHsh32QMj5ix79j5+ETK6dt8W+Z2el8emKpY7tDNAiEA+VaUx52g4wOSiD2lU83ojXcfhvnWVCubtPvAacMuq7I="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-e53d82a.0_1562605885845_0.018187921786542827"},"_hasShrinkwrap":false},"0.3.4-a6e3c8c.0":{"name":"graphql-toolkit","version":"0.3.4-a6e3c8c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a6e3c8c5f2478943553c08298efdffe9b6359aa0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-a6e3c8c.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Z2lW8/ue95OfMR2pLA9jbqjgau0EUHhl++LaiwmCUcreEdXRfgYnFyvahSYN5W7RbF0Dyy1lPkFaWxljD6hBzw==","shasum":"c6221f9c30a94a409e48ba880c0db436b9f13e3f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-a6e3c8c.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdI8ONCRA9TVsSAnZWagAA8p4P/0NpYARI5/RgrBYy8SrG\nW2c4E9iuVc3aatQA9jgqDRh733o4dicLqwGBFIqdypXi0yiU1lFnbzsQC2yU\nZJLdzMnLSPMOaxAOaGB+JcJD1RfJQg6jDSqvj3vU2xPOmjTxd1JMlJbuCCxc\nCk7vI7sfbHfuIHFCC361j+ZLXhwAhsXkQB7IPJxWct0VliLeBrKLChCM4A3R\ndQpXVxuWPuyaN14XN2h9gLkt7BkL1NwHM3fkAdE5L7XKndn2fppuzS5OC2pu\nENzDD0G6fDjaD/T58UipTN0eOt+HbugliSYU2G+aC2VAlQ12ElvXGKUufIAV\nYMp/vq0A2qUg8JnIPl6r7Trs3jn0iHn7gXdWYVGCDzjwr8H4AOTB13rnqeL0\nt51kvZ6US2b/OXYmeBR40PuBcYCai1OOXE7TA8uxCVJ4eZ74Hd04qiQ2Ktoc\nSx/uK+jxOsa9bthtBEosh0Pnm+uPfNOns6YFvZeUTHN7Y1jjzRi2T5DKtVZR\n58gRivWsMwVZucvlq7JNX+rUMtct725pY+3cAYF1HgsrMFkcYxmWUy9zfNgZ\n8RwW04SBS1oYT/h1YnJ9qSlwlkxPSRoJ6gC5w1GiqIKnfdR4X+CBcfLjYxXx\nhHoFdvMTS4t1rzO4PgaD7NGaEo21gXdl/aDCYoBdqsfx7M9gA8sT1XuHgyhL\nZny9\r\n=WQdi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAUQzKHUosHW9NRwiiHDDiSRlS5XvuZdPRUNbpJveGDgAiBQ1ZO6/OKmSquyD2ah3Ds0TJZeQQW4F/pB3Kz39Gqt7g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-a6e3c8c.0_1562624908367_0.6492451595297597"},"_hasShrinkwrap":false},"0.3.4-7d27a35.0":{"name":"graphql-toolkit","version":"0.3.4-7d27a35.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.135","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7d27a3545c1b6bf7d027759525145de9709a7e4b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-7d27a35.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-aaa2cndcQsZKK+CgB8dJLdDwIHxyDtb/UdjekxVBOqu/R4qWBQG0GW/X5SIIz/hnlN1+yhYay2nXnNwLIBPvYg==","shasum":"ddf5f318f15e92820963299db3cb911b5ba8f720","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-7d27a35.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJDehCRA9TVsSAnZWagAA54UQAKKX2FK/GFoaX2ygo22W\nRuon3G/2xJRmzLNeYZkfwakGODN9r9pfIm7SrmolAQhkWSiPu9aGBWovcALW\n+kG7C3GrkrEr3TkvOcLKSMqJ4d2ewgQSeYe4eojesoRSG7HNxk2ms+x00a7g\nWBuQS26yw2ydCfHNcBVTt7oBY9rDr/rw9c4Ze5/vz01yvda1zZdX8AAGM9L9\nhhqGzqrln1tXmYVv3ploT9XBZv/P3OtsAJeY1cO1Fmy2s6ykBiePMfJ6Uzat\neuGa1yaZoD73ChqGp1ZBEUedPgg1KAERQF3Esf09Ysmmd2JmB7kxFV+seXF1\nLEyUw4lAA5v27nE3XhMtdOZUGEwo4OoVs8hCi165J34DCvZ2xnhDiA04ply8\nwbHvOyuqLnKZ26C83IxLpdq6IjOK3rF/GbtB1s59yG1T1w5OC+jB3nve/rSQ\ngTppV8hAeEjbFpgYLVwQgcDWHIeY93sKPdywoTEHSgOOn7paxsy1sQqo2oXT\nRZbZ7F8KfEVQVwV/76iczdnjmgD8LL0/qfOBUPCpU7/PlLH6L9F+9KtrSAwA\nwSCg94q8wIpdBP4yrPA4/VGGLoKjApPf52By998y7D8pSb/fe0DQjIHC4caG\nXAP88ILmsJusdhmB4w+1vUxZsRwjOVexz3WcsNdjHIh2lstdL4Fd5LJ2qz/K\nlp1H\r\n=mtkD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFed4RVA4cIPlgchVPBba40/hqDpcgh/KWM/bqgIDpz2AiEAqP63aLb1Ahtq422dA9iuZ6fO6gPuZMTxnEwzHpSIOSk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-7d27a35.0_1562654624497_0.3140550566588871"},"_hasShrinkwrap":false},"0.3.4-ffe3480.0":{"name":"graphql-toolkit","version":"0.3.4-ffe3480.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ffe34803661cf2db5988834ce4630b513654f7bc","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-ffe3480.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-mZ80pVCTdKYWFsYbACa1QgBV3FD65bNgicd02nH+myfDw+e0nbZlqvK9gAgWCilXxNRcCrVVWIGxUDUPOubviw==","shasum":"5e38c612d2cfc80b76854aec04aa36181651f93b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-ffe3480.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJDesCRA9TVsSAnZWagAAUTIP/i2EiFEBmU8IDrrTCjqG\noLU/CBZ9feHoWmGFJb456X34irg9ZNYkKj9yxFWnF3nfrs4ya1UCW/j0RW15\nEvhmZVxgBGLuzyjuaPtOaTMunxm6B+OOkM1jR75PHUQ7C4iSF64PcWlUgCmA\nEG/kMcLzC8e3ncXGu/Ef/OWrFqIApPSGGzNkPpKkAv72XBW+IrtYEHZOzNGO\n+GheqyAc0opPIh/EhT/v6ZJkHw/Cjj3s1o25gO9Y8C3nX8zns7Cz9bYpkDBM\n5iyhZiRyaNZSSybGMuAMyd3cl003xkbR7agjcyB17M9n0hmKIQ54sD7CbywN\nrFl/1x8+JvNZS4nlT0CpP+nd3mAp4iAvhA8vCV/ZFnQC98U6gJiQoXFXhGDq\nXQVw5Bm5AfVdcniNPp9AbQWjwxP3yeEsh9S/oDk7xE5M5NKZ7NAkxX9s1eQd\ngFaVW3ExcHX7vyiQ183IWL2cpI3I3q8WvVGUsce8YiOSoitjSsdc5Lj/YXgz\nMiKhcorXs3ftimwSUVkfd/i/ryVVLxxWA0GvOVsxONA1jmdL4e7r/6wHHVQI\n0N3ArpGPxycUC2il5vquJrgruFBNBPOIKbSE5JaGGOBkA8wIemDyfHotzpI7\n/rI2U7OVUW/jc1Vopy3bzX23h5NHbANFHBFlsgpN/yeh92SYP3UhMPPyWwsm\nZnNb\r\n=S+0J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLmc9v5u2NUyECt4SUqkHwLaAFy1IStvmfc//1nLaVHAIgRTwYtoce3F/ddxCcLw5NWdpmMUqQXhRy1vJP3GM4OuI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-ffe3480.0_1562654635449_0.5120470334585723"},"_hasShrinkwrap":false},"0.3.4-b523f36.0":{"name":"graphql-toolkit","version":"0.3.4-b523f36.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b523f36a2599c1be98dc78fe65301a6ebb17361a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-b523f36.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-WBaRlx70g8LxjoZaE5wfAob3AW2IhEzg0LWllJaoXFBZXRKE6vkV1MDaVcyjlWsz1PF/ofJxargEJuld9MEbqQ==","shasum":"5d92974c5b0b0776a6a3aef54dd625caa3765cf1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-b523f36.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJDe5CRA9TVsSAnZWagAABD4QAIhnWeP+fwbJ9UE4qm7y\najaJb2jcyOws1fJmBi0pKLe8ZeDoW2PUW7tJ8u9G/XssPQANF816I3alVidW\n1bF+a1uH6Wxfa3HY3A2irQUPcDYG2ju5vw0QU0tGkC/CtSkP6JTdEOn2sGh8\ngoL6NGKy1qYyRAW2kHC2uvbnXPAP07VbIivKsqP7GpEF3PuHdDaTJwCwFXFu\nd0PaMZeWc+Y05O6KukPFucMY1tNIh61i322JI4R7hcAsosHeBJhn7tZ3/9Da\nr91qlkCUg8SvO5SltnKGm57PII0IYJDRam4lIbzOdoxWbD/DW7XCKrRxhuQ9\nwIQqp1HonHttH6f4rvlQX6Je3dH01oaTlloPumbBoEFdeceUtG5H9QgnfcY7\nXHr2iW80HibZuy9/7ezSTvjoqN7ENnYiI1u9jpX2Vo8JVuYsUt/2RzSIgBpN\nRQHxmUGX0iXITVgA5lYo/4mjWOByYhbeK/Z+R5Re+8/GaVtZuS2kZFX8TV4S\nkTGvI7K8FDsREW4LeWEZzPdKkcQqR0AiA5qDYI/HUXdkpMq5x+4vszDzFMCG\nbJdfqDc0RWI7wSwSvWjEkMpNj+1/Y85pNwpse9rvqx0SXq69RYt5jTUkJv5R\nHn5+Z5wS10APTVN7ZyR6IohM9urCVj7K9mzmR8dXaCtH6C3KDJFVJHkqhoQw\nc50G\r\n=Kggs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmpeQHMSIF8BQunAXLzkg+yV4oBDx01zAG1KlSkxdbrQIge5GhJtEBgJXNDXJCdr2y7AfwOrOT3XagW6hSy+g9BOQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-b523f36.0_1562654648439_0.5554907954041051"},"_hasShrinkwrap":false},"0.3.4-a0e67ae.0":{"name":"graphql-toolkit","version":"0.3.4-a0e67ae.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a0e67ae23d32b9e3330d9edc3b53afee80cf2a35","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-a0e67ae.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-yAxCPNz4zgj0SjUMamWIJRHlwb/Hw9wdhFuCs4jiOWfgJoVtHgBIDLpVj4Mtc7j8QmZxFHvT8aIGIWpQ3ur8dw==","shasum":"632b83d283d9f6db13ccb24ff4af137c9c68d7e3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-a0e67ae.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJDfKCRA9TVsSAnZWagAARUsP/jxGXok3bL6GKWDrmolR\nB/lFlPO+I2posdypLm6hOrpBlHpbHs+HDe6ThR/FbPj83CJxU2xl1s7Lj/T7\nO5i0cRl9DSoQbfZpTOhBHVUV4xcXe8kRH8gUSgTDxdIyA5TM1fqKRjfN9o6B\nMou070PaSRwiJvKvsSZuU4ZEdWIqj8M10ddDm7EsBr8GbvzA4cNkYcqrg1oY\n//MeDmYGOJ11D9p9S5X9zSjItKUt/IV1ahueU/E3FSuREjoWmCzWPvijMSHK\n7J+3wvRXgq/YNh+jHxxHkJRAzFtoqcYR26Yajx3aeF2ockMgofpSpL8Ey8pA\nUOeBiv8fAM1djwQtiBkmP4usSUzVv8Eru9/XUHncia+7HijNVityWirH4pc7\nVrg8nLkpB9D4RhzEAPeXOZPDTkO/31HyQNQmLoGMiTocMyGbcvKiMoMxVu9q\nPFm0s3I2hmJPwuM73U28vFDBWIcA0delnbfUNef+FJXiROcE5WgL9nCPoowP\nAu8Bj0sk8Ptg5fJNW/ODNB2VwcghkPyl/11JvsURA1/9+n5SlsA2L/Mvqi5K\nAB9wlPi6qJHq/TsbRnSQZ6Fr/lomMKZShYGKsjUaFeU9nsSmsn476XmEg8h0\nz5RK6tiayXRqxC7f0a/q1/rGwAuT80MZfZzyittSC8l1U78kUSqdMbeY6NFN\nE385\r\n=e+S/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG0ObBmWB/Fxz9qniG84znrPXbET5o/EdY+zhydSUu1bAiB0V0/Lte2vcsp/xJEwNE61S4KWFKcZazD5ophp8AB7iQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-a0e67ae.0_1562654665789_0.6296345849856626"},"_hasShrinkwrap":false},"0.3.4-65638d7.0":{"name":"graphql-toolkit","version":"0.3.4-65638d7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.12","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"65638d709a996433ce542195a7831c4cf1b894ec","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-65638d7.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-lsPBNWG6ynolNHM0RdeY9VXKxVbabTsY7CfkwPd7/hVuI4IjG5oDZREb6riZK4n2T9mr8I3cIM15I+qS4t3n0A==","shasum":"69d3f46ef1ea29432ed05307bca2af7324e50eb1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-65638d7.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJQTCCRA9TVsSAnZWagAAKqUP/1AHn+uN0UpB1hMPBmSv\n0/Jn8IU+lf1jrSRejYc+aqJY9M4TPxtUbEzZ0hsGNldWHLS1JBcsFUXx5T6Z\nm1O1EAKzvDHqcfttsIfNIskAywdMdsAlcvumxh+q0SEj0JvPi7WpOSB1Jauw\n8rCghx15QT/wnVtxaJWWEaOkV2IQCaypl950clz7jk0+nZDyMGSi21enxGXl\nMi0nez1CTyKLTqOmG9A6uPLpiavCB3cds/Uy0985WsBJ9axTq3r78A8gitu8\nJ0KZjzM+Hr4XEi11sgCtIGIBtSErTzCy0TRa89in0c9dAdXfC3E7EAhXILKE\nkkchCcjVALUwXVqiph0gkD9+tnog0QKhBruFBualHind2e1VjB8JSBQfGdVW\nTXs8dJ7b5N/vb6CBGTkWVLtm0eYA31lLZyh/z541/9xFVxPMEBfmKC3NvE7v\nbaloMMha1MKk5fNKklGwSIecFADTZ2/cXDl/V6Xt+4wgmL6e82xzDy8/kYX/\nar/QbDiBf5aHBeMvShUT/XnDWWVOj/Kz+AJuwzTA385/8Vn6QVlLEofkACeC\n1HNK+hfmkXOSKWX0uY+uPWdN8WUoYh9ylx85nBDnwTIQjwO7KcjIFWdCerxu\neW0S9oWHn8nVm1ZPzTX/qq+2D+jXxQXObXMHnGKn2UG3FREjpmxwNd2tKgfA\nO0fw\r\n=Pr3g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAodNVFrQZKtTfhc0q4gk6HgKszdXsPNcHGwSspcauwcAiBnIe5duIBdn7a+xhYAc90FAlFkhncc1DjjEVSy/ZsG3A=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-65638d7.0_1562707137507_0.7449130649350839"},"_hasShrinkwrap":false},"0.3.4-60e487e.0":{"name":"graphql-toolkit","version":"0.3.4-60e487e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.13","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"60e487e24f0d0a517403a0cbb27495347e2e66de","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-60e487e.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-1Xyxii49aWbOn8pftlKZjHA0zX+HRN6d1Lyhd///kkQ4M1kVZJsfQ5WVOxr4xRBwf7CSBty/LGMFwti2I7hszw==","shasum":"9072e5a16a654a37daffe12623c13f0ebac2500a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-60e487e.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJRUXCRA9TVsSAnZWagAAgfwQAJD8Mv9SP2av5B7z/c83\nBPHFTLXIok4IDl2kXaw5efjRjGEaZrCXTmIsIDY1O7YsStKMER9rj0kMeM4q\nCT471tV5EpythAoaEfPsypjgubZhVZgUOGfUgV3KA827b1dvjj4SPCnYbP1l\n3dbI/YNpDFEGv7CAApwi6JM0dv93wQoKHwXaSjpXTtQacM6xDgZQGPm4wlHU\nJLgyiLxRBCE40Fs78vHYaaj4rrjkyW6YFIWZXnI0yoWWR3pmAtcMi5lVXo2d\n9r44eJslybgSclv6SObpPhtC+/0hLsoczXFHyLakJ9qBb2VwH8GrpGJBZD+O\nPDcMKDO/k9Ri5V1V98kSTerUho0LQ0ErO+FcXCa3e9lloAcAhXha97D4dKGl\n5BfDT6UIHiXtK/rNsHQRKLKNGHk2wGi6Ue3IgJyci/DG1bcDi8qzebOKXcDv\nQ500Fw2K6F5WOIYhcCaRSc2MTzjaQoNEcJlFeFY9GQG1K6GMO4IRYTvxHMMB\nnhrp+wsXjyXWlKOy5A3zXtyfWJoyPYNQkdJD+lFfxCOrapTBHOcI55Os0wG1\nC3XEdK0d2d2f0z1u1hGmdulIGYgTo8aq6DkCi2iZ80FqTIO0aulJiLwC+6zF\nybCYQxYG2lDuQnYflys4tnVNMaUwdkjf43uDQNYzZd7LWPh32rA9YCgicZNO\n9gEK\r\n=934F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGeYRbOZHHNrxukzFGy8m1Ppfc6dRZ3PWkSDgvZC1ry1AiAVKhJNFycAeC8873s77N8olRC2TVrWrtTNorPhL8khnA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-60e487e.0_1562711318391_0.6427458229046601"},"_hasShrinkwrap":false},"0.3.4-7deb38f.0":{"name":"graphql-toolkit","version":"0.3.4-7deb38f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.13","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7deb38f9a8c9fad18e9870537b620d75feb270bc","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-7deb38f.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-rwGfhMdUvlTCL5Ey/9gXSUHUDkOb+Vc8l5DdIEFWiL9ax66LT7sKfQ6Qj+3Qv78Izj4oAyaB3FL3Ffb4LBVrmA==","shasum":"0ca6aceaff1ea3eb9074e4c96a69135dc145dc7e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-7deb38f.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJTphCRA9TVsSAnZWagAAHesP/jDqgyxW4mWAGlGB9Jzx\nFG6gPiBnOrx75TBDz8i3R0atc97eUAE0ZW7/ZF60qaVszvzdr4GsD6uDgoId\nyWuAEsjGSx5YEkcPI+37FuwpB950NnkoLWUKeUXfnwzlHGDjwBf75HC80maf\nM/jYCb/hiwDHan/yjQfT65QcoBN+pNbHfCMBNd/pjr154Z1+PI6PBc7hk2D9\ny+G8iMGNurgctpCkKcUTHINROC+MnZ9fQpRY3Hfcv1+W6uYEEEgjJNdCwg61\no2rpFZyjGnN7ycyGjiZOdYQ+koUSPB9y8obDZclf2ShatLIslFIatGMxm3Wq\n1O91NHfMLNn8602cmosFvSCKdxHosyCp7/hAgP+pNmWmySm4tamzUh4Rpk20\neP2BzU9g79OmJFnQO1Rxlq89FGGPzbLgwrvVjCdYaEsJTylY4r/aoRsfJV/b\nzQRNNzZ2XtEtMjT82BKYu1DeGe1OHHoNPsovBqBWuk12MmxkcoB3TsiMpLmT\nOwR/TwSMxtmI/u12F8pKi7wq+74yNEISz1wv/HXCBcgRbNPYW21NnZ6uXBMw\nIL94IEOVwisDo6X5eFwF1TVqmpiRELSuE6Eozj1Pj/aBJpPdirHQht4njN3x\nCFrZwPY8bsG4ex9QzGnR/gO53GFUFeBr0TQt4AwAxIVbWXiovmQc/OwOM8Zq\nVF1o\r\n=rX8N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFkXgXo97uEOLcQeP/sxcegE0KuW0OH3abSrm/anFD4eAiEAz93LlTzNMrvpTq25pVA7abVJhwbhheNQO5yNJ/vqTXo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-7deb38f.0_1562720864056_0.5080695860166209"},"_hasShrinkwrap":false},"0.3.4-5c5ea4f.0":{"name":"graphql-toolkit","version":"0.3.4-5c5ea4f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5c5ea4f2ba70092c0e0e0ca01240328c9439c57e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-5c5ea4f.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-RfMf8ho4kSVh9QuLB3AwhJkwkx3Bel8tNxWgwwvv4Rcq+XgZeOnRBizbwKcI5L8E0Kxy3EgVw/pIsnVJkgQ8/A==","shasum":"c1807d9e1d1fe382fda8e765e7029da8edef309a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-5c5ea4f.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJgjLCRA9TVsSAnZWagAAQXAP/3tVwuKPY0tIceRb8SSp\nhXXYwF5eBCA8+ZKZekRJIMUzGDkH8Q9kiTsLwhuT8KDNqpLSx13JVYYnJLHP\nITtjzQvbf2zd6WW5p39aaMLXqLpOwQZHxUFY8FM/DU06MCT/j/FjBMn/e8hR\nljhq1Fe25UFjFwkddV48cybMZqFENe05jFLyvJ8G9OSLlKY/X/AKxkZAHalp\najpyDr6p4iVo2c5TTve7pOAdJtBm23ESt7nvobNAtBaX8YbwTCIn1p5bZJ9v\n2MtWKyykSWuhXeirsedQ+mZTvyz/u4rdjaCXU6hR0wluMNnK5DxhPiTQQIf+\nPOkb9Mu3cdNCGMqsCNAQ/h5atZSxZqGSpW3Zajodkhz2dWjoJGVkRPFIEN5t\ngKmoIKk9eNwEfwKM/twUNrVncpQSBeOChRQ5is/2vD09LcXHDL6MDZqy0oWq\n0Ot915C9E0ePE64SvR82t3gDCDbFmIIgQ8TKILnEx4sF7As03aLlxyuBpvZl\nWTucZN+y3qrz55BQqOxyox570dTzltKY4vK4ZKvfsIBaKzeatzuu6HyJ4yC9\nBQzgdFMSiDIOixg9HBwS2WcvFH5Q2Zm99TCQHE7uW/UxZ6wYzjvGtE/0q5EC\nkXS69hCerz69GBiLoBT0rxxLFi30iP7/qacjYvFutP15ZOhE7K1uM0wGAAFw\nyH+d\r\n=GiJx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE23aQ4lN3Urmo4u/mCdcLf5L/ZjMPHKS/ZOThwJccG4AiBwLvI72aQ+SzDu+sXmf1EL1rcLkfI3+cwDdQJW00HABg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-5c5ea4f.0_1562773706937_0.7306862689133224"},"_hasShrinkwrap":false},"0.3.4-f373a4c.0":{"name":"graphql-toolkit","version":"0.3.4-f373a4c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f373a4c1a0890df85c1650fe6ce7888dcd7af572","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-f373a4c.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-cG/wP4ekphWhWu9iaTC1BnG3txjpHPBR997c3Qfb4uY/4AGDiZK2ZNwMkeG0mznBNrvRyw/8rhNVgshO4Xr4Sw==","shasum":"5fda05ecac4eeeaebde97aca8d27feb78bd4961c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-f373a4c.0.tgz","fileCount":269,"unpackedSize":374727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJhXeCRA9TVsSAnZWagAAqywP/2i38ifYuHf3J0Ez4a6Y\n7XeGuDnJGtJ0aaRx3XWwYhl/qysRpLHwPwsYY+VZ6hTcBK6FahXKuWnDeEfb\nHBGR2BKg2nPCtcBT2sB7tAOLftXCqhFul7qP+IY0nM5pmwNkBznf0VyZtweO\nPdRMPOAd1A5pV9GOfAHjJ3nE+Qf735i7fy6uooBEyLYjYnt2PTapvyX3BycS\n572rXT8YIiDRut4+0juASbj6Xril9N2zmzd6uOqKqYS2vITgjJzM9kGPgFGU\n+S0piwl3Nih3AMlFkH6JUuZ98XTslqXvMumx5Rw3aehst2IoqXlIcGOFeH57\ndP6zl3QrnemU1/VG95fdvEnhiS/GBrx84cymxmKYnNJgMVzHnC7ZoMR9ssGq\nMB5DTZ0M/z88ih92cmzoU66lpU6zXL5o9EAR/umeQ7hoWut8hFeHLdJ1KwLJ\n3DGn7auS1RHPVVJzboUcgdaq15Juc5448b+jvDOeo7E4+FSzV5c540Kl7Z1j\nVI8Da+av04gYXSWJGbI3WsoGDG5YkNU0hZSPAYGlYjMBbVwkX7U0v4LCdfvg\nqSc9pH1j+pLdPL29W34Au9yDg1cUFmyp5EER8CA2QRfmwKGolEzOwwZSDghK\n9BG+JZqrOjoeP4qn3lKySaacPfhkTq/EeWmOmhEUc4cBLgFd+IiFbOLv4FrZ\n1/aW\r\n=ExUu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCN5Oh+MwjH1ZGg1az1y9RaTE69ogbEzAF+4yGv9C4xygIgCoVKZQikMdHOxX10KljNeaDFvTeeSTwSOsYQrERt3gk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-f373a4c.0_1562777053334_0.5618031875056744"},"_hasShrinkwrap":false},"0.3.4-8d7a5e3.0":{"name":"graphql-toolkit","version":"0.3.4-8d7a5e3.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8d7a5e386dbd44e0c7f1fdd19b68571f18f4da36","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-8d7a5e3.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-HKYk4nv0OnnmAz85480RwNl4ymh9hwIYBzUPX2jrozeCcESc+hsOpmQJAA/8A08G6P66bVxdAJygYA+QcgIPPw==","shasum":"3c7b3aa6c058a63bdf1ff44f8bebdb9f0346f731","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-8d7a5e3.0.tgz","fileCount":269,"unpackedSize":373723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJm6hCRA9TVsSAnZWagAAjkMP+wayoBPKhscmY3zBk+Br\nYP3r6YjSrHnT70KudszOvJSFvsa4NaIC/Pz4JW7xOeSzM9JwIAdfV2JhS3QN\n/z/IiIGKRTX+OubS4hjXwI/94WSq7V/MGjHawXkcJcQOEdSiUwtWzvGGhJk2\nEfFXU9GZlVJshTo+a3BQn/P4gYmIFOOsXk7oPCbjJB5IGV6bU4Gx9P6UiL9n\nF4dD/+EtGn6IR7D6fzQ19qX5V14GN39Y7DcDxXZ9nEyu1fK2Z2szvWLnw26R\n2iFFyVvmJhTie0svU46/60niLqjN9kfgkewofrSQAq0aq6lP2uNdPT2uPs4x\nBaPv87pMxC1NqHjkAuCBzPWMQReiMx1ioMO+27dKd+7WCSN9zrgKt6cZrjNJ\ntWPEHx9KwpuS/GBg2JN3yc29dq/TNlnai7AZzVsnZj6LoiFbdwOuON13anoD\npMpixesV0vlmkwbyPHVem4fckO+3jjRl0Gp1+b21pU770Mhy99Nfzye6599p\nCNcOCxrPmSe/VOOVobxgu8evoZjNnwHk/GotTaCFW8EeZnpdz1y5m4LOMOUI\nlseezpVR/e6B72nFlSUfx4olLVYw2+tpYePe+GKcjlK0ORKZj0fMom0ADM8E\nteQNASs//orvlvkyDjFdyDp8yixKCqWduvDM+C58dnr5z0q1Xzct2h209a5Q\ndHTb\r\n=2DJS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMBUA6UhSNAmVDHMYToL5s6PF9hh+JXn7+xlGD2hU3EAIhAJs0dk1Iu71OgQQzfTY6/lHioZvuLLSVPf4EnhC7zvgV"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-8d7a5e3.0_1562799776444_0.047727942469034"},"_hasShrinkwrap":false},"0.3.4-976163f.0":{"name":"graphql-toolkit","version":"0.3.4-976163f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"976163ff6735a3347ad11a683b5db8c8e317257e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.4-976163f.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-mRGZt+KUJjGzWAwsSTEEERlxs216XCufgafNsVo+vOYU2gBBVwkK/IFAsYq0LmFTY5rRac+tabBjN5ZtbywzaA==","shasum":"21e6aea65e68da6222dc2c352d0a4ce3a39bff8d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4-976163f.0.tgz","fileCount":269,"unpackedSize":373723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJm8PCRA9TVsSAnZWagAAOkwP/0yKiWe0nhUMmjEWQr6D\nE6PGeIqrQAuzhum1JWg2vW8qN/LbYeLYXFxMn2Qa/luo/zNLYaVuKrRvKM6s\nXQboJhd4u13HYcFXFLp/uTJC28/zaifyGZCrnDBa6EBstyt5SgqWwZ556YFq\nGL/9TzkwRTzbDCCe8o1TjlR+0V9DrZGZKyUlurzo3lmBlWi+Qqf79DmipGcy\nF4rEgP2Dh5asWduAcAJ7OQVCV5P54mJviplXEp+kjg+04DQlJygQ5oN0W01O\nP2UJhFkeb9qsutZKXW8v/IEIZlxTZ+cbJXiEaE1zoOlimWLXOVnZZYYQ0XyF\nKkYN2lcDilbgxKoC0TRLozJH8ivYICJFK4PKjRyJyabo3/o0nSHKf0AkoOsZ\n1cmAhsG3kc9PyqJmUgMYOkMUvzVcM/vWjnCPZI8EvRd9g5qLFNsq2u33NOrh\nlEfM0jNjwSJFzHSeQr5/q2dNN1LhPRhdTHrd+pumU29xkoAP6usII8LVF8lX\nd4HAZ5ooDpPwi41AyxbThg43ueuYA6zaN8kXrsQSP7uSkX5qBaKd9qikuIep\nDGKfICkUIzgcsyH/vy7doM4Cnkz771CwKw8Z95yvhhoI6bCWkk+6g4VNVUYx\nVjoHEN/V9Aq/3Fz8/P+cbZiHABkVIV/A1XWOVj5HWo8Sp0rhgUfz88Ft3TmC\nX4KT\r\n=EGW5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqKHsNleRArgFuNaCZEOFloKJ9FPsKULpgsi/6alziHwIgZarcNt3tn2zwCo1dV9X5mkxNHCjVZvYUmJysOBMUZ/M="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4-976163f.0_1562799886883_0.48442971476502783"},"_hasShrinkwrap":false},"0.3.4":{"name":"graphql-toolkit","version":"0.3.4","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git@github.com:dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"licenseText":"MIT License\n\nCopyright (c) 2019 Dotan Simha\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"graphql-toolkit@0.3.4","dist":{"shasum":"7152205234479352bb871b96a116d6b61d3cc247","integrity":"sha512-a7pv/1D6RuyvY4BsGyF7FFfUIExzrx9eYIPwtkGDpo+j7PQbBYY7m9mQet07XUMw96wVZ4O1tqXrWOd8HfWziQ==","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.4.tgz","fileCount":314,"unpackedSize":381200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJm8cCRA9TVsSAnZWagAA50kP/1tX+G302alQ3ZBiGu/j\nHtqbC6pYq16v22uFFzqyXD7TRhCGorU8Qm6X0i5FXBrLvxe29MTBNsQJExdu\nqnAxHGFUmNPnKmsuTAq7GA0kc6IAFvMKIxafuT4+kRZ3iqCY3d74fgPVLtIS\nzBlvv6kl4AkJcDArQRHjgAfvkRXQvvKLwEeP9EKaywDeRYdmmZFd13Kas2ER\nj3+t0gAnhUDvDOvVdfpnNNWh5vbshIsBJcWfmuVtUI5euuFOZANSJ0NeCPN4\nIyKB7tHAjFm603O2m2Qq24hNqAG1N8oVMrRIk9y5KnRPcKutkOBef6tT1i6W\n/2XFT5WN99C/3/D2+zBkg/1KB6/LpKweLulncXSupwHZZe0IiA4PCR0OkC7z\nORwck0+q3rpvG4uvjmPZ6dM1aqDnGAmEyJxNurOuPwBLV48KLVkK8LqYXtHT\nsc/pSFB8T8IF+1814YUk3xb+w/M6F7ekdvMfnMTiqO6ZH++3ruvLf0Rb6uBS\nSoFJs6i0tQ9FYsPxltWXyHjNCnM8xTGBe90v2EGHTtr+GGhof63u8BXYmJCB\nh2wRU/xMTSNkNUJUb2ZROQnzbKXOrSvrPKVVcKScP9dtbG5g4Pozd6fXOcZ2\nU49Js28u+alZiam6k2roQiYJiKJei89jCwepxXybrQV//iE1xYHa1Ql/AYYL\nRmx5\r\n=hj5w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwuhMOKY+yhzWENdeN3ecV/RBpJ5+IkjEgxS94SG+VpwIgdL1hIuGdwEl7lyhjdIBUQHoYE+E7goO9M4S9ckwiWcY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.4_1562799899501_0.8180342969318237"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.3.5-04edb9b.0":{"name":"graphql-toolkit","version":"0.3.5-04edb9b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"04edb9b80a162451824a5661978ad386b5d2f417","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5-04edb9b.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-CuXM6bKwuG5tGpUI68ujoerjg1CDuIeKdywdZQ8FZUhSEc/z9XuQZhyNbvzfl42Cf9VsAssbKfWBmBq6nk9pmQ==","shasum":"7626b5994879e8ede99c5d384f7dc9eddfac8f62","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5-04edb9b.0.tgz","fileCount":269,"unpackedSize":373723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJm9kCRA9TVsSAnZWagAAHFwP/3AzMukPdorOMjIW0N5/\nI5sRaSZ7uLlSUsCAvEBojGJ3xvCG+B7HNpZaq5xIfI4AGqenOtx8Uwo08rXl\n3PK06vOcSW7KJrhZQGB7WacGyTZURBHWIT0HqIK+F8t6a0Z/1wS1Nq/l9d9u\nCCdBagaOZfrWOAWH48OHjIVOxapzxUoGafrJ6mIW5/P6dVtCXfu1Dws/Ct/i\nHbqW8FIlmYjCgXowj0EhGB/FAYUqH+lGzYuLGs6157/Qr4mRn06IRI8zBlug\nu3OvAOpzn1hKXYe/4upHPX4yWybxJKvGt3IBRCvV4cvKJd79jae3OuucjiNy\nebyw36F1DANVZytX1lL9fokDoCAFgtqls/SqZexWlg1y4gaxeiJe3SYAlqHZ\nBSClgVNSimNqkkMo2rDoqFbQWCnOFg8Cmtad7UQd4LAJf2UAyHNYIUq7piER\nP19H/W1U4Qrm7LjP9xnO4LvE20EPyiL85oMWtWBUG7YfnNZupQbdBB4Y7h8A\nBRPTV2Gwm3ysCgv5cLhqQj93BUDv4d4gDQNTHrzh1NUNSyDEeNICf6rEnwdC\nnswCjglShpcWHG2wTVGGV7HLatrs8AAvVFVBhzxlX9txCi+0/K5ixovZMfM9\nxwgaOGJkTK2qFRoP8oiokYzekvnCcNwqAu9fWanWAc9rbpR6adIeI67qEu8f\nLyIu\r\n=vIcN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGm8XN2gSje+QYI/nIQhv93Bibt7ipCo+Ifj9assdA/xAiEA4Ly4+36v1LmTF0guaOXZwZBZ9h8vcGtY+2P/mUdAGHM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5-04edb9b.0_1562799972116_0.9537240356984062"},"_hasShrinkwrap":false},"0.3.5-c8cb72f.0":{"name":"graphql-toolkit","version":"0.3.5-c8cb72f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c8cb72ff600e82f3ee781ac155840f9dcfd16d62","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5-c8cb72f.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-o3DFfUYI4tiS04pWexxdS9r84+jW9zagePLoL5vwS6G4RLBpKhycCk7FR4Lx26CpWrOz1MCZUlw6qDc4MMuUtg==","shasum":"b89aae09133f017226adc592aed80832fbf6aea1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5-c8cb72f.0.tgz","fileCount":269,"unpackedSize":373723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKfaTCRA9TVsSAnZWagAA2HwP/15PBwgtMfoUWqAvkP7g\ngfqaLIbtD30W/dSiiAtSzFwchfXNtGLoTFrJF3qMAsVY7llW7MGqNaerqvYP\nhIr8BmY2JtvfTk8A+6sEsP6g0Hpam+iuOX0fnQRo5Jlb53xJznUmaXoFAXu8\nYgidw7qaFF/Gp21MsDnfukD9A/zZChbGhi3bei6RLnevfBl/E0vRZKlmtIy9\nsg1U/C7op74bRRUnObwfwMjLSvAAfMsiPABeZnDtDjY5+EX8Css+EkWBITmH\nkO2ztZfCF5FA2aRysLpQHrBXstHVYwlcjW2HIngOI+ks+wUokw/jfZFgOqHc\nQDU+pw7qotCvaBwIQvYxE+XidqQuU1yeJnvtHi+oBEEcTSx7thcp1RFHepJ1\n5YHGbnbiFTXDQ34dGmTGtuRKNlU0ULQnbRnqh5KVAJ7geJ/7d70fNAwZ0/ps\nGakxcWZSHTg1w7QFj8yAT1vow6YEgvn7/tsO3GX6NKLkhJvzOcSXdRG3l5DV\n7iV1Z5SegDNo3S1TOTyt0QAO1sXq/gpSyQyHUdZ16dTmY+P4gxP7NHrBJZ6E\naf68qdYkHs14i7yW5yocvc1u+CNUYb8mxUyEF6FJXoj52OaewG/KTxOTZcid\nYJRe+dfRvVsGeuKNxCwTggDB6MAM458CGQ3vImC9gfkuAu+15Rjeu6qViq4S\nliM7\r\n=Ws81\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQnD+mMt5QpWEfVc5gTSD5dCtX8v3/Cqc9PbzA94Dv5AiEAhsIVJ8SG2WF8M8GQSVkKBNEt+d026kevbfkGXYuC4j0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5-c8cb72f.0_1563031187067_0.43753912631557323"},"_hasShrinkwrap":false},"0.3.5-a004912.0":{"name":"graphql-toolkit","version":"0.3.5-a004912.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a004912483b5201514ee0d97c6a61e13fbcae31f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5-a004912.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-a94pEugSMHnido/QiQa0UOGz6K8orH1X0DMjeSkvmwWFMi/xAeEQYuot9pcKkKflDOfrt+gFdKKP65oYQvDwpA==","shasum":"c6b8ff4f4f92eafe3afcb1b8b7ff81368b7e4bac","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5-a004912.0.tgz","fileCount":269,"unpackedSize":373723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKiLwCRA9TVsSAnZWagAAlxkP/AnK1PzdpafM2laXB6E5\nnFmTJMjo1kPwsu7l0P64blql/8Z5dSJi5ngVtNoPHCVsIgEevUrdyGerSNz3\nQ3ftdy99QF526g7ZxMou0Zg1N/iPZbw0Cd1z3fjHKLBblJPMJ6QhjVlMoxJm\nJaq/dqggjTZlq/5hNSBFgBCQ4rtj4TUONR+vMqQ4rswZAEBC0/xQW8q05uVI\nlsiyD5YJLqFnzHVheHrnAZhYCWoOieO3MAziyditAY36S7ZklcPlWlwhvWfi\nTz8gKbAaCMvZp60t4vos/gevVOBrV6qctq7zg+lMmHTOA/tnY6Nm4tBHZFH7\nSraKPYpktq5E9yc5WpI0zxAKt+IgLtFbhVos1TAPktJwbl4gIDDajfEvAmPU\n9Vp/QAo3NtbRhqON77lKgJYlMtqQij+0DjqJahrP9052AK6+tOS2TZxI1NPq\ngt6gS4TSZPOeYWf9lcXlNy5579DqIu+qnVMqgKdRVjsITEGrkP7hAX7f/d5U\njPk4wQc1BuGMY/vwuUE0U6wPTg/jU8JZ5Xi24Qs5Ic6mNzXQ4A8s/6iwX+Ox\n2cG4GeXCqNGFEK4Y/O0D8sWtE15VcxSrVBnTPCpQg4Irsg/jpQbUgwwAozTF\nM7tLj1+yR4jIjpXyVYZm3DhYiRSqrYLdT3mupTeba5F4j8MY+v3/+5GGr2RY\nNe5U\r\n=n450\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqCXJYCYLzOT/4ocQyA+BBn2PbF910KPUAHAWIxtJnZQIgbC64R6vd0gxwjN5apR1N1T/hg/XbX6bxV0KryErh1lQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5-a004912.0_1563042544077_0.58768936520238"},"_hasShrinkwrap":false},"0.3.5-7ee9004.0":{"name":"graphql-toolkit","version":"0.3.5-7ee9004.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7ee900477d916b2c9071ea895efbbfcab34ae0c8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5-7ee9004.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-M09Ve9Yw+ltihLPqcGFfMw4+vjc58HByEso33gPuUCjTZgTlUIb9E0DD8EEselqJWJISF9sKdXT6CJQpLsnBBA==","shasum":"73aae85ae4e3d0d8998fd8e226774be7e70cd2aa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5-7ee9004.0.tgz","fileCount":269,"unpackedSize":373723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKypDCRA9TVsSAnZWagAANcUP/1IFh8+w7TmAUFyuhvtm\n2vHhhVdrNPuUkTVb7hgjjgNcsbvelLmMy/UXLJcYBjbZxwXuvIf0Fv0sOJgn\nVoF2WlS+ZrVavWnIbKSKJGIuMBwJfpcm2J6rp8tpM0za0liE+ECx1UeGPnnY\nK41cDXvugQIETtPjS5H6qQdhHjbnU1zkbOG2zLgZyRt8wqT32Zr+RK1S5IoQ\nus2FOJhGE9bWen/apkM7WzW6I7woLGXsovGThx0Gn60daP4UVPVGGjjw64wI\nn8BII8iCCfHghpGKhR58GfdPOLnXvNXlIexTisSmnq6GLruF2A/ha4Dc8VUD\n/7pu20TJJ+xV6u0RYeuOS+9mjQRPVmyD5xkhDObUJcJXldnZkiJGr2M9AQM0\ngDl9xqAfRGiJ6MfKvjM29AlS7hLJg9J6RHLcldmAV6UVwkUyZVqmG/naZhgD\n8v2bMBLRXhsYq0e1gxwRlkgpGUpSRTNxztTJ4DjbkQ9Wh5UPfYMpyhirznL9\nw5NxfVkKZMm6wyZ2YZF0rEzZ+XU2k1D+4M+pDnbrbFR5bcVE6nhTIV2Y50b7\nDA4OJ4ys5EW0nGflRX/ztiWB8LkfzGrUq3LQHUG7zQiYxbUH2PgfhXVsNLym\n1N0oit3jBSPv6zP0pFPHPa1bdv7RZD4IIjL4pqMJf8RS1k2cFY+XgmomzeF5\n6qwL\r\n=8OFf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/dZ+4Iab+EASRD+nkviCpooqxBM4k1gf/2/PBJCJvlAiEA//4qJIdP+lDqMB1m7d8Wz9cDKRkG11Sd6AwIOwUmv2o="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5-7ee9004.0_1563109954771_0.29220818053912967"},"_hasShrinkwrap":false},"0.3.5-8bdcff3.0":{"name":"graphql-toolkit","version":"0.3.5-8bdcff3.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8bdcff340e8171ff5470b76b3816b120a863280e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5-8bdcff3.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-gri1tP+GtOEcAs1QdT8q3qHMyj14S3CzbU6IXIUiSxu5p2eNOFpfX2MS905hy8TqPH/SsU0xztYOYai226Vevw==","shasum":"5a1a68e394a47f0d56e838c3c4bbc3bb4e3837f5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5-8bdcff3.0.tgz","fileCount":269,"unpackedSize":373723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdKzKvCRA9TVsSAnZWagAAYiQP/RV+53Udb7lHZykbdip1\nlZA4LDujNDtnwWAEdNe66Exk+b8vtqcgGoJpfB/8et3xtObLsicmeaRQ5tYR\nve/VxjTBqq1BaZ+KpRatAusFUcpb8hg54KqOa2o0r27mv6zSto62THwCXAER\n/Nzhqn7uwXYSFeeJhvZwyPr+4FUhaPlHfAHThlk6UlE9olA/tIOPlxjoCWSl\nML0ldFG3xhwiMbUSlacgnCfKmOtvEvTfZe6ln9nf816U7IgUyqOW89wTdlOl\nngXFXXru3fde54ricR1HXpxyZ5g9nNZyMkbQfTqQ4T/bllMzGmOiCXLyzT4F\nmnUE/fLKc9BwYxZsVOiURsgB2AL70Ia95cVrkF8lhd2ElQDpFVSWV1SJ3aCS\nE1IkI4te6PgbEoBhGTashorPJLs0WRtiNmWVqDJHhdJ9+ei4rQQouZVLQ8Ll\nm5J4AD6Ke/2pp2jb4+Ll/isLbnkpDeRQIUEnWir+8csG8O0zX5DLDNf5U3Z9\ntUTRpjhH05jrspybg+9e/HmZ7UGo1k1dh3mm05LldZOFSo0rZF0nJse6GQFU\n9jlB9AOAnH5e8x5ynuMUavv/Pf91zlvZcSDZL3Y/1nqUCF7OkRRaR7UDpt60\nLL5znlyXxtEFxnNn4ki1hUX8hNnosYmPxg9BX3K0PEHwYDtccFIvyONjdAFc\nXK80\r\n=2dSN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvooFyRItAL416FrEOWNDc0eXYQB2urCdCSqf3yDq4VgIgUZ8Sk0nLR7Iu/kB8wLodFt2LgHdTwBTTBN6mE4xpr/g="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5-8bdcff3.0_1563112110605_0.6048390131916741"},"_hasShrinkwrap":false},"0.3.5-30299c6.0":{"name":"graphql-toolkit","version":"0.3.5-30299c6.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"30299c62b7ef7d966fdfc0089b98c358160d6ad6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5-30299c6.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-pLGr0iwPNluQRKUlGV7F1MZTbzLYFolbC8JkHaPT9kUBFyKb9uKA9oIV1m9FDIwxLMD6GaFHOlYbVjW/hdDAqA==","shasum":"39eb914e6effb1982e6ea4b7b82366b973b9fbf7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5-30299c6.0.tgz","fileCount":269,"unpackedSize":373753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLY8QCRA9TVsSAnZWagAAASMP/jNnZrQWov9+JMOg7l4E\nb+QTJAPALFh35WRES7TT8pkpfPwar6eAdrL/tGbGszoR8NtT9+h+mQN3C9TA\nvoGiF/vgZjSiUEA7OQSyZpKLtGgWJQTkXQn7s5OncAopctE6iSlh0WORRi9z\nyiNaBD0OvhSd2wLYiwqxAwIukW2sWeWXJDKsFIOtA1YdX9VMWj37FxIPivl2\n9bv18Tv/Mic8/ixmeTuTddPx1Az5UvmgJtexlprOHDhLpEqfe4NCLnH1pX8F\nPHYZIfYQ3OCKJBz2qSaxgQVZUMIgNlug/A4f4qxuirWAMxg6HwyzgUxOouUh\nIuKLeF7vt180DWj/XF1Wlkq2p+qMAwksYelbP2qby3vGZqsvIdscnwlaUYpi\n/YqNj5IgYTcdyMyyq2SNPL1mdwc44ci1SrUzI4taDt/4UNtTQQt5d4rNzDls\n3evw1D8yj0OLYOuO27CX2JsZf0XDapteUWLgrLsUuf9C5b17LleIDSHLhRRu\nYVEOMFDHMD5+g8KY1ItWxiqhnd+BRYzwAYSZUmN11w19NOYKduW7yE+i3bbI\nmPzcyj7wXp//2PQI+N9seoCFzt4g1dG9WgX4uD0B9VGbJFwoA5X5uvFuSTds\n/x/mpsUWNQIBo89b88SMAGNLZTZJ6TzAdVr4FnAZoCwzoMigNwOSOfYxII/V\njt6+\r\n=YQCO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo7uHKWW9hktuG69syY65OewvuQa2bgdT0dS7jPI+E+wIgAaOlKHlH/4BAvYLHNX/piQt1iwMbRUNtJr4NP3tJpYs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5-30299c6.0_1563266831991_0.6130801716915475"},"_hasShrinkwrap":false},"0.3.5":{"name":"graphql-toolkit","version":"0.3.5","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"30299c62b7ef7d966fdfc0089b98c358160d6ad6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-sPz2q8J7ko2TjG5j53Ri09rn9wBBcWELxGNVjOhMoPTbL/MwJIm5L5xxCcJpaJfgpJIQ1tp+gtPpP9Tupd9h4Q==","shasum":"1f6df21e5e8dc764dc63d5931e9960adc1799d0c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5.tgz","fileCount":285,"unpackedSize":381230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLY9RCRA9TVsSAnZWagAAHoAQAKDlnEO7NOiXOxL9rKvN\n0RPns+lVIUoYcIAAXsKv5ohCpmx7Bkj5Br5dwQrbAY2B5LKUTxcfXLbb/rXT\nO1+vQ3Cd7eLBBR/2Bz+Sjl5sjMTc7rJoD7pTi1pTWltPNv8Oi/YLpMzobOCG\njLBaDPmObIzWB/HLhHT3KAGPvZEBM7hQ7tNfTKDY/qxCsJLr1ifwDXQYn18L\nUlf/WKrRq2Dmi8DaY2boonRgltx8kY9z8G17NguizWFFP+OvBIUFoEW/d4C/\niHbVdrwbi+SUKKhnnCSbd/zbLWLC1OpH3ICZgVdJjhzHyUZwMsBko3HKhX4L\n+0l28ilk08QS6NmvQRtSOFkhiYsBAwFm1ZesBX94XKWBmVQeios7KFmjE7Ep\nTQKOgm4N5OzSBBeOqrNKjZEuWR8Wx6glogvmxvO9oAhkIKNVEWhsZRdfwYjl\njBset6cbnNZcL2yzTXM7ZWSv9cE5xfUAKXEXyli/owqpHYXR3CqFEi4sBbln\nBTqhQJ1ZjQ5SsZeBMnXR8LOCvUdDhJkSNP4iwcPVgJNANaF0ngGKiFzUDbyj\nIMSqWu1gEmoW4RaxQT3wXjEvRABGwcXZQIKmJ9TCWyuH8OPEvPb+lO0NpnSu\njUrDOTkuQemZAM8tzEyd7FR9ppIgPh9HTV6QXKVE3bgE5idIVuAqN+lcRzOz\nhkUM\r\n=+PYm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEUZxnUYqcxz+LGLizurwsaLc/gYxvWuPk69Pd4l0vsOAiEAkmMT0ZFwML1Gb7RCShtdBE5P/Sv1XwLOefn8aXOW6OE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5_1563266897118_0.6814418288564246"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.3.6-f487f46.0":{"name":"graphql-toolkit","version":"0.3.6-f487f46.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f487f4611178abb4319aa2c539e2bcbb304662e7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-f487f46.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-IKuz41ya/NNVGp0szkJz/JaeL2kj+ylBFyrh8CIAatqLvn+2rzapYzvPMV3al9I6qL/whBmTbc+yLEFaG0XovA==","shasum":"15215342d1a430afa94e9dfa3f65338124903dbc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-f487f46.0.tgz","fileCount":269,"unpackedSize":373753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLY+aCRA9TVsSAnZWagAARr4P/0rO7VI5JkbMx/YWT4iT\n3qBHAo/tinSVuZIABwJytAFIo2dlAkNsDPcgFUJboB79Ncsq5WJwZQS/26ui\nK90ICylYUoIzEmRv8B4NgLvqJVeB9vOUHLpZVEvicKIz2oqfPRKnJBSKMgQj\n+/tUgGQK+1M7Pesxd6ked2CeiCTVWM8pgBtKOVwIADDlh+OOTpRluUjfzTsd\n66OVL6Axdc6jBBoeSZqLdakLtno0YMMquc3wMI8MOwajf6iTDscSKh5jp5Lq\nIg/av75UGSvQ/PuXZeMIB5cAh675H8Mc2b88LS/BS4HpRZimmSmfsJdLB3xh\nukFoAsp+a4ZYq/8V8zns4vF1DzhQ9yhe+wZcOYmiAtPayTFKAhes/uIBm166\nG2GeHSYF0yEsLoq3cRPytj6yVyKfAmoyLUHkm6iY0UG4XV6XX4wnOWv+VbFi\nf81kEPUIWXRcmvw1F7vhDn4fpPGRwMEJSwmil++/KPba1DaAW6UzaxLP4BXc\nfxYF5Iofa2Hs1/5XyMwo+m+ZIg20rL1CVL9oycj3n7b36lUVHlQRhX6c8gaE\nzBN8LOz87YDiff0PFVwiHrQ/bai/nAlOjn6HFnqlsh+FMuwPa7XJ3x7Cdi8d\nyvXK5ba+4gY4q95eYLQNLA7AzL9TrDpzpsbhikOImA8P+qUPKqOBWcciaaP+\nJNQj\r\n=08wy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDV6n3S1XohMQWdLKb1074sUVJNSlKk1m1pAuUNhh9m/gIhAIMTEx12fktZICTfCixmXJD631D+Ey/rFfsZAgxVKf3f"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-f487f46.0_1563266970014_0.945601949697443"},"_hasShrinkwrap":false},"0.3.6-7fabac5.0":{"name":"graphql-toolkit","version":"0.3.6-7fabac5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"^2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7fabac5f08747bf3bfb5aa106845f94a3b118cbd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-7fabac5.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-B7wFulW2WwX8EbrfXO4p3JA/W9mNjzTm8xkdE5w/2c0A49Er8lg2hPPCTMSsFVM8Y0wbBjifOSBkTpbrWBSLYQ==","shasum":"1a9f63cd38a2d108dadc860640dd862f6d50e784","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-7fabac5.0.tgz","fileCount":275,"unpackedSize":375291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLZkgCRA9TVsSAnZWagAAQ1oP/0iLt8XSZJxpAcs00KTp\nSLFph0kRz8VyczRO5UQgyt//j4ZAP/ZSvvwsTSEjplObKNezvo+Z0LOuQuTl\nfezuHx1Bz5ltKg0y4dLXlv/gpzj1E7SovZZij/HskctbbGPlYsweo5dlJyRT\nWrmdsa9FisvBooH5IkZQ39WflhukwY5lcBm+AN272vedM2GknQR+/kVsgAve\nENPPeefT/f932Kpm+CagJic1xmcBtumdvYeDkM1MRhY+uo/Ejj7qm2cONSAr\nr5tX7nN3J8xhwFw5D1IKBd6gXX13/jD5RV6LbZuZmmCwaaAGNOlWJaJQoeWC\ndt4JxzFTvyNSb93kMVrEbDNqxnHl8WZSeXUdGlQkR7j1XcEiH5a5YilKN3JH\npNEM5BO3wcLwH7wlb+3kfXwh1MMlKg5EcBVHAcd6qYUoC6QwBck5s9gJN4os\n8PNERc/jFW42poeuxEr6dzPEGywUcz00bVB1khyInzIcc1S1KQInCNPt3g67\npi0Aw0k6enkfnuMXyE7k8x6RvL2t9boXXyRy+nu+B+jiDcWp2OMAADCZlgtR\nL6G+JhJfp5k7CALburTEyLDmniV3yy6c2C2rJTBJgia02md+ssTei7v+b4FN\ntnQ0EcjdL9moFEZ0ZDsFsomDIfiYgzuA0nUJ6IPHfrKRF/S0Esn4LNLTiN9x\nFf0M\r\n=Oiu4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdNmvKovpUdMyhMxa2mTSWl6mXdDnKXmXBhj2uASXohAiEA4CNR/Bx2bweiAoSyKH2rgHhJ0KlpbJ51qBk5FyISpT0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-7fabac5.0_1563269404524_0.21602292194345019"},"_hasShrinkwrap":false},"0.3.6-b566f5e.0":{"name":"graphql-toolkit","version":"0.3.6-b566f5e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"^2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b566f5eae9d3401270e3c2c75ca7128be85f67ce","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-b566f5e.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-f8P/TA6pkAJncGTzEA1fhIWy2JIuPcrUzD/d5e75DygYgiFyqyOf0cfW3TpWTLG4zJ9/kP647h5o2/06tgBIdQ==","shasum":"db3d60d1715ea74a553fe34405b90da5b02e3aa3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-b566f5e.0.tgz","fileCount":275,"unpackedSize":375291,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLZl3CRA9TVsSAnZWagAAkikQAJyMowMvoaLdQk2vJ3Gh\n+wgMRM2c4aazITlD3Zu+XONqDXKTsvCHhsjPr2la5ek+cVUFs9WDE+Zbw98e\nfBpXZwPIGRAvU9PuKVwtq07rywKw57KemYm/PP/6F4a381v1lSuNC17dO4Yi\n0GTOrQ7dNHTNgeAb5qMhpq/Ogsy8Vlrw7hRCz6YJuhCjsnSObOtf8TStdxNq\noMKX/mQZ63N1d2RP51WdeYoEUm8fB2fCKk2nX7PH3dWrecYysibcqCmn63zj\nJjvbWx009h8bJ3h8TAHc9sdDlzEnVcUsnU4JBspxjWE4gJ/cZfs6AghRPjcp\nbJVrha0847N5eBrWZOFbN/YcJW/f/GAXiSlIRiS3r4PUWLwI+3VOEPZgYZz3\nuadGEdrHaaMgzk2pL2c5f8YmncxYb3yXk6chkpDfYD37NzcI8G5g+SafLgEV\nTXLHGE8iaGqUDQzFoFcLLxtRvSLICg9qAlkCu0tnAHECNVDF5ApPZmTzbI9R\nWQ9nIHgQu23ss2Ojf6KaRaHkCpoF2PrHqIKVAhHKfYRgx+ikUKjwzs3/XueL\nYLOdykn+LlBJV1Cr1fK+QSPdriWdIuEnZZ2+bWidlPYrXPe5HjAgpLT+WnQO\nlKStOWaJtwUTEg7GEN/NmEm2Wv7y6gxTbjfXJLOOrUdcRRFu+ayeGeLCig43\nmAt9\r\n=A/2z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6JxIIiewgKxtaNJfPzR0NiBBU7EzofrzJlKa3QBJGbgIgYUyBX6ejZlGbxCVVwbJWVx4CVJ8dQq4aNGmofqEVcTg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-b566f5e.0_1563269494720_0.18796882549576277"},"_hasShrinkwrap":false},"0.3.6-7916df4.0":{"name":"graphql-toolkit","version":"0.3.6-7916df4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7916df4f6a089f98863a803c136f055ca144917f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-7916df4.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-4DIjcNSxj29RJhTTfPxz613TQFWAwpgdNI9khAkJAzcaI3VF0ekc4PPGwv5vkXr8vDFVAt2QHUtGQRIFrMEVng==","shasum":"d8e46275732e8064aef2eb48f5ee8274b360e3e8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-7916df4.0.tgz","fileCount":275,"unpackedSize":375290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLZmQCRA9TVsSAnZWagAAjvkP/06shCtRzLoddxDNWL1j\n+wIrVX2GxqQ6Kw3gR5136ZaInjt1QW8bBfJOVT5E8Vf1cZMGZaErfqkv0O14\nLBc52LY+haLp4PhnJQnzvlRDVqySuC5rQ+RQgU7iEL1fiilwSXkgU12jjAWP\nvNJYXoPnlF0SMwSzhB1OCFIUMd/mKygB/Tr2OYx4WPSQU17b8hP9un4RQLG6\nJwa+KUjNsPUPuQHf0x5XP1OTmz5mmqJVrDKC989mdGDSOJvUMvHn0/ml3NMr\nNZUpOkblSGAijbD4GF12IdtH9BNKi072P1nj8yTeMvP5CKMi8qP5so4FFSlp\ncPBRaQ9+MQOo1gJE4yifthNdI2uAGxZ7HIi0WWtXe8VxJvwc49fj0ewoiX5+\n7AyKvxFfcVe7XXIYS7nWB82DjRMZ7YFl8opodG41CcS7yK0miMEVJLBqD9Uh\nkMLMGn87hSOlwfbN6liEp6EqjGbWU6HfkteIPKRowFsNMGwxY7P05ivKhLVq\nlWQv0tdQAGxqie+iTJKGX0J6TtKqSHTsCQv9A2zpP7l1fxMje5zligXQPQbY\nL0VR0dHnoYge0Q+mf3tsGiFbD0eyPb2pfg8AA7vc26v09MqlYlTQxidjpoJM\nsTuDbkWUg12zoMKtn4UUxY0hDtWrKKoVmgbdpXnkyHesRfs9+UH/mww9be6U\n26rT\r\n=nOxu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRc7VEIXmaTIEJjYLqqwGcgzybyv+Rc/QcSo1ahPUcFAIgApOSzr0JbB6f1PEeT58LcrrTHT1rS3enMGRLyZBWObg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-7916df4.0_1563269519998_0.5135025703382405"},"_hasShrinkwrap":false},"0.3.6-4f34326.0":{"name":"graphql-toolkit","version":"0.3.6-4f34326.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4f34326a2c031752e7bca0098eabb29e446884a2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-4f34326.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-30LzZjAJqpJAPIVsVzWkf2opIBSsLmV+Bw+F+nrcKS6rDTwkX9muBvcuPanksURItquvSmpElN3vViFh0bc5YA==","shasum":"446dfa62c81e0e521983dff649dbd3de2ac95e1f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-4f34326.0.tgz","fileCount":275,"unpackedSize":375290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLZn9CRA9TVsSAnZWagAAp6wP/3G2TpQLHK82CjuVaJey\n/hkiFnfkF+pa6Sadvj1sQOoyUfcZa9mC2dcpATT+HSRIp7Mlld8QWCV2TpxB\nkF6DFpLL+b1Jz5sTKPO3XSsd7vftUuwPwSJl25jfQUaAaqcbUw9WmV6g+BIE\n/rpEslMIo2A+LIERiw/BUMSS3R1UoSNWv0LVyVLZBI/rEnnOri7TV5z62hdG\nU89ejUJhnuGelYQ1ccnAfaD+tqqGE8HB7mYclMVlT2G/Pc7r79mKPsRlE4+J\n9UBI1k5WM5VB/mKJlUpFQgRyEZrc8XgWndsZJySuM32MxCX5wxeREsMa4B2N\nxcJcTQyvWpJLZr8I1jbrBczn3Wj9O71xWylDyIKoGnk88BE5cVTEY6MVAH8O\ne85fJu5BjnF4ecdeVdkDO/4olh26gWPUmV8h8ZiscYemSk5NUNNuCAcNXzih\n+GM75ycHvopjPy49lGxgPS78MnghvgPmOlzyxqMMoqxrVkTnMhjTuJIbqNUO\nXgThGtiCFrZ4r6cHGdUgMG5qwgk09c8nShtnYlWJSrbrnLdJsTlTm0pKtitU\nyxmneXL7lIfsQ1UD+GpHmJt1/Hhwq/aoe+amjpjpI10wOgexrGS+eXCpPQ8B\nhVkaUqvcXNW4Un64wu16kPRfQrOZoViu3H4mhyhq6Tj1+4TEXsTjG0vuNy16\niaGX\r\n=BNHm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAk0Y2wneoezyAov9TvyM/EA0PHZUs+rIo3B8RFrid+5AiBWGg6rs0AeWrxgkJIFUC2t9+oCne0hJyY4fLl+6UUGSA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-4f34326.0_1563269629295_0.09914180038914111"},"_hasShrinkwrap":false},"0.3.1-4219079.0":{"name":"graphql-toolkit","version":"0.3.1-4219079.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rm -rf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"devDependencies":{"@types/aggregate-error":"1.0.0","@types/deepmerge":"2.2.0","@types/glob":"7.1.1","@types/graphql":"14.2.1","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.134","@types/node":"10.14.10","@types/request":"2.48.1","@types/valid-url":"1.0.2","graphql":"14.3.1","graphql-tag":"2.10.1","jest":"24.8.0","semver":"6.1.2","ts-jest":"24.0.2","typescript":"3.5.2"},"dependencies":{"aggregate-error":"2.2.0","asyncro":"^3.0.0","deepmerge":"3.3.0","glob":"7.1.4","graphql-import":"0.7.1","graphql-tag-pluck":"0.8.2","@kamilkisiela/graphql-tools":"4.0.5","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.11","request":"2.88.0","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4219079d3a1a37fa1d64524a2cd36473282a953f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.1-4219079.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-G11T7r9p2UgA/8zR0GOilOv84V7ol3YTCHRygK3gxB3R8m9/HVFrLO41eY/7UtZT3nC1EbqLpGBbuI31xfQuRA==","shasum":"ffbcd4764fa0aebc5e02df676aef521fb20ebd32","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.1-4219079.0.tgz","fileCount":245,"unpackedSize":338460,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLwvGCRA9TVsSAnZWagAA4UUP/iw2Krf8byp3rzARFoBy\nZpaN0QlAcRLKxKpz70/Ng+kwVONj3uH7RzIVM8BV96/mPbcvrcn+k1/Tu57S\nSN/XBPYUcyjSpjuEg3NBM1d6wuaD5kgW+rfpN+6yk4R5ihRmjTtwJJ+x6Q7H\nzgrIDJNn8WYNLPqYC9pa2tR0KcSI9iKcsvX8sdNE0deCkleDWMPsEQZs2vZ5\nKRl2t5iojO5+ED2ANFcGLMM9bUuNaZzdlXRZgfUVhmcIs4gGy/1xMM3KSICP\nSfHdh26PD3Fgr+HyLou74W4vNoUOSYDIxVYfAfgxXYstVXMhpW612Ft7Aeuj\nvpQfGMXStAfqJJue078vvdkNtl3kpXU95ZDLC3EQB1AY0cIurJvLT1j9z4Xh\nSyGYZ5s0R1I4boXP2Fh5lbXmO0iFuR+qyVImdAjm4QJe6sJS7d5vQA4L+LcK\nL1QxoqX82/2Pu6Bq07BXyK+pxh/XGCOVuS6MirnFh0ojBxMS7VVYV8/7mmMW\nAg6WTc8i0A+IWjgD+LUda9NACGNaXhuaUZY2VlutdeZHrAUAiQTbDLDKpldz\nuLNWi6n4Hos8qZrObWBYMcmbm4/Q5HWsaI11uGgq0UmL3bu5OW+nXj7iKwMb\nk3eptxL/X/XFVoFGFAPPSd4wvWQuCfU/TqEGF0Pi6NxpQuhcyxShBuwT8s2x\nT3V1\r\n=4TmW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAljwFvrNSlK/9K+eA/+ZPHF49myrmGRrXKQBODlVzqUAiEA30NpQx7Vx8pH69+GnIfHpH9YjcmSwxqi/MF0jAk99CE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.1-4219079.0_1563364293177_0.8125126399085649"},"_hasShrinkwrap":false},"0.3.6-6900ee1.0":{"name":"graphql-toolkit","version":"0.3.6-6900ee1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6900ee1d074250fa6d6f4d9a387f22984fb4c748","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-6900ee1.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-QebR8mTykNs4zMMGekrPd+nNdK9llxTLjHyqX+KhdV5tyFpLBusfGAiaGThAasJgzjOBOfAVvopnqAQFhyLbLQ==","shasum":"8782929f184099ed9432415e8befe25338d60c7d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-6900ee1.0.tgz","fileCount":251,"unpackedSize":344935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLxA1CRA9TVsSAnZWagAAvvgP/1edAzayTT6Z8tSLTmet\nD33zjuRSR75kjXtbfRomkjW1+jLCpG6MAZGvbTiTySAQGovhFIRw/8RkZPkK\ntQ11RyQbOPdTBM5a/C0hns4uJljOYFEQG2TVUJNVUu8zUlrCUlJL5+l/tTMs\n2ZJRGvJopre+D2rH3N/T7EkZem2ampXwoeFWePoi+DmnT9+222xHmXH/N2Hn\nPifFJY+FIL1SXJILEiiSQ1eLLej3qIMaYIKbnd0vZTAOKdT3P47Z+SdVLBib\nfse4SyN1vGz+DybT4xnQTBoDoAOpPwL2zLjYV2wekiwtRVI4sdFBRO0SbrMO\ndVyJoeEY1llWSKujofOrwv1CVXxBESoBM7IPMkoo8AAghID8UqAnfqm78TKt\nE4hpM3J0tqpAhGS6J0ikNDLkOSabpht6XtiX8kJX2ZzXaYxaW6r4dkWpzXWS\nIRhVpN5s0CD5IotwWJ6kldirpoLDL1SSpgdronDiH8+w2vZzBQV2szmTOz+/\nYRFfLJah3aEyROtqDwcqC/NA/oTAC5jdAsrS6f5bv3fOZ+t40Euc1VGU8AHN\nJ7aD9nVimvZnkhs2v2UOsuNMRPFR6yKp9wlAVFs+5CW6nta4xinU9zHsJc2I\nEJ1Kn3GKiJXTY+cepKg/0UoBlc1l7o1ofzWR8rWog4ftqJ07WjqnhFttUEd8\ngbBa\r\n=kuzs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEh1zCSCP9wsQps2Pdv9cL5I6MXKQ9vThDIftXnjZ9LtAiEAg4pXuJHQYoINxifPNGfkF4HMUR12WO/+4EwA60qa540="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-6900ee1.0_1563365428930_0.7360551589102136"},"_hasShrinkwrap":false},"0.3.6-alhpa.1":{"name":"graphql-toolkit","version":"0.3.6-alhpa.1","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"6900ee1d074250fa6d6f4d9a387f22984fb4c748","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-alhpa.1","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-/2gTnKSMLB8DfAp2U9nC+ddbuSY5TcfmIhu3eceY9KjbNdqoMC51p+a7zKt7+KVQm0bxQt4bExpJ7y5v002/zg==","shasum":"d3fb4b3e57a47a446aa5d6397682a7b474e6a74b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-alhpa.1.tgz","fileCount":259,"unpackedSize":435266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLxzbCRA9TVsSAnZWagAAA38P/AqBn00x2QClRf3XPfQg\nbQoAQPu/makALf1wyE7y2rmLE/Ntla3cA+j4YS8O07h2qXtpcRFQuDv5O7A8\nEqnd+PAs2okF4jpmsQG8CNxgVp38ZRevbyzHEqHbnp5OAu+jX9z7cB5jSN/T\n47BZBMz3oL9VWqLU9piLcfK15TYjfkczpzUSPe2TX0ZPa4fpCVRlke5ny49y\nl0cFS0xewQUZqcclsZrINBDmExu65I3tcw+m67XPXR6ASt2WL8svZ+DKQHID\nnOb+q/W1I3CCBLQnXdiZ7RpYbrUYlR4c/OMUe8u69ecO6LSZh/KFuhHnVIgA\ndDEQfHiaIdFqseX2CxI87zjB+12KZyGUl2QseykeBia1121vF9DuyBAzxfBQ\nw3Gb8LDWx30eMFz/uo24swxjqFWsq0el6AbVKBpVKhKrpRJ7ycBPm6032VlJ\nPWiZcI6Nj6tTv66XV7+diIfpzX9/9eeAPJc3hpzwr96KTLkAYqaa4j696cF5\nxTvJYi4zIlLZXYpgA0c2kDnTSzFbLxGpYAzsx8YBPoJGco0bXCWn7Y47qa8k\nTpF2gyCxYXlIRouWlNCMdEX5FOS2SVub68giuEExqkQyB50WDK1+HcC5qKgQ\nCSj1CvAAEGFNa2VYZwpB/5Iz8NHvpxmYhkXL8u/5vOuArfL/aFFfDCCwRBUW\nMkAJ\r\n=Ncvv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbvcgGrKOTvx1gENqcmHEv887pbGIaSspQdEJ86ASgIwIhALzxDeRPJBbg+PnzsfM8GGBaiC0jE9VW+vHWAQPdSiNM"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-alhpa.1_1563368667213_0.4088533191187973"},"_hasShrinkwrap":false},"0.3.6-aa3e7f5.0":{"name":"graphql-toolkit","version":"0.3.6-aa3e7f5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"aa3e7f5d63f9b54196704e3491454fd6085b7a09","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-aa3e7f5.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-g3REY7D4YoJLqQAkDihEwPs5Domv2TU5dxhrE4GTXq0Pna47pF1SRQJQnmrdvCSnv0hL7pIf2tNSjaxWO8BGcQ==","shasum":"8233e140f963f970f5ac18390a2cde3a248811d3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-aa3e7f5.0.tgz","fileCount":251,"unpackedSize":345053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLyIMCRA9TVsSAnZWagAAvhIP/1mVWZxMIkwLkGGkVTT4\nlOZ+z57BfvqcTPqdU5msPz0SJkyK6J8HsngFWi4yftPH0P01okYWnlzH7BzP\np0TKL4iruNDm9b1mkJEgzDH5BBKly4DO0Zc7t+W7uQD3EaFRqVofqQ86tpMB\n/Qvxw7ePHKrLVfmDo1GmFkelz7FZZdtfJIr9ELlKb9umPZVt8Yx8deFKnpij\nhbLRghvzRb79CXCaSJqDN9kv1fIsEiRkuoVgwlxvhJnaq8hBFuPxA4Sjdveh\nd20I0Pg0HfjquTnCC3t3Jbff6CtUPW63NtMJfxDTZ3Zx/yMWc8wUOxDGVQPR\ndfNAYYsVKoBF5l6Mp+/8tJQ4pEoP/DU010r7TS8lgir+4bsD/yqZ6qR7Po2U\nhL+Cbd7EU0QqUq10OG02qkmJvvuTwpOG/YZcALz1zdLXz2AXYoBbF7wza+Aa\nurg3W5Y3h3rAsALbe2CZR12y32cTNX/Uq8pUXItyyyJZxLueKZxINmjWS6pA\njiopCYK+v0ubbANIgqiktRJINspTjgn53v7WiZvuUD/vnreI8ipCX1bpNack\n/zt/f5b5w42X0DiTDqZsF2/CJz31tPmWoLtYqCAOuUTCHFiCaTDd2UpKpg48\n4FYCPB94BPSEKowTB5jm0u3uGy355nMBu0LBuAd9CPuMN93ZS5NarHazuCfx\n51+i\r\n=5hJi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAWaet5PSHT7YXPATUr3VG4SnL5W7qgzPprQ8UlwIzTlAiEAp/AT626jFLzYdlC0T3SmREc/8kovrOCKefy6a8+2edM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-aa3e7f5.0_1563369996228_0.6920669814618898"},"_hasShrinkwrap":false},"0.3.6-4666a75.0":{"name":"graphql-toolkit","version":"0.3.6-4666a75.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4666a75184679aa9a33f5f9bc7da12d9861a1058","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-4666a75.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-H7h5zxY3noQ7EdbI8NLjTiAeAfLQh6shv1Rsb4FoOXsFNdHZGR+pxQQT7Lo7uYMaiWPM55lSz22FkgWLc3nc8g==","shasum":"3c9ad3e7323fdbcdedb6d4bacc1e0a43c6e4ebb8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-4666a75.0.tgz","fileCount":275,"unpackedSize":375290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLyb/CRA9TVsSAnZWagAAvMUP/AlLQYVfdeLVh+YLmi7k\nsG2kDUBzhG69iT3/POkbxyknv1HlDwTftb4LSlsrnO4uDe60lPwep1X0/mdK\nUZ37twsmoMK2exY9vUsL3Pi075RER9bqok3cYXha5Ir2wb7UaMX1yOG+8lmu\nGbG1aOyOhc7EtqByItjxolPEtCSWItp1hiKWIBVRk5BVAYu0qE7LYtoFabgm\n2xy5zGHICb3L6eWB8sTe3DkwYkZG6nTy7Y26a55viD9trRquqwsUCsPoBJ/P\nlgGpSIdr/YTu7xD1K9fT4R1WIzE6gAhhNyTQmC6tQtkQkT1SHv87dcriJlFs\n913cBNdgFqU5qJDjiXzUjRNOcL4b2pI6f6Jam90yFj3inSRzFHEkoEd1E3ih\nSvlQfXFEvHLtHOVyRld8V7x9Ev3C99NN32h56rmJDYOPOAvA/VTRlNlw8HDD\nkx9fSvZ/zx9zpT4+wo7HnpqyYRpaAmQL4zLVTObcjvTPuM8V20dPDP1ikKOf\nWS9blOD0Rw/NB0/WadhBd60ILNe1dGOtyEaUVHzEYMi48s9SJEQRNBpQmpQB\nCngmaYMORngvK5CaLEgR7ifIzfMSfi/nNvE1UY+kzL5PYXbzjweJtf43SWqc\ncoOsVK3q1IdRQFFzPlqK+Itvk7SYuqcco66TvtDR/rLHf3T+Aa2+Bg/JPcc7\nsvK2\r\n=eN++\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFWTkenWpZAcBrYR7rsCMfP1vRmpwQ+6Z2nFsOnAjBUHAiB1u/xOS8fXAfEBfwfx59Xs1nCRhVIXXBviAez0FNho0A=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-4666a75.0_1563371262546_0.18709208467460225"},"_hasShrinkwrap":false},"0.4.0":{"name":"graphql-toolkit","version":"0.4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"21418590bf367fa1fc96dfcb9c180b6fe6f818ee","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-wAJzm9C3rqfeg3vEv5jEca3qxVYTqx07GBsr3lpbh2aMbx9vEoG7EmbfDen9vyrRGyiOyPxaTzrg3dTQp206qA==","shasum":"66662b6c54e585136fdc7db932799ce8f79e7cb4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.0.tgz","fileCount":260,"unpackedSize":762035,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLyjaCRA9TVsSAnZWagAA7LQP/1PElQUrYaPrbc3o4FTJ\nD4YXcvnNRo1Of2ud/NRM9YKVIJ63vgGxkLFD3ZprFRsXiR5NJj67NZqyPp1g\nKbc0wvmztpySuyyYvK/v7Rb7B91d076rCLYLdfk+Y/6gNzld5QgmZTV07z0r\nFOu8hx08Mfku9vF6KiLCWtFXuSGt7W1yyolKHURpOW1jThcCw1/pTpnl+KGq\n2lVsNlQJ/JPlPWd+1ID3qfVG01Euez12S+9wls8tBelmHdLig6ygwV+916qm\nUJgPAC293tWg3IVpjd5uYpYL8ZoN45eeFb8zwLy9c0kYkFlVYwBznAlRq5u4\nGuge48OQ8jGW6ukphoM+Xp2JNuqLHZunfGSSA78Vv2XQk1Q5YGr07I4lJROx\nP+Vvbow9I70go2uezJJE9r027ZusSpxvS4j0kVP9EBrKLco5titK9ecZqLGI\naQ3vzalqtYcMxF+vU66Xgpn/TytqrAXDpb1S06whzMiPzEfmVwVxFyZXP3VY\noWl+xV0pCEapg2g9ennuLt9GliUnaRaO4QH4qNbtZFJ8nFpf5Htj0Jqv2kYr\nkkgy5eMvguMotSQTBG1w67xSCyKp2lcBzRMBbbyvazTihNcuchelRP6uiISN\nP4s9bbrDltB7e2ovtPJpwaYiON8VGqIkihUvmis0P9H/X3vI0JHCYcpC2mCW\npHN4\r\n=1h9Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFejMH18iHby9gZGOmjjvX75eNEvV2JZpMoEzjxVNFOqAiEAx6csghBNrxXxsfumxofXn617texSIl8Rcp791fj6oe8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.0_1563371737444_0.02981245791624465"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.3.6-2141859.0":{"name":"graphql-toolkit","version":"0.3.6-2141859.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"21418590bf367fa1fc96dfcb9c180b6fe6f818ee","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.6-2141859.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-0UmpqQGmMS3kaftWjP9l68/ZaNk7yJLHfmEkgDunXLFwKDqqTQBjSeuhW7PHBnioZ/hLoSZYJLpNtGsBlhCHPw==","shasum":"7bb10d12aa6362a8ab419b6a39f96a146e90f98d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.6-2141859.0.tgz","fileCount":251,"unpackedSize":345053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLyjtCRA9TVsSAnZWagAA+0sP/AhXMUYzc6kOnsq7ueCH\nlnAyPmDqAZA0vMbWJkQzhSbWqIhpdeWLBE1nsmAP3mcWeaymM5pr0VNFILyY\n92FVFb5XSiqJbEgNKB+xTydXyngD9AwNgtUQmCeK//VqkK7lkC9IFSvntOke\np1q1kd/vnc+FB8aTptymZZBOcu/xVVDuS6eNeFKNQeoIyFw0QH4tku3ddAMW\ngZNdVmox1+phXUDyt4CviQhmhhIYEzxVAyy9uhxSxk2IGn/CXO7vLDYO6ZH1\nRNjAZa0qgp/PZzp2cqYsMapK0VZV+199t5ZJ0fxZC4x8vEJCPcLHGB57nlD7\n4IUaYzp7gLqD0CvAYLzLMnFhhgYEhk6PqbaghCrzr41Dvu0HbtTNDeFODv5/\nNdSgOMgjbsjxb3/R2sEIzQ/EDf8yzh0hTCbE/8INVhbGPwkgpACkjv8WmGnY\ntI2hPKUArozNPfjuZtfNVG771rC/9xucrHWPdVP5/Ns4iwHvcM2FWsFDsxrC\nohe3En64Zl/qFx1/n5Bx4gGYBCsIaLNiTI0s32MEeJrDS01q7Pw6vVqkHHrq\n1u7YoN6PqctHsSChD1jDkYdEhD6QF2RRJuOdWXfWhQcydi+2ukHhDPQvJWjY\ndlbYLA/328/Hquyr767FviTJzxtztXvdyQZp2TBLiV1/JWwfW36GsOows6K4\nEL5j\r\n=3vjf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCt5U37hEC59X1IqDV3EiU5zsjKYNtkOTLeBprwAllvuAIgRNVKJEC1Wf6orZznduKiMQdQc5ALy0bYXv9twaDkNfk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.6-2141859.0_1563371756538_0.21114904636804077"},"_hasShrinkwrap":false},"0.4.1-413699a.0":{"name":"graphql-toolkit","version":"0.4.1-413699a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"413699aeb68bed724d637a16cd855dbdf57c8c19","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-413699a.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-r0fUu79wUoTuvRU1NeYwCywInYzQ4ZVJvYAo9Zbg8aFOPtZS8D8eDEe+cT6N2HbDFedmcTIUHiwaw+mcIGmsdw==","shasum":"a38865544c18c25df86254950efdcbee6d3f7d29","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-413699a.0.tgz","fileCount":251,"unpackedSize":345053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdLykvCRA9TVsSAnZWagAA43MP/AnxGmbgL/g8fHGb7qZV\nIAiljMalhwhCmb3g0lfSgWndHIc7L8yXKTuDLJ1cc3ROE4XXXYEO6c25MhLo\nfD2rrgvyGZPOLfS9oTsGIRPPTdBJQpH8eDyI19B/3gYMOzPOAIKOHLYUQYSj\nH71yDGNPW58yIhO6/Sns71c8FOBxeU7cb7LrzBmttHIFmJDgpn6u7uh10pPL\nkijLTjY4sFPYo209ba4mp3ix1MAT7+D6/j15858YLpCx8kfQpIpBMA3pHgjU\nPECBxKrAtOQVP9XgjljfuI9gVV3QKQHM5MFaBe6+R75yOWCaNQU4x+4/wxaS\nfikpgLLJ6zkmeaWK2JoMkq/Bx/xONTo1Ea9AeZajyTDBE7uljlX4P7V8EpdP\nipW09+ce/OJrBuNnGR03IOkpbf+oRAmJpqSzFIQfH8AE5ygsAeZ+E25BV9HB\nw7Go+I+KGR1WJm3myPEi2cdNwxf48HEYl9du1XWIcDF2p+cVrLdmMWbNOmb7\n9t+DJ6yh4+/jOUXBHwea1bqHwbq5vO0iANSXpXo2gVKm5sIUh3bteTRYGZ/n\nKptvdqzi2oGy8vFfpmTrMt+vBvd4ovaG1W31iT1pem9JmXEO9HMfqSsgWBc6\n/GL72zGw1VZqbes6ljg8IiHV3rCk7dE7aBE47ekISgaJwRtXsPJMbTLA4atR\n1wmq\r\n=Z9E7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCD4wjH0f8hdmWRwceNxiueyEZKKpiKqy0skE76Nw6kbwIgELFlbFu1SWYT+nMYQ3v1Dg23X6DGb0blwTDcAYIRglw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-413699a.0_1563371822374_0.18533377508760607"},"_hasShrinkwrap":false},"0.4.1-0ac7dee.0":{"name":"graphql-toolkit","version":"0.4.1-0ac7dee.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0ac7deef2bfe01bb3b0f5e5c1e1c5e62bbbaa6e5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-0ac7dee.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-g2IqkjKg6+xRcaDwSuFIDI5ZGsY5pf/wG44WNFpK7v4QoY6IZ5FSKeopl+G7b+RQnuR3HqNOMgAuTERpfjxbBQ==","shasum":"6a323607795b35fe34dd176a61726dc854d620bb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-0ac7dee.0.tgz","fileCount":251,"unpackedSize":345053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL0XjCRA9TVsSAnZWagAArAMP/3qpKk0kDm+n5vBTb/UE\nsGn6l5iR40iaFDKI3XoEKmD8pjmIBH8UgyjferV2lAZ+bttg03BEkFhFOCEv\nNrFjvgF+tuOvSRE5bM3U8jBvA3wdwu2C1zir//2MgQ2emSO34WQC0bYTBROD\nXGnzO76e6VjsLPzGBd74n8aMz9XDg7lbwxkcupJ20EWtstqnA8I0gbFdKM5d\n3g+eHQBG0QdNya/vX54nQqhrtZnV2hgC6mj80FK7KJEUfVd7sPGC432DHaHS\naesX6BGMnh5vPVC3/l0OxtYFYn+Cr1un/Ct2mUKT+Q/BdfTC2tN1M4VmmScn\ngV0t29u91Mo/J2JfBTGpFe7aMrNIfl0rByZ7++cRY+zvupUrSA36im0Ubg05\nf3Ny4+x5F3byz/H0Rj5B4s641z31y1yggzMO74dRYUxmAulRBHAFDQvp1IHZ\ndnIG6ioKl2uwrG6amrGjjzo3jgRvl79P5QAfi4lrspMuHWyTGEIA5uJBfxWz\nNUVmk+CL4I5y/u9oFheVsyBG6dy2j8Ie6NYqcWHZNRg/H8tyZ+CUcuVFfmyY\nT8UXZT1jVVGPcmS6sUAi8202HsL55Z3gUjsLACiG3dU26ccbxpSleIFfNf1H\n97WdqQ/FhFFZY54xxd+mtz1WBg8Z+JvXzqA/DXJMlV5MqlhmH6hth43zNYvf\nspzr\r\n=icoS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpZTM+OBGShF22vWm91NUjDKWGeFpp5gv7BYeFmrB6RQIhANZxJcGukxhH+UDBU0asmicgNvjq0rPVH/ccDdYTzMTb"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-0ac7dee.0_1563379170789_0.9820754247816714"},"_hasShrinkwrap":false},"0.4.1-b19e420.0":{"name":"graphql-toolkit","version":"0.4.1-b19e420.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b19e420393945b72a527ff800af92e038eb07a3c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-b19e420.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-TRFjS9G3ww9wo+N1k0rjeImpSASsbLQBh9e/k+wSq/5/xm+mrC2dpiPmC0vWizDQpPD//AstcwXoWs89KKs1yw==","shasum":"8e0f94dbe78ffd6064f6568aeef960d6d1b0412a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-b19e420.0.tgz","fileCount":251,"unpackedSize":345053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL0YfCRA9TVsSAnZWagAArNEP/2R/sE1yCiVFeCD+mkDQ\nJ9Jznv8Mcxm2lkUQWe4YE+slSb4c5XKRdZPevNqXuic5Y2i+7LfdWNqf4Uab\nEg5VnPSiHrM2H18qKpr4hwFTXOQ9LcMM0INXbkNnBOt8F/oLut7X5UVIYBKD\n4Rji3s8U03eXyGg8A8BVI8H2fqTKtNJZ3x+cCkdAJw2GlvlIQW+Os1QnAaXs\nu0yBjZhAwG0k5ejRACF2/dVlCEKh5vGTnV/vKtX+pS89fh4DPOTfevNLmD2o\n0inadng9aI/BEdlu1XlWvH9PzJUIJt7QPCHx0jYLo2O3ITI1/15sPb/35vLS\nDGTq6GzEoiCF1cLsqoUn6eWR9RnjZe35gV3UHGTIoScCqu2PZhqkWUnCpsn6\nMmFzXJ2bx+3mzrAyymTy9DVHmEn+34JnkECHM7fSb7lx4kCA6B3NR15fLdZb\nZywiRcgppupKxwU+FHn0RKHiMyBEOCjebO29dGTkD7qYBeRgTT9TEygIZmJ8\n1yQVdaIVCubj6C1R8T88qn/zjQRTV7yBCNCbyL0Q/U8GwX6gi74i1NxaKhjf\nTLBekgK3E/vZQODe2bn7HYldWfN2HRWBoFBfMcMbjwzg0/c10Iv299L0d6z0\nTsq+ibUKNf1Y30Q0AbihkbxdSCnr4Hq3plJoPQNt2Jh/OegZvqxVTZSq/935\nitVA\r\n=c/fD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnNak4wtx2nPS7ppvbPHM0ucclyunrj//SVKEFjdN+VQIhAOX/R7GGkIBDQBm2E+VLBChKl7Dzj8LLHK7QchSLdou0"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-b19e420.0_1563379231171_0.16295766144125756"},"_hasShrinkwrap":false},"0.4.1-968b703.0":{"name":"graphql-toolkit","version":"0.4.1-968b703.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"968b70385f641a706bd5d9facb6ca2fc9d122d2e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-968b703.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ELf9sGp5UdiYmxQ0e7pFkB/keP8YQ8ccTh+h+R19iEVgT2Bjch+cT6OYJNNgKmtYae8g78hvJWugxfgMVYcvow==","shasum":"f1da42ec04fbee82c238323fd9652ec9b495cefe","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-968b703.0.tgz","fileCount":251,"unpackedSize":345053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL0pxCRA9TVsSAnZWagAA0V4P/iGps+waXaN8ocfMZMDM\nsXs4ksh1KauvhRWVOzQClsWkGoBvt8f/gLgiDSaa19RLrklTj6F5t6CW0FxG\nFW4jYhE20NHgHS+MqBa3okRAHaUY8WDcNrWOQM7GflbvQ2u78CTUFjPM0eKa\nbjbU32mCf4sCMZQIeLzEY4HFIuruCmgUzGmnnwCx+dMxuq1Xr2UUho1YZfon\ne9SLZkZey3vid1pOLVlZ8fFLBglY/ATTJlg268YLvUEKiUs2OdBgLOd0qO7r\nXGWEXwarMuurWQLiAm1azvTGluuBJFoPCWaqNd5bw7buYdtp1Ucq02LGh5u6\n5x9yAEpIyA+Ak3ze6BWfG1CR1rYLFD4BZxxzJV8m2K8F3ONhhXjub5DiU+hP\nqPsPseobuO6V0G6tDX0awd6EdVwm0D2NS7yzo8gSsr/Xm5BSZBEmv2b3UaQI\nRA//NngMKXfL0Z9gx84CKfLjeiIQXFKr73fqhzPRk70hewpBo68vmh6iC+5F\nhfiUWEdt0TGYH9p3rm/vgoVGAmJBwANYwbWQ5LsObHj+vOND/KbZ7OFolvJk\ngN4cKZPv2746q5loH6goEPS0axSNjxGhGsBljbGT/KJj2kBgeINgS2KTJGhT\nqd17V1ULmLi1iRdzDMvGmQN0bH9s+yNKMlMVqjMrGcbSl67Jz/eGNn/B6OwF\nTvpv\r\n=GyqG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhx02GqbhGHTwZ069V/AI8cBHJ43UUaxBRenr2tkGh1AIgCf2k7/fqxKbsnV7wCfHB+CdUmsW/4vICoc+gGAJd98Q="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-968b703.0_1563380336685_0.4206339602023834"},"_hasShrinkwrap":false},"0.4.1-cd1d30e.0":{"name":"graphql-toolkit","version":"0.4.1-cd1d30e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"cd1d30e86800e712dbd6380b5231c553590009a5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-cd1d30e.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-mqiYbkw65R7e+wfqNPaxlDVrr/dO+gJ3o8jmGdVpsfnacuv01qUKWuSyJyDhhivvsNQwsko7oq5gasXLTVypRQ==","shasum":"ea4c8a87e8f4fdd31076c738baed1064b0b49cce","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-cd1d30e.0.tgz","fileCount":251,"unpackedSize":345053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL2unCRA9TVsSAnZWagAAmVoP/iuNBhNXg6gOr+BvRg5y\nWkGPSs3S8NvJz4yDvvvaqqKy93qEJr/2jBPZirpbgWb3OoaI3j2Ws4EeeDkn\n0fej/gMBJFmwe+Lq4iBV74/Vgh8Sq1aOPVyA4C7dWgRqC5ke4jC+TcCr6N6w\n9r9twcUqRdcDW4h7qeC3IaokScQ5BV0c9abmsluF0cTR64+viiImOzv3f72E\nXaPlXC+wsbu9454Fg68edBD2TUG6IZUvSOtS2Pku4t46Fl+rsZNhI3UQ0o5i\nvQZbFcdIixs9/pfoh8UPNyFyvgXOyp+h7ba9TjP0Bbm0rfCvWvKsm2KoWwkY\nnjVMKz7mQCaL117Ge1B33mvqkKIho0sOYzjBUCVQOJ0BpzMK47+7xMKzLvWI\nZQ8z4O+u09vRkPwgUAAtbLTNA60JM4yz8p50I2yxFFhgW0kSFxAcr0jY4cb5\n5hiziLFHbiQ+UCoTGaOC0lZD9BwNFV+dWBC+xNJErRDNoig6R8ExnjOvANSH\nG+wyvi8rL6XqyWZ6ChUICfLeqsCBRwyx7Q996NY3afWtTFjxmSs8JjSYB339\n83zsw22ar5bT9qJ4I8wCuz28aEpi31JiEvtNGC+t+DahPqzvGl242laDS06R\nZPtsPYS3USaNxhCWmiCa0IQ6E4ryx8B/OgX/Jkl/CnZQIw4dNBcLPLr7i+/m\n+dPr\r\n=4qnz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDp8lwlKhrN/TKDQ399rW5vZfc422iQhYg8inaVwf9IsgIgVGXU9rPy9W1dCPaK0keTVS9LXAIY8BptSC6raBmeFBg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-cd1d30e.0_1563388839040_0.8561682999298075"},"_hasShrinkwrap":false},"0.4.1-e5572c7.0":{"name":"graphql-toolkit","version":"0.4.1-e5572c7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.12","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e5572c7c5796cf54e0b193328bd0302c1f0a9007","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-e5572c7.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-KY7QMFuqGaFQYhtHcyaMqxFQgBQdR7+EnrHXBEoyNaIbjAw0AVkA8+hfYdtFfHNCj6kt8f9IIsgMHUPhXATemw==","shasum":"10931e99c723f78c682d15a6ef2f8d41b0cfd79e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-e5572c7.0.tgz","fileCount":252,"unpackedSize":374863,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL/x3CRA9TVsSAnZWagAAYK8P/2HonnY7bH2sy8Ekfc9j\nKbyfV1Nt7BnkN2Gsl5LQr0Hhn0XOMN6WcTLPs6BUCmTY+PP/fBndyb57IDAZ\nB0cRwfW53F4+7aaW3IRHCuWZJpv80Ju7jPliQ2ToVAQReK3VsZaDZb31lWIk\nGGGUTE2x/PSS9CQg05sOiIqJcaF9JxiPAxJzZ4FXqpeSCLpVeJrX+hMfUFuU\nhSbr+VcVCTmFVPSBFAF8K/58btobwGnbeYqnEHq9kAfshtmNC6q75gNg4P+i\naO/aY3j7duIcyygiiUFc89pgxjtSY+YXuNcc5Za+1tN8NI472T36iTnZmNDK\n1hvlV5QezwU8eOnnx4LSC4SNV+qKY1KmymVLs7E6tja9Rf7NV29AlssBLO4Q\n9Qp/ZJ6T5WTmBqSXWbRcSH5Q5L8wnaw4q+uK+MDKVIWMqW+BCFcFpSNpf1HI\nt7RXiaWQcACwAwTFE6mFZErvuLGgeDkKk6HKkwNk9/2d8zBO5hkQGuv6TiDX\n2U/kE0u7zzX0JdJdXjLYlIAZwx2J/6sBTUs9tPtMn7ERYZH3hoPMEMM0Ojlq\nDWya8lWThp642HkkaAY3A/cimV22nDD1ftSjef4uIb+eg+VIlED+44Lsc75P\nF68lU//FEDBRbIW866MwVKJctdXHgFhQcLqKK1nWgnMvq2o3xkm8jdXDstxg\nXf78\r\n=exkz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGsmQ4tFl/O9pfs9OyV+qyM/k1iQaPZRHlly74p+eqqgAiEA6xDsfbvp9yDz9m1uk2WqLKtea/+bybNC47aRg2BdEgY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-e5572c7.0_1563425910335_0.6237738389429575"},"_hasShrinkwrap":false},"0.4.1-914161a.0":{"name":"graphql-toolkit","version":"0.4.1-914161a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"914161a8985904e8be1cb810816f92780744324c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-914161a.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-EsPB899igW3x1iFwJB/NqfjYPoV6eBp6E6Gotq2HdtwKp/vRSlmBVBWH68z123fbwJCYxMMLCoTwXkKPqB3NLA==","shasum":"c4c07f6dab0e173a27d6d7c63c7097025b774925","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-914161a.0.tgz","fileCount":252,"unpackedSize":374832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMBd8CRA9TVsSAnZWagAA/A0P/AvbPMYFxbgQ1+jKs0vg\nXf7rQ0gLp+xYGrREfD2GgicJ22/ylNHBSi8UZzM/atgKrc/PXuDJ8ojSRzMh\nEdYYsC6h83Aa8lhM0G3w7q82Nv5mUjZzC//P9wlQSN7BWG+C005zApH76kVs\n7o1EH7WD8ap8YpGdimx+n78lZScMTDNHKBF+teKRHqK8tdnu/96tGBBd/z8Z\nKZolM8gkcRfadXkUYXjICD8qu0tZLaOAOdKEfxlpdEPHucMMaOnqMyePsqgK\nxL9E9a2+0H9fpZ/zA6j+J/CTKu0Yq322Ms4aOP+VIdKx/8GVF0/SWRU17rc/\n6X43G6Co0D8pBvZS+c0qgeZlIXIhIfEcUcBO1GiOUw6nh+XzcLTPxpQ+a08Q\nfJSsbicWG2Y2RV1Dp/CNjg+PulKVTgE8uGp3hrhNrWm2sc+HekMBPrrhTqLi\nY5NyfqneWc2OAhUw+HmeIjeZ11n74n3beCKYNI43kZvwNWoR4RrMqhVfS0co\nNTaoq54C9KAHgQyESgL7dwoFB3h/8tpBs1PGf+E019UyoXWdWnieepj253nb\nJ8OdjJt2aAzHdn62sjdAgrxu0FBX7leyOOC5Dg71aSuhP7QVyYFqrCmwQPG2\n0WFngdG4gWX1Ukm8Rlbtm3EHYAHmSgAcYrRAyoo3WTT7LFMW0UumSHECpBaI\n4rcT\r\n=d1Qe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcDXnoOwgoqIyqJ2TyRGWifhluiUqnz/PaPSRSjkxdSwIhANRj4I5Xv+GX20AsFvQXUUmmzHuM+xm5PntlUkXRnJG+"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-914161a.0_1563432827990_0.0746060413179106"},"_hasShrinkwrap":false},"0.4.1-80adf6b.0":{"name":"graphql-toolkit","version":"0.4.1-80adf6b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"80adf6bfbe9bae3708667a21e564c63b962f852d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-80adf6b.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-oIihJhX+E6wse3b5pt17YvzV01YCmY6bjtCg6G9TqS4J8wxLQaFD3lQNqyMUNGmRGj9Yr7xhRR5q2/51L4KUdg==","shasum":"7de18e787e4aaa2eb338b72bba52e9706314d26d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-80adf6b.0.tgz","fileCount":252,"unpackedSize":374668,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMFMYCRA9TVsSAnZWagAA0kgP/0BakMR9oaJ5MjEc+z5A\n8FWFXLq8wPWcbRTqzP5BjyDXt+06HP7DNjEPTCxRUVo06XfPDe+jZ+6AtiQu\nP9+UcqOMwFLboj3b+fJiPyehqdmtZAKY1c+2MBQfX6/ga5Xsxv/jwx40fiP5\nHvQei2CcBLjFWMsDwvCptCHeRoPa800k2AgaD3wPNrBmy3Vn872Y7wJS6E1M\nJA0JJulhmdb32RmuBZaTKFRVYnH/mxglr2eYrqPWoOmxflI4m2IfM/8QYPf9\nR9O8ugG7CQpPWR/vPp/QjRpcXobSzWgoBqlODiSWdAOaSS8yrByrQGHw3CSF\nRWD6Q5vfbMcwBgtSC6YtFqjGs0DEYQxwiEgEGLyr/iJ+M7CE693k0HUEhRbW\ndpIi0ctRCsScHTOHBNqhDZSb/F3pT/6BofF73/PXOgedd/1J9hzP5f1Kgr9R\nblcJ1gCo066QKYHrMADG2yQcihUVrAOtpSZUiGIyabc5uNi8Eq392/+32nWQ\nAjHDjUy8zn4L4JeSPWE9BKtXUwrlUvXNPZ1ExOlWVcVAhMaQdbhxLaH3tqI5\nvod0tlZGcr6huXTNasnRVXw8TlsYHIK/3gG9JC8bFK6YClZMNs/P0OtX01qo\ngl/uwNrTKI1kb6yUIGhCiKfffLwMkkYlQyNn7DPRgLsOhNK8ipD7t8nlsH+D\nXGr3\r\n=dozd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICToDf1gx3TCHYkj3RwPyGQRFOndJxyuzEzaB0tkpzMSAiBmODZz1sZ0sJDhg/COTaw1UFcN9zwFzY7MTH/3bP/Iew=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-80adf6b.0_1563448087803_0.733029736109094"},"_hasShrinkwrap":false},"0.4.1-e2eccef.0":{"name":"graphql-toolkit","version":"0.4.1-e2eccef.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e2eccef7fe4238263d4df77ff67adb8a89868e4a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-e2eccef.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Vgy3bk3iHvDQN5VixnLrzI6fxUsKRw5z1YF3xrBkeNLe9EC/AI8c2VinPPO/vdBiZ/OqXYT5ErmY5MNmp2OEag==","shasum":"e584b6f4d7e42129bda9f39aee3b5c6b41b6524b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-e2eccef.0.tgz","fileCount":252,"unpackedSize":375705,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMIz6CRA9TVsSAnZWagAAIv4P/1tKXT1k62uzsNAmdkCD\ndbGiKF3Pm0Lo5dC2h9jEKCs6PTIy7JkeDE3ejbdHSKMtgaMmCioNH39FfeBq\nSi20SFT9/pf1BOsxsAA6N3gMUSQ/HvrRuxtYCrf1L9u2XJLQyOpvH4x5l8Gq\n1YLKNtVT0MYTIOBe2xpchyy4BjOjL8YwJsPV4oQXG5Ygf7KU1qTls+xIWRo4\nJZlWzvZkk0L8hMsGnae5GucaTv0anfv3a//HXA9XWtiNPFzQw/vS5sjwKidI\nt26sEQe/kyhd1aUr/bJnRuv/HAvDwt3Dc9vzquWHmMpxrGakBLC8lDl4koP7\nw5aBvRDDUwETzW5JDUOgNwIf8tcSnwcKmdswFA+SsRHjmyaqrdW6hEn3u2OF\nKuldjlKhopgCjn8gLdBw7IOEWGLSi6lk7tGzfVBV8mzXm8C1iZIB2tPP58Fw\nNweqJ3VEOHGi1EFQBpcaRL8yaGz22Ic2+7ZsiZnYshYLjuRvL5jKbAibSnZs\nxLJ7Z1Ot7EHaTkT3q/nQLAX2l+WRn4j60PmdN7s8kPddAOLvrHdtwRKwjiQ3\n49oNU6zJStf0VUZ/IUMO70eVhoo/o7bkpWOqgykZnKfal6YA+232YQ33mEhB\nUPLDIPZBznEvNwDd2wN4BfzjY5VKJtrwPiEaXMpLxKJmLXAUxGNRbG7VJD8T\nF1UR\r\n=hynm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClqfQvPWOGnB/22bVMs10oqZnEeiymEcCXHLU0JvtsWAIhALAtE2D3ov4K8/frCbBhQ5XW7GIAPAuiQ9KhoOQENsdy"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-e2eccef.0_1563462905869_0.5553865108516387"},"_hasShrinkwrap":false},"0.4.1-a01dfa4.0":{"name":"graphql-toolkit","version":"0.4.1-a01dfa4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a01dfa458b9f2b44e660f07cbed12b0947bc4443","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-a01dfa4.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-zHVuM+QlnaUpf/agQzMg633ShwDrW1S7cxS2XiTULkSPUqw1b7Vl4ObQ2cf6NXawJz+7Uuph2P8LQprfqiusTQ==","shasum":"de5644df5d41f13a73fe5c088d63bbe6352d9175","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-a01dfa4.0.tgz","fileCount":252,"unpackedSize":374826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMSvvCRA9TVsSAnZWagAAypQP+wfSzTt1JLtsbWvnSgj/\n2pu8svSNRaZ+KSGopYSinGjMSMejCDWtsx2Jq83BpcwRviYmXKGoMKyZ8HyF\ni/HclZV9X1J5GnD5KWEQWQNEP7HTKpfGX9X/2rp9K4KTzF0QCEQpaftJd+Vc\nPOk/D+VeGa3+Bl6CNviTFmw1iiS7Cz4KzMPzAbTuyTmxy4GbL0Ua9SK3LOvL\nQirkvEgnDchz8y02XuW2SdKmn6TwjH7N4BZbe9weDgnqf6sfxg6PmQpF7J3F\nvwMm8/WiwCBlgFf3Peqen9ESm82E9T2GuRTjIB/m26U3ooG2JanZyR2NLfXo\nBQUzA4qS0ZgYUo0IULfMyIqRhsOFD/MXwYlEuCCaXi9T3bxjRybhh9kbYw7W\nZS+xoZkPLc2Cx16aDcUUVz3dGxHFnWbcfM83fJ/4NNRjioWlunML4NrNG5v/\np7yB1W+KuaS9ZVCykucHAD9XSprwRN5AswTQOq9+zEGpGwHju51SIn3Du/fT\nhfGjn0VuW86N0n5QW+ZrsaXsRkJHLnwtN2ABCBpi4lXHd/CnQIZ7WjqCGzXr\nH+XmMqICMULqtACRrT2PfAKHRRpO6TpugeoE3UpKwiovxr2F7ByrNHnzDtdS\nmyDDDETU3WaMl2bKa/9ACC/AXrqYosmjUoJOIYlExmM1uNbkUCwMmeWrLahZ\nkncw\r\n=yTrO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2LNiX23/bcxWi8cr9KOMkqjfhFAD7iDmTEBVCF1lq1gIhAOZk0nLyv1/gZcqWTvAjmOuVUGe1gmDGckyFUyVWet3f"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-a01dfa4.0_1563503598142_0.1529729958103785"},"_hasShrinkwrap":false},"0.4.1-193783a.0":{"name":"graphql-toolkit","version":"0.4.1-193783a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"193783afcb1de4e780a0f410790d15ad849317b3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-193783a.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-nicHUbyt5xeJqFBH4zPS4tjHfOh+/lRMx4DF1pIKW6xPmxiFLIJ6AQW/w3hbEYiYbj1Fjs7X2UZI8ScISmViPw==","shasum":"b1408b70ec1f32c5ab36f14b91bf3b119b0788d0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-193783a.0.tgz","fileCount":252,"unpackedSize":374876,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdMYB1CRA9TVsSAnZWagAA76cP/jzfTwSOTN1iWCyd9VqJ\nsyLZl90iNdIOTNI+kxO15Qr/K9dFuHh+ckYT3uMFWJ7SXmkWXVe1d+j7I0XH\n47GAJ+6+uiFg7CDPB04OPlOdzWBQ1MNf+c7/5UkI5z0wpSJ/oFi5Pahl/Qq+\ne35DN5/VaX/df/Sn44uqmcDIZOBXb57wAzqcEqjyVBICyQBe+1Hw0t0JHhD2\nhQ7ahwbOsUsE1Sg+gafu+xWuGCeyuk+UiGpM7H6oB+uHKJA2CsqLuQwn4u5G\n+cfmAEFGc/kZvahYBxIld1JtsQCX2YTiBxEFHAAzbNf6GoDJJjjGm3WfZ9tR\nA6WZOBkRMFA4sQKZ7VTCxp7DnLwjbnFLRRECfPANiUkX/ffiNvvJsEUISLdL\nTCOFAP+3nhZuxoPaRPnCOEQqRomAQlINYUNL2H4lpyCIE57HygsSkwiTgm1l\nWXm0BO9r+QdwNT771FaH2w0lEmt13CU500Z+kIS/6cp/rVb6/zpq4rJnnm9x\nTIftX5gk0qV/B3gSy13N5BNpZGWI+EIGF0wvQJRLr2HP0dmEu2IMUgW0ZVWY\nqxYg0uNWKn2DxCpUtXelPx+1Pf0bRrdXHjIq+OSrSh9O/T9z/wp9BQogTAwg\nVsjyn2wBQGZ/oXrEFTzsY5YwJSPoY0Z9kLTfzbuX7WdSKzfc4Kj7znFO78Nz\nFnpI\r\n=vsDa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsIKsnaKQMmzaRhYmPXoVsCa2kbfIeeJFOeAWmE+I9vAIgauPXGSh8n+VrEIRyIxBRFPtWB+i9UWZeILsyJWgZ338="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-193783a.0_1563525236774_0.9158731436864183"},"_hasShrinkwrap":false},"0.4.1-514527b.0":{"name":"graphql-toolkit","version":"0.4.1-514527b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"514527b1cd434341e2ef59ba4921f055052dd934","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-514527b.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-CetaVLZ26s5f3XV7BUE5Kzq8qGM+Z2Lw/+Rf31LNbo14RIX//t9xvGHUPxsL6QJtji6sQn4KCTyBR25yhULkUQ==","shasum":"d0de036116e619989dca389b0a2d049eb0b7fd52","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-514527b.0.tgz","fileCount":252,"unpackedSize":377283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNG23CRA9TVsSAnZWagAAZAUP/iApwqgQFP8Ckll1zz1u\nV5pFycwjCKFCFabkidJHgfUWlst2QOdDjKnEUR/EL5CQAnoSSiPScFrV0zvp\nNpxpDyZqWlk3Fp+nmywrGWJZ+Nr2Yh+EjmhH2YKJ+WVQ0RgQzJT7pNTyaWuU\nYx8O17T8UsOLyzYut9Q5PYgNAZPnzRKpKpLdMrkmZNZgjE+TWQzhj4vpjU8m\naHRB+QCqAnNxUjC8xhowloFn2gIiu1CGSfTdWXBXiTUzIbu8Hai+Irq3Pda4\nqixVT0Qf6HlvdzM8Pn8P4zm4JmSbLcf/pTtG6WTjVdF76O+imhZMcBBGTWhG\nHYMX43hvJyvcyz3q0uFzjNTJX+ze4pW0q/JtwJxRIdaoJ46rvj08X2nWsn++\nJFrL0AhKxfSq2/RjrSvR/pUAA42GOkXhuE6OojMP7Lm44scWV1kC+K6wsL3A\nAQGc0NQvBuVCqSjBPJsP7BHIUiVkUW1BEBCxrre5T8F3yA0Og432sv0Y2oVB\nqfXyUgQIuQ93vQ7Bd84VDpCI43UEkDW1Bb2jma2nRrwXiI/4ASh2zdZoDldc\nv5Y2eq8oaxSb1+xez6NmQewK/FdENAZv66Of6jGgGtwD5LBAvh1WCq1w74P7\nsKe9atAhCV+8vDT7pEmkyWtOBibwYaFR3MZZyKq0FbSqdXh9/IfKCcwC17LA\nDFDL\r\n=VBvp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAumIT7SNs/F9qeuLVcumm2Yq9OJXELo5JF38+0WCXFDAiEAq6obpsP/ewY3ETwi/tx+5Y8k5MLyIgHYzB5W5lUgoJ0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-514527b.0_1563717046923_0.8656887308719594"},"_hasShrinkwrap":false},"0.4.1-4ef69f3.0":{"name":"graphql-toolkit","version":"0.4.1-4ef69f3.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4ef69f37a078421d406da55cd0de246fd1b45c43","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-4ef69f3.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-eXy5lfhNsoJ+ibJBgzpzU8D4Lxzl5/ykFvCsrJ7Zeop82ZFim+tVupjFfHJ9dosgEsmeqki7gPgxSw5jNAYG1A==","shasum":"e4f1df7b60daa91d6e92706c51dddaadbb5da9f6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-4ef69f3.0.tgz","fileCount":252,"unpackedSize":378852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNG9cCRA9TVsSAnZWagAA0bkP/0q/8pP0HUq52njuWhKJ\nqrbuhCZRgK4o+zds3537m0sVAUTJylAxBzbpGpQMXujOMl9Fg5Yz9QZHZpW8\nSCliNo7Rwye7lB/kO8jI0uWVY1lv16Pmq8j26A3BazhRZhKJu3SZm19PJbUQ\nlFHsksFJiBSRw92izaNTfMWCg/3ay6L7f1tRoxdDF+jl+r57ZnueaEW6knB0\nTBmhmWNz+a13n8a47b0LYX1pNPNugykeTl4p8QAzQU0bjs1Wou3n/f6f/x2D\n6VdBZy3yBgqVEY8l+OxoaIVOLxbnGDWjnw6TRdDqxp3zrPG+ec3Lg8uGszYY\nPV7rq9vqvX0aQ3uiNWpyA6a8vwKDjrSSjlYyFrETnSLXZxM9DgDOTLKD/AeN\nU7AUWRyiPFzjEsEjajqINfcSbv8RtcgS8Ufa5LBIjzZ7sW9VTsnoLR2RVUra\nUl12p3tDSoYBxPJUE//34z6ec799+fB1iyRtNsBmNLPa/X1WhjsjJx8ox4so\nspOZGDvEODTywzkuixzSSYnmNaYl5mr8EFwpZJxoTg75WhXLKmbT77GQPBRv\nF7XdPeulTVE147Fa7xGRO6FtMdBu/sS1+QhYABaNXQQWtP62k6+bd2xA1ENX\nAhml0Hd/sP7SQ23S/oKC+ruXVt7FLHwQIV5A2HNV/ky3OMXzZ5rKuDeS6o1c\nyVKL\r\n=6VdB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2IgJWexDBbQlvx1yzccHi1RW1kOMdRmE6kw5/X7aFMAIhAJjKcZioLpPKcq+VARlyTIgRE6YF8El4YsWN8SXgrnFk"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-4ef69f3.0_1563717467291_0.3406235361318155"},"_hasShrinkwrap":false},"0.4.1-5e4285b.0":{"name":"graphql-toolkit","version":"0.4.1-5e4285b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5e4285b95a4b66a0c8483a10b002382bc0b975b2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-5e4285b.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-X5Ry13mypLDQxlOGZ5mZUCpLIzV3Cek/setC5RZRMZtDYBRaGrjOzzD9FAOZhN0lE3s4RMio3e03d4UjE8UwGg==","shasum":"bb315240492aef8a622543aea656a16ca0b129cf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-5e4285b.0.tgz","fileCount":252,"unpackedSize":382465,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNHGaCRA9TVsSAnZWagAAGCsP/14Os8ASQgDvdG+9fmCe\nT3siSq0FGAcysKEAwnFVHVRUwMKnOrezijLPLzO28irdRcdV+If4CP1+zLat\noM0pVumC8m05dRBNGUFQ78/6Hg7BXqmxHloEfGaWpw7/wldE2jaccpif3f27\nlVTINf4WrmT93h5uL4u9kg6ADvKvlsZySL08pw088VJosJBL+jJtJV9+m7JN\n47tIUXLMWMMdAdmmF2tQ7HKEfonEpIIUy7RrOszvllwe0JF1ajxluK+RXBQV\n0ADrNh0VoJ7vSPoUxBzWfVncASQ76hK/79m6Sp3tx3AFmnGSpyzEmqbH54jj\nYA4+pdCCwp25hdsr9HQnZpD0rsBbftFScDUA94tjYUt0a3R2KjHFuz0oiChV\n+uOThrPkBQOZPtr19yHh8UZRh8pzgPoIy9MKrOnVSowhzim7rXiY5wlHhPoW\nAG1LVkWg00R8Sg3LjwrLacixaBNFDm1k8GZyohuQPqGMb162ke1ZCicwDxxc\nXmg+J59VCAmIwxFbZ9+yTkz9L88H2W5ZhhelbjFktOwU9X1WROGpmI9LJ+15\nTQnkq7dSoBj/fQAetPGx9NeIijASAXTefMsTOwtv7tlMWYMvNL39QYJIJk96\nOmlW5MOUV7muR37UGG92NciyNAbSzn2COUr094wpS8SxItbyhyi44Aj7UVzS\n24Cy\r\n=+YfK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICaDVDVPGGymuoISekVrSmyAZydmaMSnwT6z+BYVi9bWAiApH5a2CcjmXNtccQ1TDWseQY0GC27atHTBW+bRoLcWOQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-5e4285b.0_1563718041182_0.6798500864856798"},"_hasShrinkwrap":false},"0.4.1-31c2aee.0":{"name":"graphql-toolkit","version":"0.4.1-31c2aee.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"31c2aee614e069cb67e5a0f11ea8b51321f92658","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-31c2aee.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-drJyMerj3uKreXlMt1pPf5CVD07+fui3DJZJ9ehUYT6WjPhYVTZQl2R9R6SyGxotKdVA7GZkzzPGiF5MeKQI/Q==","shasum":"7c3df0df4da4d8ee08babf83c1e179dbe1117ff7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-31c2aee.0.tgz","fileCount":252,"unpackedSize":379308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNIB6CRA9TVsSAnZWagAARLkP/1Yu4fiN0YiptH55qHdb\n/KcWuZG/js9CPJTFMw+PLFDR0PEC1W/e0i2+M4CHNH7UXO7+5f5NDE1wt0HY\n9Nk81UW3CIUf0gv1LaLeidlMnvNn7843CzAMAYvgncLg9SkT04HQTwWZFZYB\nPOFsjokv9xsucvG67aA1bfuwSLpwVz5ylIbs8DnYsOg/qcPUIqIPx+vNVFye\nyFQhOSN29Bc0iAnc1j5iqr1maTXkdJUlWKdWyhAYCzUQ0Nchicgt+YZyBf6W\nRXtqxT3184rMHwE9sMO9JlweSoh3Am0sBlFCjsCxeJiopa3bcEAGnTUTpeSn\nW+1ceA4v2vIPsUlsEypk08d35heRVNu4P8e1bpSHr3j1pDpXpecEyW+bAe/n\nN1KYMd7S5EL9E00dh6o5dHKlXTxtsG/vXmL/NqAN9PUHSaT/oM3c1VnXsiZY\nSrdUdepe/ZAt4Qj+R/omUEk19ATS4IdAeJWlWJm+pNc1wcnauP396WyWhmdF\n4XrXCppVG8+cmFIdG1h9oyJezWK7bf36gfrTQmvMlr/ZQzS8hleyFL7EVR1O\nGeYblt5387b0ZuMFR4D0wlgJBiKcuEk1Edmg2TszDRY2oPXh7VurPJi9COI/\nWHF/RjAANtPTDGan2ECymaMqzvABKqhZ5Wk2sJ5JHNodtjav0Tzy4x2fWpcd\nxVfe\r\n=K/AX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnUYsEq1tBFce6aD+Q2klbzMwgmbgZG0y8x5f+b0AuRAIhAKOHj/LDOnG1S1SmOifxQa54NqBmp6Jh7R8/gHaV55Qv"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-31c2aee.0_1563721849998_0.1498084629441987"},"_hasShrinkwrap":false},"0.4.1-bd1107b.0":{"name":"graphql-toolkit","version":"0.4.1-bd1107b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"bd1107b4da5e8588843a15678e3791f59f791759","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-bd1107b.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-8xbmirrYa9E5rGMqTXEQXXZAvYTuvxcd2dT+fOhKQmCdpQGDPuSygDEpiheCIRJE3rpPrVd6msKgp9LnLRL2hg==","shasum":"2ace3273a9b83baa41b84264529c4021cdceac8a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-bd1107b.0.tgz","fileCount":252,"unpackedSize":379659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNIFlCRA9TVsSAnZWagAAXO0P/i3C+I5up83BIevG60k7\no4zcuhJgJ6lYRbAvwbXC3mjqL+qYLPgiCC4v9aHm8TQFL+ZSipq1bSQ+X9M8\nI3ub5tz4CNrlS5kI0px78ehFfIA4zVh3ojkkq/M8VO4uyjvOoZpu0S2gAfT9\n9K2zPV/TUMHLxQU88NW6tiWGB//D0lf826y7iqOZq+7OlrbiRFdpICP8pMI6\np8qOon2mLFPyX5XjZnlwSiTXBOgi8Cgq0FfeEq758iAF1tJgCcjGIiKw7juI\nnl7muXmp1MHXLjNronBSa/8baQrCTdfm+vFlZyo4eqfa+eAmvp44q43ywDLj\n+UNXw9alsagemMpmvoASjKElXwyZoOQvPhCifTmc4AWmy+t2UUQn62hC4vva\ngG4hdjXyMQku7YQ9ERt1qyGabYSaXzEkZwrDKkf4TsMTurSVUzIhHCeyRszA\nKVXb5sQqQp6dOO9W4RH28S4gFR+csHnnFZmMybkIBOJlbkWBE1hryhBRmRTS\nDLOyBsVJk832Vx2cx37W7F++U+PHx5NSLtOeRn5Aj2Y4IJeUm78JMiOa51Ri\nW5fvlU/t5mutPlZt6EyKuzWbADBvCkVzi1DIYsxOjWxhUiTj6aY1lGjlssyc\n7nLbtwMtyBVnK36BQV92i8RlibA0rkiy3uSKUw5FRkPBDMYQ8FlUi4KWxdN3\nSBsR\r\n=wG47\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH+bwrOkX3n2p/dY6vS0Z8rTPjml5BUwBO/ianvL9skhAiEA3q+L7VA6yCH9SOjvdevDKXe5zaJTdnRK0RlCReDVVfo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-bd1107b.0_1563722084516_0.8375436102229534"},"_hasShrinkwrap":false},"0.4.1-ba8acce.0":{"name":"graphql-toolkit","version":"0.4.1-ba8acce.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ba8acce54d83a46c6e3778dab74056a02f60f5ae","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-ba8acce.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-wEtkZLPIhkZoBke+PyAqM2jnQS2aCp5nVZ7VKLTfo04wDlgYheRHn1MrgETpT3eM+nqlNsU36Uosz2lHJmHo5A==","shasum":"f1a26c4e62d2620478e07063a3d73ae696e27d04","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-ba8acce.0.tgz","fileCount":252,"unpackedSize":379691,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNIHFCRA9TVsSAnZWagAA/xsQAKG3onhFwpOqYavGWtku\ndVSz6EFbC3mT0BzlO9XrknTx1w/q5FcFPKBPVH4zmmwXZPLrRWSNp04cZ/ey\noFF8vVj+TdV9JfOUUD284en9/iGZ68s0VNOR9WbmHxs9jN9dYPZNV1SKTS7F\nBImPWtg/Hzs0N+3KZRebBtXUayhAniQ+lCvs7JT5ksoUWIZBxs2OJlt4AJ9v\nWUdFNnIdiyoh/Nb+65KM4kP0DEGdLSa7O0ro1sUvdZstnCFdJCsO7M16ZEVe\nf/cEB34xWEvjWhWdbOrGngx76Y2jEanckZhZfKQdanUJG7lr4eKXitQJkRMp\n6005V8AZNTTO2gqhs0JhHvqmkcyqfqs4rDKuLipZS1g5gZgh+uH7CjGjRy2E\n4QBFZEiP0ShIA6kY1lIqiQOU4yNnE0Vg4jPRjpEZCS+PgBFRItG/xn13nL5z\noHrlnjkwrkqDXTySYW1xge0mtmSHQzIt4yx/HvymRCFIqemtVXYdzItbMeTX\nfPXSpVHY58pEtyUim0+tKN8o8Dqo3Y0bHj2AR9jqk2IgNvFb4LxwDS6MHvcw\nCbdAQ1s+KeSQNz4BSWiX9YMfYiyaQio1eBVRtPezmVqKCvla5wAkCOkZQw2X\nOi2DAK4TwnfHBHgIj6kJTS/82pTTRYEmddRTKXfaRYvihtdAKJ0BbVd7PmaS\n7WAX\r\n=QeeT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG7pxaD6t6OW0JZtOQ9WQUYcV3iR+6ltbdRw89gN9nsNAiBKKzKNfoxT8nhlEDpGHcSukoRPRKLADgrOJZbZOJz4TA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-ba8acce.0_1563722180757_0.6551527060288276"},"_hasShrinkwrap":false},"0.4.1-a1f54bc.0":{"name":"graphql-toolkit","version":"0.4.1-a1f54bc.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a1f54bc07360bd9818d39a211e867851809fde7a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-a1f54bc.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-vhI8UyP+VbqcWfflLK0NOXtweKq9F68VdhHlTA9/DBtbGNd49JAcOIAoQtUis6nP0yeTQOq5N9VIGoZyUEGugg==","shasum":"7d1c756896b5f6d6e248ac9c57b3271c6b74699b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-a1f54bc.0.tgz","fileCount":252,"unpackedSize":379586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNIIICRA9TVsSAnZWagAAbmQP/2Dx+PaE2QFis1oeoUB8\nTc8URqTrQTmA2ckXFqIhzU5vYvNbHWcKtLAoaYc1Xynnzf+eTSWXOR9BYE9Y\nueHO93Bpx6RModEEC/9z29DQPsvLz6RXE1YPYOL65qXDxCHRjcUvoPIS8FyG\nBYd3/BEHAlOPWOnm6OG8/Efiy3FHmS4uwiuOVEvPDH/9d0t+r1NB8zXDuBQt\niNkNydGnMPMt6/eE+qBwK0xV8NqWjjUj4bxDfcICHvytTQgvYADXktV5moae\nXX0/hxqbAebBS0s1kfpEEbgOsUP7CI2KYjOsESP2GhgpYrqq+4CVTjzh8Tj9\nWsNMsC3U3NQ/uY8pi5Qgnt7kTwXSBHE8HjBes1m+O8PXeW85FExGiURMlPyw\nWYvSQBe6p2LaN8H5mTFj2uuu3jD5Nvp3kRuVYKNNEZ3PjaG25xDhvzjPbt6T\nYOT3808FxlkkwV/zhoF9vsSEKZ+VzOxXTInWexOnwf3mbc0UXcdfyUKxRoEh\nciz9LXjFxjunkgPnBCfbo82CnVhQMIhjlf2fjNaY0bS0wmU4+uUe8y+LN9Kk\n6aJjwOKVn+KeLWuXcNlrDofMIhczy9P7Uws+C1i+/fVg+GaKcKqKNGvZ6xO7\nPMr+o21ERqorPeafMv5YlU5Z3Kk+VwwCnocPf10oXGpOKxtOb92H7gSZTjjv\na6Jp\r\n=kQLO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyhwSPn6NAVwLAPoDwm2wQ3PhQXxWi2ULB8fnWMEAt+wIgd2XgAUv3fKdFGqMAqhkrchTMo8rOMr/KWQd5OIyC8gs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-a1f54bc.0_1563722248171_0.42001619655856914"},"_hasShrinkwrap":false},"0.4.1-f7dc8ec.0":{"name":"graphql-toolkit","version":"0.4.1-f7dc8ec.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f7dc8ec93a985ec49d1b149afb0c7a9a10e1ccac","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-f7dc8ec.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-XurZko+vOdoQdEVuKwdBixuZfgz3d0cff06DHcC+v/1HjNKuAAJVJHV9kN6FV0UmFTNfi9A1utV/H7wvg68lwA==","shasum":"bb7db0f0da55b6ff32f4156909c3894e48071413","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-f7dc8ec.0.tgz","fileCount":252,"unpackedSize":379773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNJJeCRA9TVsSAnZWagAA0UsP/2S2+pAxUu3W63YRHrPJ\nItFX6KUg++7yBmSHsj7jBGMbRDb8/AozMxzaqxcHAa9PpZ9qLHsnPZPamoAe\nZU4x+I7DKdSW9BKcWnS861HGFCjqd/5IypQu0c2Vtvhngy0VRyZYFI2LGfPN\nsHyVbaN1hf+YsL2prv5gSuX+u92eS+s0eNCkWBL69y6hAFFms++49myzANEM\nnJgmhZJ2PbuM9DY0pkef1lERkxs7Kr5Yk9IoP2m+Sxl44VmYAQqgLUZ6stxm\ny+rQlAUQNvGkq6I4fD6ck+B0RnXUripDQ8VqTOgiHjI0ZCrJEGFvYV5kkesT\niSfbd3GiknOFlNCdH5VAuxqs1C8EdUjED79j/Apjs5eX9u8rjB4jOR21C1C6\nd2x0IgE2KhKIxS0G87zaTVMqiX79JB7B3/n47LtRDBKP+BZMN+pm9lP59xXe\nkFMkKT0MeidHG01MREx2ZRhTLoI1rbHS/FddrBK99/DFyBMgfl2pSplh4UuZ\n2iYEZjULc43ztvI8Ydguu4kv/45MJLOZUh+83s43nFqHr16JoFM6zA6VvSEG\nWo90hHBJyUHtP0PS84NgnWMVSQJqJOiJNI9HkyfDiBdMFyNm7Zh9pcT21/UN\n35I3oyNpE8UX35EqHmvp7DVPcDmkEsCoOD0u0eF9WBl4eLN/BZIZqu/Zfv5K\nADiO\r\n=tIBx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID1gro8PucnaMYWfzBY9iGhepaFTFiCLz5QYcWfYxn1QAiBi2gGp+tGOXCbEWqgAKK78jC41l9sPQEm/ahs+OTIucQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-f7dc8ec.0_1563726429269_0.43676349515435864"},"_hasShrinkwrap":false},"0.4.1":{"name":"graphql-toolkit","version":"0.4.1","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git@github.com:dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"licenseText":"MIT License\n\nCopyright (c) 2019 Dotan Simha\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"graphql-toolkit@0.4.1","dist":{"shasum":"f5a9fa225b51168dd0d0558dc59e8fc3d379e9b1","integrity":"sha512-asTRlNn0381f6/wVp8F0X2vsz8GJnv4TX+KNHg1k8Ybe6Ii5HBreJTxBHJ7GXlNDhj5MGCNi09nt8Oe7Ategrg==","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1.tgz","fileCount":293,"unpackedSize":387228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNJSRCRA9TVsSAnZWagAAYTAP/0YkWPO/APPF8JTfCADx\n706fBxv39y+/+NmKklrThR4L704NimnYMuJV8q8T11/BEEsslWKu3rPB8Gpo\n+gsK5baHvcIGK7A7ixEpSwcHzC9xnMhHDJ14f6JFeJziL3RjccOEUBCE837B\nO4t4U0fCQ9pI8ss7xB/2zZaUQ5sOXmPudEypfpt5rwt+ocKDcVkm6v/8p2lQ\nXfIC0TApnBPQbXs7YV0AUEZVOLXrWcbkF91TiyY9NmUera1FQiWqzrhpAQ/U\nRI/E4I2yVqEYfHXJ1SgkvMLKazA1Cj5eFlcpmEGtE+2lkxs1WWG6/fDQJyXv\nBNQn5dRIt+ftdCjJW4tKndMwt8G/gpmipaG/BDoDWHZ+gciuNMwzGZ+MJ5TV\nSgc9sp6sqIOKB2x1JOFtDfiZ/dFrIx1GoHAv9CuDKFK+2f+NaXzAI1sZdVEP\njXIkYcNcb2MIt4LfS7K0w14yf5mlxnhkuyNUZBYAWkh5E1Pkk8qSAIeO2+jD\nJraqxAc/hslQnahXfilXa6D/u/4iIRoEGiktn6vjGCI2GT7h5sF8JGgtmCYm\nsmejQoiRUVudFJeBi890lp6tCZ9hmO4WklEoCPCLWv1NRHZLcZqr6rjdEimh\nr30UgkM3ykUCBhMYE1Xdk7r+ctWawR+1MqstDRuywvinDnaXvAL7bK8okahs\naPDv\r\n=8Ml7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE1a3OenuQsRsH3mGoHn3illX/BXSEeAGc7e+RqbwA4GAiAdCq1H2oisI89WQJtGF5lxu19ipCzYKuqJ1LWEdjPnnA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1_1563726993115_0.0017455373860473244"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.4.2-b9cec93.0":{"name":"graphql-toolkit","version":"0.4.2-b9cec93.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b9cec93193e3c9e53b902d1e3ab990722a7b2f15","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-b9cec93.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-FwQzmDjw1f5xCRraqRqK41oHZ50UprB5aAmj2pv9Wr8Bx/FW0tIrZSGR3SGXdKPZiuJM+G0TTsQ+9ygDvA/MCw==","shasum":"8becbe088069808fff82b3c4bc2298a7edee9d7c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-b9cec93.0.tgz","fileCount":252,"unpackedSize":379726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNJTeCRA9TVsSAnZWagAAHxwP/iOwnS9pzZFqPq93K6a1\nvICKuF7Y8YnhEHwfBbPAC9hWUWNKFrMRAwKYYS4K4KC+ZFjGK1hZzauyN6vm\n20CXWWahVAxiwxrZfD7l6x0HlC11drzaUC9uhMUHtJVyHK5W1TOvHm7hh/D2\nsaCMAB7jOArx3+JPVeqXGYoH9BN024w2gO5Sv1r48E5QC2CyF15fvlKI/B5J\nYrlK7dgF2QKxFGFeTQm2OAyKIzVBqWbGf2t7dF2Ybe7J3OLTkIEFb4rKY70C\nquMpeDY1RSR2A/e0TLtwO8frY+7hdpsoBa2r1RDD9TZusfzj2Sgty2fvdV8U\n/B9Z7aqUqZoFx0110rx3FvsLPA+LKF9gYb8bRYBM9gLCNR3od8AztM/lFLEZ\n46zSGKdwOiehtCa3sCm33E/8OFMEiXIU7Jx4b8Zv4sp4tW1R+a4/+3eID2UA\nAIamdI1LcVzJl++fiZ5Kw5DKwri4byXWRLnvDW6VlScb3uc1emfAkwKM8j7d\n674KQRTk3Z/MvXNp7L6ABgmNUV7dnMztfNW21LZb4q9ccC2M7VWlHvnlo8u+\nLPnuiprNhpfs4XaOphHyoTdlB5hHq3s22rm4WHzBJYNcoLDJMF7XjFD3lT34\n0nkZxjkHi85GnUXuoeyQOkgiulGp2ppv0nUEv0gWWZ+y4UfGZ9KxsTSnAnwr\nnX70\r\n=3JSp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPZVX+DJkbIXEFg08BVVg+xe59iwqZXbslIK7EW5nZpAIgaaL7SoENTEtZIeb4D3NDsPzCMEFt1pRrCOuzyEhyU/0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-b9cec93.0_1563727069777_0.42960842577770597"},"_hasShrinkwrap":false},"0.4.2-5e2406c.0":{"name":"graphql-toolkit","version":"0.4.2-5e2406c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5e2406c2a3aac51818a7a5fe9fe5b08a33ccaf37","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-5e2406c.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-jU38KkSkNbnT2U4eVDd0Dla0O7OC0ia4dz0Y2ZxrEsAz9v5jh0F7oQuTNeuHDG6nbh1JbXid3GuZ4jHX92Zc/Q==","shasum":"15b1237683c098eaeb4e68bde393a5ae7acc73bb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-5e2406c.0.tgz","fileCount":252,"unpackedSize":379734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNJTnCRA9TVsSAnZWagAA4fAP/AmiI5u+qVoRd92dMG4l\nBU86/Dt2wHAVZuTYsJqYdHfPsoNsLswzBANwr9TfPicgoUEq99kfacdko0US\nSVE6JKTxlOBQA7LFIh+EogaVn+GSOnj31E0a48tkzCsrCM7zzg6ryQX+RHj0\ncC6Iqs6ho282huirRy+7BKMNLpFhx9/xDdc/pyMVmBbbCRq64YgE8674YrgY\npgOfCGtvjYkN0jlINSJ+HNdlQGl500aN6xyWqOZPDsXHungq+SljHsdxspIo\nuzQLS825WISOCUZ5XkG/9yBCiE+Z1yK/MY+amER75F24JdttCiogB/pQvGxA\n4i6hjqZ6hEwL8+L7BZncWnU6eFsq2IjNU7FlvuJ2Osq3khydB8tUlKqZ4QLA\nei9d9nEPpCEghM0/kzTOscL924JZog5mL2AH9CaMztsZeZWPneBu82HFQagt\nzpG9+qbVBXE9sbqm1URyPs2rU+J2tp7pdRNzZPQUlE023AZqBHUNLp2cV2WU\nZ3vwToRXplkWxRGllB5di9lgC9InNSGbSeESyCR3i4Tqg7XENDU0G3n9qtUG\n+x8ZskkhRtMwJYwJH3qwOSRf/vl2gC1/i5o77YqXvFOgL0PJnyISMBhibJvS\nlyXZ5CnesQbZYekZhN7qWF+tbM98IrUXxj2OHAJZ3OEjuWySpTfVrttzkpEB\nNVnS\r\n=PXEF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVHna1pFFr2Y2/kwVKUETM5VbMMiUxYysQJnnofL2RDwIhAIU8Q9P2yl5BOTAqKTg2LQTiKVryT3tFVPpe0N1lD765"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-5e2406c.0_1563727078933_0.7545947445168668"},"_hasShrinkwrap":false},"0.4.2-b54e685.0":{"name":"graphql-toolkit","version":"0.4.2-b54e685.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b54e68525e59ae45382c8509c935b9c6a583bc9a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-b54e685.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-2TUZGraHLi6x3Iojy0dG/c+iES3dUB6bfepBKx47gqeY23NZFSgpzvu/v22yE9yHWmnx2Jxt0YIyUio0r1Okpw==","shasum":"5b6f53a5e19e70e440e9c91bc1cc87a4e69880d0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-b54e685.0.tgz","fileCount":264,"unpackedSize":405486,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNJ8RCRA9TVsSAnZWagAA6NwP/1uLghZYdiBXsbkKv5ec\ntg1p7nF1vNaNhJyqXIDf2xnzdtP2pZ0ZuWEXFcwyNFER7knllF/OIzIkDNyb\nrsOc3BHMAx7zJ7x2dwglGsbMmC9S5L6NMxzY00EVydZKEJCWNSq+B4a0XYiA\najIcYXyV+0pypTykEpovfGwaRteZY7SkCTPKWCpiSUxmoJEoD1zLeaMw7Dbn\nelrD4sYQxgBV1oBieSaAdBoP9+wtbPtr7wBee1GA1VU6J1L540hh4cIxQ9l1\nMaZ+xU0LPxQ3fb7sm/4TDlnwwRvYsk9TQQvty6UHoKnuC/0V3DfWQo7xqBAy\nXi6Jm6w9eQXZYekqMYGou+MkpTeejqusyI1b9v4+/AXnxUT8C48/lLIRpMPp\nZUi8EzLSjMthxFMwBaNfdw8hi9nPkB+J2VU05k2CPxJl7zYmBQcJhGFPe/jP\neMrVAtoukj5UhNjefO+D+8fTRjaIwTkBXYpa36J/MRRENKSLSjM4k2vTQlXC\nhNXRxAGxgyYEehfEv5KUsxamwIxDHf6xOPFNDhn+TlMBz90tbtrmj5cDlYwG\nUxlFlgQLnm25Uy415zpjbrp2VQNAXNPgBFRRcybhKy+qCxaXIw9k4NlJtqKG\n3AzNu8a19t5d54ifCxJKJImLf1F29jwM/9Qn88pwvOgA2A52ZMIwOGI7y9wN\nARe4\r\n=O1H/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF5mbhmSSy0Y/ow+TUQaxWc6ARXidi6hxdZGjtRdcyn7AiBft2XgUzAL2zl8C2FhzGbv7nKlWl42TUz1oBApQtLpjQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-b54e685.0_1563729680218_0.7726041640858006"},"_hasShrinkwrap":false},"0.4.2-fda7817.0":{"name":"graphql-toolkit","version":"0.4.2-fda7817.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"fda78172c131b07e450bb2ab898c803a4078b560","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-fda7817.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-qRo7hRu6OmkVc+2HvUh9nRp3xf/dTti+0GP2a8DiuZWlOooRVTgZwN4w3lwvOZhDuzW2MnVLvUyec0MDTlRKgA==","shasum":"4d23fea3c0cb4a1ae9db46158063403bb18bf055","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-fda7817.0.tgz","fileCount":252,"unpackedSize":379732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNhhTCRA9TVsSAnZWagAAkH8QAKFW72bW1n7hQSrK+88M\nX7GAs4wikLvkIigRSno+abJnIJWxKLuFhiqt6E+9msNE5wV0u5Gsd8YEWQ7F\nZhEoEadFU0zhg8Vi6mtG8Wp8RLIDRRrhaPdOkRUKgfFw8ye9g5IWjA5xx/QA\noYKo7edas8InwxMprADXaOI55CWw7uhCOs1iM5InoaTZ/EZYJcvMSlBxvjto\n0wq7mmxdPBu9W+5pdxfIJFqUweKXvJJxq2rl+8DrTWm2uYT7QDkk/8dDpVGk\nHNB756ZAzNHxqbm+cGf6m+OU9zRlKbAfbHZJVhPq4fzlooBdgiBayZEogoCp\nf6jBTr6UCEa1n/fPZjCZT6hl0hIOZrzKGkW979g96ZrK37ghxOi+zFibOE7H\n4XVgYbnRYY7VPnDNIhfdBqsb00f2+9M88CHOSawtMgR5PrKqt2pApQRN8OKj\naRwwdcPbMIzXp/Hnja99lvb7OwzJTrb95Xw1jPFYJql21bm9+sG0Iyw2GlG/\nNYlaMcFNCmPVADzqhKybnsZs5oe8oiIjHs0VWgeXV4bZqC1pP6GO/Hpmjtex\nB8SlyrLlllr5ZAfaXQloWn0P+xkSCy4xzdZqmB4m1rXWy98cjTNUVlbs7akT\n+F0dE0vIwBfBO8mkWUU2p/sQOaIZF7GNMDp5B1AbO1uX3ZUQkd2z24UmPQaM\nEtR6\r\n=b5VQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHbBPE/le1Swl9rokF8DdUuAp2wQD8ZFoKkmcQJxnHYnAiAfafGSpk5V4xDisDK+N0TQhqebzxhS1juIcFez3LL+9Q=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-fda7817.0_1563826258880_0.6693569724222588"},"_hasShrinkwrap":false},"0.4.2-890d9a1.0":{"name":"graphql-toolkit","version":"0.4.2-890d9a1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"890d9a1cf1ad11f800bfb5a4c4baebbc46a1d75b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-890d9a1.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-plUjtdco5djaWuGTP8jjZt4RcobINb1G0R41VrP1Guwig1TX0/U7LOoIcGL3EooKZbzFOKV+IXtr9dNL/MCp6w==","shasum":"7134c5f8a32ad271de0586799cf078128e6540e4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-890d9a1.0.tgz","fileCount":252,"unpackedSize":379741,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNpTfCRA9TVsSAnZWagAAfnkP/jdYI0bXWIoSUt89k8jo\nNZy7yAGLuMofqlUqNpXqgOuGU2N7DzKzAtsge89rRB3IpQp/IVBU6o8ct60H\n62PQC7A733xqUCCYFGBP4jF5QqxBGx2p3n0B1bQ1jkRxhIP275sSL5pnp3fw\ntgatziIDlY0FZziuQ6u0gQ7S3eShbVjq9xgdNk0DKqmBFsqqIYY1K522yc/I\nkb9g/hneS2XeN611nrJnhehp1BAtcNB4uV11BNU353II4lv2oy9cfvqavRjw\n16sJfE9GGX49gJ9S1kUFFQmCWPqy5ckp1UpSsBqB+zrAoTi7zHqfhv1K16JU\ntUSL89ZpySCXfhjDIhL5J9rQgClXyr3rv/Z5iXpQrviioTCnDod6IgSE/OHc\n5p08FQcoWEdqkv8GAf4IlnI+VIuyuAqapEMQkgFehSeOIplJmlgRq/RWOSO1\nIgnO8CbzssZiHHmySOWwzAxcUJFsKtoxDnxXXbaB8gR+BtzslNPHiUVhSkYT\nT8AKEhkwr5kjGPc6VgIOpPE58DBlRiXQlHo0gY7VtIBQo0e1QzaGY0Onx8ki\njMNeYud3HU91jQYY4900AZ3Ya9f0IrLNlTtilbtMaEVkVnrknynCkdpA1HgI\n+rzYxr9huZURejPPlgXYU90SkTSwEPrf0WOQCyN0jZLGclmB+aau09VEx5yP\n64AF\r\n=Xf+r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnIPHK8n4Y5Vfj+ElM4qUQWjwgXdqHet8mMJulYDB5BwIgOY+2kYneHQ3Ec1ecHJzo/HcG8seACjxQ38M+VQgzZf4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-890d9a1.0_1563858142888_0.9680367591477759"},"_hasShrinkwrap":false},"0.4.2-8210ae1.0":{"name":"graphql-toolkit","version":"0.4.2-8210ae1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8210ae17ab411e33f91e690fe767555a41270a65","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-8210ae1.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-La3Wy9ADkVK9DDBvgqeV2h+8g9E3hy6InjMrg1rjKN3lhSiL3fVhcJUIDr2bVvgt15sAhMPkjzDs/5guxed2hw==","shasum":"4fca17f0f144c3d336e2ba1ae6afa70a2fdf7425","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-8210ae1.0.tgz","fileCount":252,"unpackedSize":379774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNtbyCRA9TVsSAnZWagAArHwP/3XBcsrIkmpzZOmy8S69\nxzN3wZIbbdILLR+iOek4SQPtFstw3yU0ppVxj30jQhFnwy9mi2UEwag6o4vd\nslfanPUww8gsIWNeuZ6QpNjzdyW4wIXhn82jwDv/GhvNgmZ1/b9YLMfooCZs\ne751xvI6V0zNiZGf7c70ALqvahzkhpFWSeQFPm8m5USbZdvLws9UnEM7U9IW\nyVJvDrhVf4vVAVtznHF/q53zrTiZg5SDoeL5C5XmmDPGMu5eu5dI3kDcB56k\nPzy/w2fM8cyZlWlZIWuZF25bPDPa7IFM0ukQpQnRACL0ffGXbvoZU6/2CGfp\nYj8pnYUR24MOt6gbBw6KV771xoRf8ObWmkA11ys8Pn0jZJ1iYEIMyed+TtQ+\nAF/8z8m7RcXpVFdBtAaP+UIc/77ZUPiwvmetQqyE/Vyly365k+XJOh2WS1yI\nuTCzRxyfxC0KDwRdp2rX5YEysiT1rkAU1U+a0KLNgLgjJWReIOSa0wxge4of\nfCP0e7THfkUF/FuAO8DdrHuRXT+LMEEs98s/FbPFISxosOy8xawFl1h54hWU\nRD+3fUYP2j7C98Bb23A0w0SDjcq9GwHSbBdvmZ775gFThZqxjbwDLUl+uHVC\nNvhPzS6Z7N37lf0F41XZ9tJfSIDctqNIcGgGJO/Mc78L0LRKiRtl+xqMmFxK\nRwtv\r\n=UYz1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQsfFf33RL0u1aHGLNaUQqpe6fI4WHEfLVrx7yDy0MIAIga34t6qACqx0QdscbOtDQ98fZ5nh7rKhfOtWlH0wXEvc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-8210ae1.0_1563875058025_0.6478787878887522"},"_hasShrinkwrap":false},"0.4.2-372d4f9.0":{"name":"graphql-toolkit","version":"0.4.2-372d4f9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"372d4f94e06af1b3cb371184e94ca3dd967dec35","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-372d4f9.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-G7eodQnTkHCeippROTB38Y0OafAq7fjUsoRxeAu8co54tr2lAtKVPOoX5JTvaZiBD1afemqml5Y30NRRaJlAzQ==","shasum":"3f36f1db7e0c3a3dc68176736c02d19f4db12f2d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-372d4f9.0.tgz","fileCount":252,"unpackedSize":379789,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNwO3CRA9TVsSAnZWagAA40UP/RO+sOuPx7D7z+OQ81jo\nufnDRVXGH7nMUHIoJktGqdFFLW0RS72wBUH2M0S9GitsmFc4r0Lk156pQnyZ\nYIjO/0hfac+xDj0VO/CcjQ//A9+PHbp6jZ/4ha11J8ImU6T+icnk9sb/D2ec\n9h2wEV5C/VmZRe9eCYKOvg1PxDXc+4bW8T92r4y8Ap/l+jliXy8Z9RbQMVqT\nCAMDTrSUwBM6APxYuYkZxBMlMLvxGY/HIz8GB1TMs3remiMZVgrgIdrNxskI\n1uCbiUciQFXZevMQ/Jlbt+DbNZJLsv3pU7tgoZr8A84DEcVf5Mv+2UbemN5O\nR6zFr9uy9pmCZJH8b3/iIcVKnXcM7F4Bqfm7X37uHbRTWLVlShdz79oZBc2a\nvtDsvg6ni2XrI4Q/fFhddAsF4yzk5CTP6I5fn0+p+xFL481yqrcEVcDXU1kx\nHkr1SJ8sInqtxPIiJoYS+y8sl8qaX67VPUpVwfGN788Qj64Sbk8IpnZXIRVR\nE1QDY2bvbEukklKnY2LZxhwdmGN1rA3bBMKLNebpBYdCztg57/YL+qNiSX0p\n4CYJdat2ufB/p56qb5s4Ek8HYfowLBfR26Zl30twMBvsKmXvgUjfHIq8OQSZ\n+TS+8/KGoqsoL0YC/1ANkf1L40KQwDQVUBrMvt8a4Q90BtoMOaJUFzZ4bW64\np8ms\r\n=4+UZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpJhFK4/B+knfxIq1C0wwMOoKAzA7leNWyIz3BJrf7ZAiAJM55E5qQQErvlZKufrijjU7NuKkoApFKGoM5RXrroHA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-372d4f9.0_1563886518881_0.21287297053974674"},"_hasShrinkwrap":false},"0.4.2-2ea5f5b.0":{"name":"graphql-toolkit","version":"0.4.2-2ea5f5b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"2ea5f5b63fbd289fdb52408c770d1c9b87efd2a5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-2ea5f5b.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Zd29wFm+tkE+Couuma68wW/JJLyIrxb5sqyCMZVPfCSIgtI0wYYdrqztJqM0jWUBv6yqZY+JPyOX6hdxgJc14A==","shasum":"032e772126631810307677327bfe8af2dee50f75","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-2ea5f5b.0.tgz","fileCount":252,"unpackedSize":379718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdN1/BCRA9TVsSAnZWagAAPhIQAIZGq0s3bGDDiEC8Cycp\nN8hWMEZeZbHYl83YM2kH6sRiVUUMirJ4EL8t2tlAoM/PaDX81AfKROlXTZdH\nOiqZRzM86ztl/n4UgTcPsIJowrQHGf5klmKmJCFNjcwiO3hxw1mxsZRO6F3B\neKyag31114OsODONiHRkHWyLGb+zTXjVeC3To8fZx153hpbSubb1anc+pXRR\nVE2mtKg6SoDbwhxTRA5k/waNIB7SbFxyuASTd17++gIyOYUu7SbkMtIVO0H/\nh+flWL/15xsLpgKgcIt+6+HgHf1poA/9hP9CJHq588urouCPu97tO60du1Ic\nQO7re7MgMcsJtok1m0WPuIlpzxwtqhQnqGtfhHAh5P8RRJRhlZ0UWxuQNYGv\nh5VlgLC+YT5lFRA4MedvNIFwQMng7WcIO29Q6EaqLLtdpajtT6/j6wNvxH3L\nTGUnirFeJrFum7wYvCCYqWPwgQ7rxHL75kikdTxnpvrDPqJP88bpSYQd+TFh\n3TAfdkhVx/ljZSSJ3oKLEXSwf38ZO9EVDoLxbgsWmAdcMnY34Lhevs1AIjfz\nofGgen/NIU/HDDpypockhURNIZmolQnDQ+R3DDVezg9pg4wtjF/yRQRiksh9\nyMr+0zItXjy1uYCA7eXHLpuZJumN4mJBADTm5qHdEOvmCUSAO+gPUU3hjXEn\nBIUN\r\n=zYYW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZadNkME4FX9gnKl3RiLwNi5ld0vsUunSrs9dREFcEJAiAqrkEObCK8/KC+vTiwoVbH77TKeJ60IOUyhu/CzmRd4w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-2ea5f5b.0_1563910081299_0.6680056008082682"},"_hasShrinkwrap":false},"0.4.2-44d7883.0":{"name":"graphql-toolkit","version":"0.4.2-44d7883.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"44d7883c610420ad1105e7d65ae28fb8b5283ad6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-44d7883.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-EfEqSBaO0Dlt1aMv6RkDE4ELqroyZr3m8bVHcO/SnXdWVJoNPNtp+r9IJRtW5Sm5Id7smQXeBcurA+zXW3MDBw==","shasum":"604e5ab7fe728d369086f1fb4ce78a36df769d1f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-44d7883.0.tgz","fileCount":252,"unpackedSize":379769,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdN4KzCRA9TVsSAnZWagAABPUP/Rn9nHfCLpv75o8XC4w9\nkJkh9Qnuwar/ftRWwj92UNcTBtDLbFZoMT2suF03u9KrRoP5xLwixXAcqyvn\nw9ZraI/3iGBFXW2LoUkW7j0u+dgktGI5a0LB6sYqfgUM6recrA/ZOCiHdUWo\nQtyGcHbuhEKlsjg6xNTvFMfPs01mG57cQd0Yl/mEprCrwSjC1k3r9k+C0nz0\nDM4mb/JkHpuxe1K+VnNqieyNqRaaWUH0Ij2qfi6Gyle+k8gfO+PfzIrV04oB\nbYvdOYvWnWHXjnUfuiz2R3BJXzLnYQPoRGYW1eIJUspnAqrG4008TBWwkrOP\ndBvWL8xcssnePNjen3NhR7q+24oVfbeYO4mTsqGaSWCwNEBIYN3W2a3JCrcz\nuuM0TzSqoc2w4CXKKoSLF8bSPrJkCWQYNb6Ywbj9E4mp4UZetDa/QBZZpo7g\n1ugbJFmxsrVj/9TtPaJWFa59MzxqMS8B0dThhKaIQIasMDXGOoM9DYhlxo3I\n6w9BiimSd0BSHJLLQph56g1V0bCNNCD0s4X2GXyw+q4QkS2i3ruzwJ39C3z9\n1ztV0syYMt/1uuakRrNiAwHmgI0XWP/DLS2LDmLosSzov0uzFRXZmThk3j3+\nHimj8ZgGZFCnTkdZX1h11fK2aslkuT0Lz3D89lh4MppMqzql222R/RYBgyYT\nfN+t\r\n=MJdO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMG1AIXBu1+7UKVwSe1hSY28FbkMorWGb1v/3IX6b2pQIhAOTtOjvWpn/UYZPwIgZkrX3HI97kETDH2/Ot1ajkrbpd"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-44d7883.0_1563919026564_0.3975678215227245"},"_hasShrinkwrap":false},"0.4.2-081779d.0":{"name":"graphql-toolkit","version":"0.4.2-081779d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"081779dfff8ca2055b836dca2a81541e067767f7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-081779d.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-j385lOgv/HT17IoxB/Ewhm1NhmiPfDl79Phhclg8vmETl7msx4PrTtkbPYBg4U3wrqzy10UVYE9h/XmzwLKa/Q==","shasum":"e0edf08d2ae6b628a0fecaad74791eb4284b682b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-081779d.0.tgz","fileCount":252,"unpackedSize":379765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdN+aiCRA9TVsSAnZWagAA8DcP/1IkvqrhpmQ7Dqm4roLJ\nSYt0jPnBBOoH7dV3u8WhUAazu1FWDkdXEqFYWDHMXBjIEt/noSDTeGeJZdoC\nblZ2AdbGeK1stFaJGkrdo0RyGBvjHx3DfeeoFU+USMF29gBZ6UKXYu2ATOgt\nUTeIYMvzQ936t/IG9pt5K+yix1la6ueBnKpqVm6CR1bkRhjcZ+kVgVQgDmOP\nmmrc+HmgtxiUpBDmRy4mErXpaF9L2OpJKR33Wjg75K5+U1l+gjwwLb3IBJxx\nYW4OyBs8igQNfj4tNf9cfz7PSRn+9VQXgytOLCOxcwI5A5rPqCJb0Ye87/pr\nBVQjoMPdvi1pHJEAesOAT+AwoGVkHKCU6TvzVxVL7EI/4Tnd+LbmHT1GcEUZ\nNu/bvhOg1NHNBft88sPDF2f5ejkzoOfpI7qdWRkhidmlqhzzTRCXKCSYciTG\nLnXbddV4Fw7mOPo+gVPkrS6XsiRpeOSjMGz/9h1pofo3mPcqS9ObIiY/sP6P\nUI+5hwVcEnZSTQuyhzMX4LemRFpZsoRSCEKNEgvEWLQn1UEnuAzktu/IPNWl\ngHKJVqMKra5yKhHg3MLmRy25qZLblkp9hlGqPdb6MZxxv3u7yuejDbZvGxog\nFfyoqHNh/f3agm+vLXC6KD+NgvkozlV5yOqLzb/HP/BLVZF+k6l1zYy9jL8Q\n0BIW\r\n=Fg0O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICar4grPToYEGo9qJUfI5mjrGpfvJrJ68vGE41zNEgItAiAetdva1AIUXixQ+uYSrPViJx9LmIM2e2BjfcS08ofixw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-081779d.0_1563944609898_0.152503253124336"},"_hasShrinkwrap":false},"0.4.2-cf2e910.0":{"name":"graphql-toolkit","version":"0.4.2-cf2e910.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"cf2e910d0531b686d90c5afbf86d686f898b6335","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-cf2e910.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-T78l8nt6ODeV+HOjU6VyKIb0cSxKBpZOpQmtolTSow2wDAjNIEe8BjTWY1cy4/iT5w4HFuuVJlWercidO/Wbkw==","shasum":"9565572a9f4ead33bd72feca15d03dfa7825a025","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-cf2e910.0.tgz","fileCount":252,"unpackedSize":379734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdN+a4CRA9TVsSAnZWagAA5zAQAINL5fm3BYIhIKVz1k9R\nhiPVQLWfymq/0Zzo7LKU9mCF8iNK5qrbmMJD0hL5YevoTdCblqSBVnpGZKHS\ntGVAOE21aeMKWaY/RzQfv9qJaHwUrTLkC37YPRtvP8Mw4KthM4IJBrZDfwJF\nD6+UlQIuGaoeFjIiB8k1++TvRJf0DYVi6NNlRDnqB299LbeNRxRGLVzHl+s6\nJJBx1V8xjPjFFXophzB8ArrR+CA711ZLIN+sXtdVbkx3myPGYsLslDkfYzDy\nELD8GxTb0XKSgaaR8g+TEAZa3ITwoF6py4n28jhXoKvCHBEYFKW4Wa+XgC+4\nRFPE6KZDq80I8VHSX4KoAIcwHHRoxxLVxU79fGGPJJawWViMChqHFIQwsX0F\nrLcggT1XPECp4RKWM939BhP0YYTfAv2sA2hUvpWPGR5wS44oKSGWLKicLNnC\nThBzTbJEBOw/mq91jEjyCZND8BUkYnLpLfBLnGgmXaEFjs6b4WTt3uDsBqB+\ncOTzroe+gefd/UGLpHue1IF0x7A9xqifRJH+pGCzzMVFsWPtRJoHpdrdNcDn\ncBi4HrL2o1flRkbic7s3zGRsmmb2bHVgYZg6aT/ihE20UboMw/1HlO9tU/yp\nrrdSPKRhaHboRHBsp9uYYflEOXmqUUR8klcFGmR82pbMCXNbu4raHIFThQIM\nqHzd\r\n=4z19\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7tL2Vg3ZGjFoShZZLOQfn4J6Md9hMrVy3gXGppHxdWwIhAO9yxvmRYg2AVQ4MPefqwZfCCEjcp/NVFsftRh5mpF98"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-cf2e910.0_1563944632250_0.6044993961361111"},"_hasShrinkwrap":false},"0.4.2-8e64ff0.0":{"name":"graphql-toolkit","version":"0.4.2-8e64ff0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8e64ff02685ed8f71aadc8bccd97b75d9ce4e91b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-8e64ff0.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-KH8c/LmI4uyw9VyVnRNamczDBAY4altYdR940yURqOdxl2y9CcWq5RtqZg6iRlRoYQ/LxedhroBaDL7U00KHHA==","shasum":"6f1b0cceb9aa046d08d9fb6e8c3fd4d6cf5bb87b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-8e64ff0.0.tgz","fileCount":252,"unpackedSize":379746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOkxWCRA9TVsSAnZWagAAYkkP/RUTSwEe7C73ar27ZMUr\nYOoHvR2ZJmaC2zgKEuP0COYqn7OEkME0TnmmwlUAlY95AndQL+QT0V2iemnJ\nrBW8M+nppR/oPhb6Q7e53OFN9nObjRG5JGnarD8ew20adYweuusJRcB3U9OA\n7J4ZBFx4N5w5aIP0L4/3tb0g+ZQTqjQfUA5/bEuT08Xys0Ll//KXzTQwnQh6\nx1hf4XS+Is6Uha8h6CmNvKXXjJhpBI/844UBKBZybVn8OPHixsX89laELGZ/\nCXUF4WNPkYvYEhRmKd0HI36SYubTKsICu9EOjfUOGSH6Bo3xtZccu4T0SqEy\nJvTfjeVy2J4yeOJiA45p9x3V0OxPMS2UVaa5mX1yGLq6aWvkeWEU2RYcg4nX\nNmw31535BmdxnFDIYH7TV9OaEUjkl7KUcacThLE0rCpjwJu9X732nmAjtCPL\navxnDlvZOMN+SnVSeCHsnklgnsJzzTMxdqltKULgCYLrDry0d6VcT+4AHfiZ\n+eDf2yTrn3xoCK7w8925T1LiJqx+c5gH1G/UxkycclB/9hgh9OdB4mULXPnb\nVBYD2t9vNWvYyzDkbD3FpuDEsJfRyVX5NL3Iv1JrpUvtebIJyFErexhQTa/D\n1+4SfBUClAYPjlBw6C1SjgIZCQ3WTMsW7iAZZl6xyW6ptXs2CLvZ6PuFljfR\n5wtg\r\n=qhOv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHA4VHHw3SoDdmo34w4gqi/BFiREZylQJrmC82RYDS1IAiEAogzILi8kYBZ/FBAMgiF3PacoKLlSFE9+wHGgt2iD1dM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-8e64ff0.0_1564101717720_0.463791450289357"},"_hasShrinkwrap":false},"0.4.2-e1fdc05.0":{"name":"graphql-toolkit","version":"0.4.2-e1fdc05.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e1fdc051479d053a9557e75d750dbc8235681826","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-e1fdc05.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-L1OGnYsF7FH+GQ9kNCRsfq6BHX3IDlU4ZQ86zjujZJ6rUyoXK1/Pq9Z9wG2gh7d8vviAMyHAW0Ijdr87ReSyTA==","shasum":"3e2261e18f71b471e1697fdfcdea358c3134216c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-e1fdc05.0.tgz","fileCount":252,"unpackedSize":379744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOq99CRA9TVsSAnZWagAAL1IP/iywRdcWjSmpWB476mDJ\noyOJyNE+mM/rjhFtYCLBNICSAdMbJICDMheJDCCHRE/X1BHCYsLJmGZFWdzD\n6nrPZOZUS1jijm4PfDaCX98XJKwog2kWyDosWaRTRgQxRS+T83Q3cBRyOQb6\nW5N3VK8eYl7C5IWf6RTpvKX6GWtLUb9+exnVsJtpmEZ/niRYB20nwTFsM93w\np0gEhdB3jDOtadES5wHR+mWpElfs3tMUlcEFppeX+Zx3RtgLxLV+DDeloNsr\nCwJ+zfDvppC2nCHvYGTFJEulzZ8+I3k11/MF7wJzS3XVM5sJNK7sE8SHivcU\nXeJ4+fXjhvF+U8atFp5pHM+aJEtOmhzuGFfQPy7IGGwut7wbs/avx4PFHQhv\nJs/3aAVnxqOl328sAd//JFhpti3Pcwo9Jaj0PVJCKsP4/wWteYQwhJgPpiqG\nrNRlo37LdIHo3rjMOBHYqgHgvn19dNizUJCLUG5LYkkvwA/ENu1LLgmhqg9F\nEMnYkYY84+vIN9EaBQQe4RIhD9p82UMeJkCrhvtLqfwtOn8n6vD0y5L0QnGr\n4EFuRt2UKFPSqI+vKdr7fOS0vHwDvryAPMC18d0PB/Gm0kwGOG507ZJNEg0M\nCCnzCUfYsqQSYPtuVKGQLN3qVHoV+MSAIR0OXoLrAJJn5pj/gHdbB2CjlkDb\nJBqO\r\n=epZX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDIDgtMPeJldZE9ZYONOpGAZ8w3G4NkVM7MQq6sxTdw5AiAtmI+lhqjAAyRh2KuSDI3NpVDTe/uG5LB2eltv4clzsw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-e1fdc05.0_1564127100169_0.10314318011274204"},"_hasShrinkwrap":false},"0.4.2-937fa61.0":{"name":"graphql-toolkit","version":"0.4.2-937fa61.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"937fa611a85949f62051328d65030006e5b909c9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-937fa61.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-fv4YueFU8sJ1XCRM0BYqtzqaIz9AmCHbHeU2/ATyP894jk9Jr+D2kQGX7UooB9kpWUVPvfXMuF50KgdYPBAiKA==","shasum":"dad2c841bcc7b14122f310ea74143f358ada45aa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-937fa61.0.tgz","fileCount":252,"unpackedSize":379753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO0fcCRA9TVsSAnZWagAAJu4P/3rc1hvJ96aVmYGNuvrf\nYu6Q0R646YQvNxRvhsMW2f3TflHs/ZCmVVodo5XqERCdRIj250Szhyn+Jd4A\nU5mGTnYVTKiBd4hSE9DURXhj5y9l9msp2DxNyFxg43e8Gwdj0lElDzvFQPiW\nOjWawiIyQ2vM/CgOA3QMwjOu5gWbM1G0WQ8BbeggRupUQU0NDMaC704Mk0YZ\nGZa2Jzm3uw9wVNVD82QNADvc8u2/ztqlG37gos5gXHY5zeSYCMRxbuuWaqMf\nGgUlhHVr6+6krkNDRDU6UJliAD+xIzLUHhJWHOU0uyA7HaB/Zh3XnAJivwqE\nETqA506JU9sE/1bpmJqS+eFaS6AwaThYxmPkZSLLdyIlaOWo9x5rTLGP6sq0\nVTudvwWHhvS48RYjgjdhR++wm8NhkhbBGEVCIu1TtVPBY/o5O5bL//TosD2U\nkO6diJUln4QBXgYPBlcLOIJA7RAi/vahf1xNF6kEhtmXQtSrr9mMYcvw2TFs\nc//TcyLjOujqo4RBhgqOmcupNu4SeyxabYK+HpvQ6DUB27cuwVE9Kz5BWjmT\nmNn08hF6dCfCbc03fB/cRDnl5rE+GUGbU75Z5hYogr3Jo3xVA15fQpyUQkkD\ndKNicWgPdeBRKVAi+/5bG3E2Tn6SWYVHez5Am+BrqU6zIP5P6mcUTi25HY3h\nHgyJ\r\n=DmRG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHur3woA4iCwtnE9V9FIdzxSjw0vjkPJrMTsxECpH48OAiEAhCjbiY/E9hbhMHZsjzVXF9lrYFWOswNouqbEX2zzKEY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-937fa61.0_1564166108015_0.27487633169850545"},"_hasShrinkwrap":false},"0.4.2-4350446.0":{"name":"graphql-toolkit","version":"0.4.2-4350446.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"4350446bb6bab29aa76c82709d45d72311003ed0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-4350446.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-/QiAleUpr2P47SMxXZhfRcd7jvWfuzDjQhbKZLhCWkRjK9eVlSJw0uy5SPacxUkayInRKyJuyZ9y5s9xF1pxBA==","shasum":"1441e575ff619511f4e0fb1c30fac697b739b879","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-4350446.0.tgz","fileCount":252,"unpackedSize":379765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdO0fiCRA9TVsSAnZWagAAjdMP/1ztuFj8nY2JKezB1Vtx\nl/0V7UuBbM2wg3Buhb8EzL3Luc0TYATp97oaBxORG1Hl6jEKkoww4F/0Kim/\nfX6CdEApBQgxE0HjcroAGnETlFNBdSwExHANUwpBMZBb8J2aQ+XpjFuyAi9Z\n8dwQArLdBPiBQbAd1K1KxBnQKR8weSU6GqzL0FfKkf6AKPQJAHxW/0nXQid5\nXQ+0JRTySy5Jm/gDwLh2rb0bwRVy978E14qKjaNtcCRjatbV+R6mR8tDGoZV\n5SBvAS9FZY4Zj+H3xZ7cgClFItghhEr+h8zwE2e+IWGR4CnEHwATWFqipi1u\nA8LPQSFwVAraOsHonSxD6JX3ZOMR64tb0EbEWrbupEP84jFSZxdT3Jk2tSJ0\n+RPScepOlQpaCJIVRePttXARc1rziBiwMbU6lpKEFNmr0C1ZtN+f8xN2If8V\nEv3+9xshbE+fFHlTKkhTmDQChllviV5TPavWMJUKDr/SLB10ABpTgV4dyfBV\nMWSKiMVTUQsGWwyLOKuMvxUVSvvsYUaDHfYWGdPkPN0ZPOdlLs5vIy0OthkB\nCQKCoBhZ0yfaJpZt89g2wXvSuTrdbhcPuzjuD3rzGkieWYRYBFlnd89eZGxY\n3HmGoxOPWlEwhbs3Rsluua7JZ6SKd4SWHQANdSFrecSHHobKqdvEeRrfIj5a\noyoP\r\n=ZkN5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIwgKlchPKuznnTUmDUesbd+lLCghlnypY/PbmWeUsIwIhALniD5OJh93ZitiyG/qoJvGrIovFxj5z+vlE/sv49Vbw"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-4350446.0_1564166113840_0.32437865460861426"},"_hasShrinkwrap":false},"0.4.1-7c31fef.0":{"name":"graphql-toolkit","version":"0.4.1-7c31fef.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"yarn prepare-release && node bump.js && npm publish --tag alpha","bundlesize":"yarn build && cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"jest-junit":"6.4.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.14","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7c31fefc1b8022192ac433360ba09cd380e0f02d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.1-7c31fef.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-SDHkK5MNwW/J13WTeVnecS+UoUmWj92CFZjRcl4NBW0oGfZYxp8mhmpBD7IuwvZOVFJn43NmypRQAapGDr8URg==","shasum":"1ae06874189fb7acfe02bfc00d88b1dae9e07303","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.1-7c31fef.0.tgz","fileCount":252,"unpackedSize":376023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPWuFCRA9TVsSAnZWagAAGA8P/0uaz47+bAL9WyrlRVv1\nJy1xqcOpgrjJ+NwqPKgcankK8JlmB0G0fS3JSYypVqaR3o0Q7ivnMbs9NHoY\nNZh/3t8Q7gmaQT8C9yqhIN8GoISmNPXvZGHR06ctDbzrHrATaz4wKiHiHjgb\n+lZ7AR4ig4YYb3/El4vDJeTEvxW0th5Jq1Mz+90G1DPBB6HqIx1ZoMAI7J9/\ntt3rKj5+kruz5De6Gn6XyzBDeFNtxU2zk6tQx66ri5iIa8HJKQ87HkYAj2yS\nwuJiknV/Qz1A0T8taRwFI/3g1m55Ctoxi4ifEvwrOQXek3OU0RI/zW9/0Lpt\nBbzakUj717e3sJcaiu5Z4b0/3XA9fIKfNgalih8udWcN6Cb/dm6EqU6c8Y6a\ntiSU3xbksBE1kkAjgGYOyg+nvcapucfQuHd7CsA3ZTkh9to56XxJ/at7tZ4x\nWBRffXmopS0DmXjCA8jKfjUNgmJusMI7YamyWGdPnjIhI31UU0VUaFJNCGP7\n4MHx1SFjXxpzhYA3ORUS0fIpJtgBVie+npvCRZi5S1BwlQ0nQj8ZdE904zMj\nIBhsvHlU9TbWPB5LmewtIl7tmqrdZG9t9FMNGmAilATHBY3bT9I4+vhtBEE2\nLVMaIbfTlS/O2OzIcjVoKt9O94XWef1W4F5NVVCbbFAKjYh2iXsZzaV7BLIo\n6eKH\r\n=zrmY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoh2VWj2370OvJEqiw+BI4/c+5BX5bMBa2HLgji0hw6wIgE5DMX2Cff8jXl+UH4rTjBNfiTYd9qFMCIpI+7lDKqzc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.1-7c31fef.0_1564306309094_0.4942147381477524"},"_hasShrinkwrap":false},"0.4.2-e078ad0.0":{"name":"graphql-toolkit","version":"0.4.2-e078ad0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"e078ad01e6b71db561c7047e3c665e88ba1e981d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-e078ad0.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-7sf5BnDySfZpg4f2bIF2MjXE9m0LsUY9f/io6eNr1KFvS6uUoq/LJVIROr5zw3Q5NsAL05s4aJrjiG421IPUdg==","shasum":"cc3e1be87f462e15e4d0dc097fe15b58554de043","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-e078ad0.0.tgz","fileCount":252,"unpackedSize":380942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPWvmCRA9TVsSAnZWagAAupAP/2sUQ7d2TD9v8N0waKZx\n5XnWD2NLK162oLQSaslLMKaV3gt9uAAC3RpWqAgnhqPZnBOM34gte6R5LONW\no1X8VwNqu00x6Naa2n2+FCfH38xV+0ZXPJKoTK/Uw80Pb6dFH9AaVl/01/LE\nIlcI7y+d9gZqqPS4yytGSr7Mi/cL6Za1Hk8DrhdLeJNFfTGZBL08/czNwHYY\nj+bve6E7vGz2oAh5rMfhKxYmyLrPmTYjipW8HLdelt5uJpQEJQTXGTS04ekp\nDKv3zVUDE4PEfrkjJryh+lQ5jLzJ10g4B/ZDAIn21B8oesZ3y3ctJ1W35GVn\nSxbJXAh7F3ugKPK1dAzfYKKzP+NldHj8oeiHoLreD7HvSJk61ZT/NrBago+h\nbCvX5E4NqMVaNTfnfTPacD9sETaDtt7OrhLzHjxVL26QvvNihnUbLoDskPSH\nJQbW1nnRFiW7mFCkEJmhsXSd2VZrZ8y1yzum/p0c3q5dBa1C0kOyRg22G+qi\nJTVe/6I5Cw6lqrPOCLVv7JCBLHgqfD1E+tAXTOSzRApNQG1GsmejGsK5KPt9\nAVs99kfzb05A4bsCZ0XUQq0mitB2pasFtl5hLocs02CViSjZDPM0jmIQHUIy\nfC6c8vOilyLQH378LQIXWhdeqlNWEvbs/a++av89FdV9PGIZ/sdF09SwbAvk\na44P\r\n=Y67I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXKXVujemJ5A2x0PmspMDxH7l4UiA5fVlh8aJDiCP+oQIhAO3tpJgHAuUtH6bzWQL1HlUZCOjhDDk/+5pOZp6GbtQR"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-e078ad0.0_1564306406024_0.07209927087399426"},"_hasShrinkwrap":false},"0.4.2-885871c.0":{"name":"graphql-toolkit","version":"0.4.2-885871c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"885871c35461a24886853ceba51ab06d4ae5b493","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-885871c.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-7v6i4Esefen5zYRBbeCCoir8jiB+9NDFI2nSt26cyCv68DAwI5ZffwfhnUT/XGdsaMEDVlf3Zff0GjKpAkOZeQ==","shasum":"554eea3e3f8a39363cc6a534f393460edc26d9ab","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-885871c.0.tgz","fileCount":252,"unpackedSize":380888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPXVkCRA9TVsSAnZWagAAoy0P/2ijFmS6xGUJg/0Wt7Yv\nCfwaXw58SoUhcUps0lCQXPe3IYRUIzcCglJzin3pajrvljHufan9ES7J0E6u\ngD7LxKTqxIjE2glWqcVJUA2M+D5semjlGHoVMgJAquyr1R4W59fcG97y3uhY\nRRlTOTjeP5RG8xCBmST8TbGU5RtrhHdtrgkrp3ZpS/JY9X3NGGC4eaTuFY2a\nLNwYUJRjwgj68c6ZhLyPrmjPm0KT0O7gre+7Op/3OmBqyOmevbi4xX6Il0w2\nNq/UqtVzJ3ns66/YoFv2V9wNshaYV63+QxHy5wpBanAlHHf3rqg20WuXJYst\nk9XEAU94dTdU0vVn9mW5bU2MTbJ2bNYDlFoKE9PrBwCeEoeQcdckOTm6hXe3\nN9A3OFjp31BD4rvhbnNlaz4Wwi3RLgCdW604ZRx+TJtHMM9JXbqXdD7m19DX\nl8tqz2mBh7Gdjtal+qZ6JfFQ33+Y6dFsWpnvyaDLeEBB361VoE3ziBTwLfjk\nVrPBgBG3y6NovezsBCTz9ZRnTR4F0Q+wX/DtQBB5EYblFC+7fiIBpTVdMHIQ\nSEg+PnkAtTZDBxL72b8ZtOfarrpuDx/wM6gOEJD+eYYYs1nuRf8Vz1rZKRux\nCM6ht7TCeGk9mVL98kZnA2KbcBlsgKCBOBwfTJBc3ZniGW9RlN5/NRKoJtq4\nN4Wg\r\n=NMwL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAwwUilqV5UNmPdYbrHfFXNrWJXKVMDn/Jt5GgXDN6AxAiEA4DydQ3c2TjcaAMv97IqTpQaFCr7DR6YLMV2EzyK99ks="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-885871c.0_1564308835831_0.2994665525785156"},"_hasShrinkwrap":false},"0.4.2":{"name":"graphql-toolkit","version":"0.4.2","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"885871c35461a24886853ceba51ab06d4ae5b493","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-qG2zfM/dfa03LnUb4wWslwOUrOHGx9glvjjjL9CELCpAcQzSwk0ABu/4+2p5u/g4Tuv0SSszoIogDY+U7+qWDQ==","shasum":"5250dc56c87f1357095234199980260b59cb7274","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2.tgz","fileCount":261,"unpackedSize":1315437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPXWGCRA9TVsSAnZWagAArIwQAJl3CT7gjRdb5QC5I6yz\nA31j2GBW/2n7PaLvOxJlaGU7yO/T2poDd1MpvnqFn3BAUdoumd0ofljTjLMk\npdj1oD7uiDJ3XV+3wLDlg855IvbHb5gz+f5a3HIWKeZ5hAqABw/M/Hy/VURF\nhcgB0ccUilBFZU0yvC+41xk3mldtErM2lVoaqwvRAQf1zAXhTXMGrrLo1COL\nZq2uHMu/k5NTssJjst3x7LK3DobCaPQraHRLLUtinO9Tt2T3/up3jaM6xai3\nsVmQEjHiENu2K6y11PQf1fQWtmawZaO6DoHcokKMIohx+lnbMGNzFqgSPjzE\nEuAzCKBQdUpAoswyWjamvtbYIUCmCKFOog3Ok4+lHtxOatbFE6YwTa13nkbZ\njmST/VLovsuGPlbPyGYHbdbT+EkrmBJt19xcngVzK6xVOkD3H4S+fCGOh7dU\nFsqLxtB1zGAaCemjJEDhuYHJSw53e7Et1dzaJQlPf96xji2KN/SjQXNj3PnI\nKPmFDF7kLPtfEsKU9h7JSdLEFwhZLH/J9uDBsJosX4HZw9xSang7EEWTXoaw\nb+g5M1OM8L58kk71seNO8b2Omh1QjGTyLMhqKHC/G9D1o106DfHgpBrsw3Y7\nn349Cfx5PXGa69dIltyAHChyv+jwUISFbXH03SrN/dtR+F5zlBiCm8kXZ7vf\nLX7a\r\n=kwiR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/KIEbgoFT61UUdOv3nUtcphsHQABDVZodyICoaqIzCgIgV1rF9uCJa04qaLQQLp2R2GKg5eBVh4tXAppxvkJ8yX8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2_1564308869737_0.36450928009643224"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.4.3-0a482d9.0":{"name":"graphql-toolkit","version":"0.4.3-0a482d9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"0a482d92dae6f432a7630205c2d8eafca67b30fa","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-0a482d9.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-IMb+50kdP5BKp0NDLLJRmuhIZHvz3cVcDRzl2d64Sf7LVEBhBhiEHMARZbONd6uYfzmqTEVW0y3c3wd+ecD2hA==","shasum":"576e7b6f5b2aa7079c4ad27d9d8a52c6dffd3f9a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-0a482d9.0.tgz","fileCount":252,"unpackedSize":380960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPXYyCRA9TVsSAnZWagAAdxQP/3gyoTT0erlPowQoHaXO\nAQJo7qzB8RYui8QeN08BPksfjBOZqLpufhDt945qGI6VELV8SR+/L2hISFZi\nPppdZbZtT25vVu1ol/sGLmknMRRrSDeMH0v9byV00s9wW4fHxRdu6WzHurdU\nvNCKxBh4X7grxCgamejQZTJbh6Kk40YBd4Axgyhz/eOpQB0xwDH1MLCaiD5t\n4AjnaoIfYPY9hKACKFmcV5a5hR0kdr5HOHLiQuK//CrSr1kyRDSaDm0uy1Sm\nrRIQ9VdBMgGVNLmXwhQPNdAi9ssCZrQclp8OeTIvGgDqvZPfQwNvzK8L9Yh0\nDTJWCxw57/v9WhDbQhLZXyGq9c5dL+27K/qpPFp3sLYuJMGm7XToHYju71yf\nZm/vReTtWp2VYdj+pw8bVMgeobw8VnoZLU7fS/ol5xJDhr0NVVOlLwa573y1\n/oIcJzl9rgwYM4SduKCQkYv+ESPgH5+mPiJnsGjmYk365+G2ffG/0lM//RC2\n0e2hRg7K5S8gd5r3rOGwA3v0McD1mv2OKU9VkCwi7HaduTIBe3CjEFa0sTYD\ncs2c8oAFN99xYIcRsKfc/s9Id8eWyPmneKPjp16ix/pCjuUsrmRrAO92gOoF\nd99nOTu1c9s6P++wuvznTtbYCXSj9iz+nutE4AKANyEsNLqqQAWGEnkEFybq\nYbLd\r\n=kD1+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGyq9/2S/FbeJVKfAnu3AQCEgZIgBUcC/1fXBaRwXgtAAiEAiqn7sLCmjTcQU6f3LhGpMKayVNf9w0c/GOeOMOEQP3c="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-0a482d9.0_1564309042208_0.22830181882874512"},"_hasShrinkwrap":false},"0.4.2-08d58db.0":{"name":"graphql-toolkit","version":"0.4.2-08d58db.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"08d58dbf5f7510304155dbf37e8d89c0f9bd57cc","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-08d58db.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-t2axFn62e8/2ixVVU2OaYkWwRTbrarIzVlpqZrDrJbhCe+84xHpdZYKs35mQaeRoEkwG1OKv9h5YTncJNz+abg==","shasum":"f94242707acef6bfdd4ac90cbe65870825e370f8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-08d58db.0.tgz","fileCount":264,"unpackedSize":405308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPiCDCRA9TVsSAnZWagAAwiYP/3nHAWAseZIX0+/HXXw0\n0wTHpNk/lwJgR4aEuz97JJLI9hPApxjY8USpUFo2+vHE37mpdUvtI6UHdOUx\nAVMidiGd5HHnU1op2jVsR+m74EJIsIcq1KyT63CgHKKUWXcsHj3BCr3qrFkV\nF+PM0wxDQEp73BsLI2irLe92FNFpWe2zTsVQx/a8u9IGt/fJJ+9IFTdS0SUs\npeGKQPl2/hMBXTStO4Kz8ONXxeWcXnTzIfUWvKeW6uweo4pbyCwGwESP3Kl3\nAnXL18iK1AAvR0lHp0yJyzVJPqxhRofQuC/7S/O9jgt4FSPorw2isnAF2+HD\nhoLeNeBSDf0VAh/yiR7r000Vt2fT6RM87ShSMOl7Cl8G1u9DK4tUhvjGyG1k\nfbl5pOy8NPwWKqt0GVjS40TXFWussoyqsKmiU0I2YadyN1WlEWBI9pQ4ukZ7\nABbat8N1lfYeqXq/1u5JwhAnHZHN+JZxtm0wuwpiRqrmdWdlW3VyWTTl2EjZ\n8c4c2XhY69bSwPYLD3pzfSzVMqxMDyBJrPETWQ3+s1exa/hcelJV0Ww9hgzl\ntZQSIKxiYdX3yxLQuBoJ43E8/oHH3O7xA1UxjFX4HRO33b3ZuVoLvzphbHoT\ntLSMMCk9YuCnmmLA1WJPAjZ1DHKI4+nrjOFIal8WZwqgXWS0M6BlE4JOpFF9\nwu0x\r\n=gndO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCshqrD2m/ttzAVEs7YWCsVz6uh/5eazBmkNwpXdh51hAIgCxL0MGbrL1EPzkcgEN6Ffybf4MKngHr7TjW7aMeWp80="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-08d58db.0_1564352642182_0.3979353670568935"},"_hasShrinkwrap":false},"0.4.2-12f9a35.0":{"name":"graphql-toolkit","version":"0.4.2-12f9a35.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.2","@types/is-glob":"4.0.1","@types/jest":"24.0.15","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"6.4.0","rimraf":"2.6.3","semver":"6.2.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"12f9a3590b0220bd4e31ca471acb087ef519425a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.2-12f9a35.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-aGgRm+Muf7cXcqxwdfOq1a/G0npdFCyNwT3JzLZSuBEJkV5slg8Z8V+CptEF1mBGJDm87mHG4aC2kZ0uHbgZRQ==","shasum":"a007a5e6f0d9dee07fef57469fdc6e4e03d38c0c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.2-12f9a35.0.tgz","fileCount":264,"unpackedSize":404154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPiqTCRA9TVsSAnZWagAA6jIP/1PcG0m3esDGbcTapVfG\nJQwplQp2DBjhDhHkt32lNQLZRBaqS3yfectPud3AOLMR0mw9j9J6if0/5Zar\n+QZEn1yk+d+c0S3t3PbnzoBOva8bDy54eqfUVh/5RkdlpEVwY8I46v8oou+k\nZaP9L1wcu1qh1OC+aPeS0tYtXsIn6BbSFQZIeP57DZkPf6FSp9c9qA8s7Ymd\nAtm0TJu2IpDWX1dttxOzUm0qyktYCDqxlUWYJA77cRaGtiH4qnCNDjhlD4ox\nHkHvi2FWFUwFAqAPaxClzn0/pqUt6PuxoV90Uy4wAnzWnzztpqLuC7Wu6nTy\nDVElnr+xrjzvin29OqLEjYTp1N1MfOkcln5TlmDMfsXjcF5UkOCXfu2Pvcj2\nFmsKDDReGj57tx/sK9FF7opIROOzXdLNLs7eTU8YMT54Oglo1dmjoVkSzoS+\nxQFY3enXT2XQJ0hSLlef8NZWBzwBlkA28uHBwyc6eNIWPal456hmxC80OYJ0\nivS++TY5iozHP9ElVhBqYB+GdIdW/aTINWVQ56t8CuX7FD2Qvl5NBq2rC2xt\n9FYqqc73xZI2Zx3HQTfHkW2WCru8Y5aqb0dvh3bWf+E0qHFaHkqf47Lm50VY\nAWsPGBCabCJMoCVl9iU0+4r3EZLT1MzePZ2Yb7Zo0i68kWSGlunN0XZc51hC\nl+Tn\r\n=fOvq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4cpwtuAzm//qwkP1wFAdwsvG7YyMCL57fJy+1axylQQIhAJ6n3hq6teSa+g4HndqeJjwn2tv1ZkSFIStxfhSWAd23"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.2-12f9a35.0_1564355218418_0.5327326676527877"},"_hasShrinkwrap":false},"0.4.3-ce30c7f.0":{"name":"graphql-toolkit","version":"0.4.3-ce30c7f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"ce30c7f4d0ca94ed81fd488eeb34a38c44084f10","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-ce30c7f.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-Fl1lazJwGFivPIW6O0t78UraB3+ZZw+CY4BvZKXZ4Q8LigXtaT0rpsisTXJTvsUcDu96OkQRXDALkWxeYwm1HA==","shasum":"743569808a91b98baf93712410d5ad0c568803bb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-ce30c7f.0.tgz","fileCount":252,"unpackedSize":380939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP3sHCRA9TVsSAnZWagAAyfUP/Ra77U7NZUG8EmhPQ1xu\n/yfd+Igmp1dTR/PilHjmxZ4ZzRtABrDMVab5cE5w9MEPJZeOWCwwgxwBplpg\nd92Vwh8+rW6CXNHbw2Mbas9cTL63gQz/M8PEc3UNxJXgb1rwf1Se0jBkn3kR\nQ8Jk+0LJvOr5GXbBjF94HIqmWphqync6LlpDA89BVzJgfZ7iuZCVzSiht6+k\nb3EFcCJVtRTh/expP6z8XkhFuU5dzvAt3sbBjq5PASwVrQWoERhtJ1kBHG//\nnz0pPyPiWu4NKf4ZDfNdKH9gN9jhfvThIWvOFo+lNB2g6Qq3CeuJK57q6RMz\nMZkdUYxE4d18C7Jwg0ufBJH4rdtD71Bxq5eMleKh+4kn5BHwx8vwjogC8VrU\nQsQQz2USBLMX9oT4WnUM4wkTyCoXqrBk2GVCl+bGTUGCXOd9H73VX6fFnYW1\nNofRFq4zRjGbUSVR0n4YEneGyhDrJ9N4Tyl2+anBHfpiBFJqKuYRq0tIG5dF\n9r4juKkklzLSIgKuCLA1cmAdGYkVochhrXOyZNeLQ5m0/YEuiv5uZG0HMCWM\nR7+59NHZlGSknhoTKvUh7gery/Kmk3hhDMr4fYqkF5GJldME+YiRJ9yWOAZw\nyXHRu2ZVdQl5ZcdlXFJXsNeYQUTRjvXF3hln12Xrp5LupDvKTI98IDZ/XQPb\ngzme\r\n=frRH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHoMt+xCjvqZGPRP+5r4Y+r/Sc/VVtBkzoLmhXKwmQ/FAiAJtVECmKw1OjOWCSIB2mrwasmUE5Y4cEB/hu70h1Udfw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-ce30c7f.0_1564441351278_0.07107558816244985"},"_hasShrinkwrap":false},"0.4.3-1b6fc92.0":{"name":"graphql-toolkit","version":"0.4.3-1b6fc92.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1b6fc92972a9e076b87d69241851df2430a49213","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-1b6fc92.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-Lv64RY8KXteZ7LdDUQajdmUkXikXkfK28o/bH0F7rkIzykunn1XvdCUNbfXU9T5wuDfcIYr0mW6nRZtVS5Zs0w==","shasum":"7dba4c23a6dd0b18398bffb8f506654be1eabfae","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-1b6fc92.0.tgz","fileCount":252,"unpackedSize":380911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP8VmCRA9TVsSAnZWagAAqU0P/RNnIGuAp8CdOL+/3Ngs\nlJVGgjC1DgoTabG6MhQR/HS6F+SOP0s9VOyGNxFMt6qeObH88WyU+2vS2daP\nnHJ0otyxqo1WlcKLV9cXj5UR9mDP0lMyeWa9Q5pgBgHkK+Mur+arYXoqgvBx\nMAmjKBB43sHCRV03LdG+BGirrfmwVyGF2wgUFRZKNaGdMx9KTh8ZhQFuNypt\noCFSVT9+c5HYyO+BmXbKlixW97ykanFA0qtYQp+lOJYqv8mNV4LNH7D8bCxT\nZjFnPoBaJ3S32Fomo1eb17Ytvb3pkqBIB7iLqSI/UW6hHcKI4Og2nx01/t6f\nPYuY2CvIOCZDHC8HipXbVdsSguHgG0lrXDcy31nNhi+QsERgF98Cq6I0X5Ad\n+OAmsgIfCh2QAHhjwLzSQ6OIwnNRhBc29fjPCkktiNk35gKxVxirRUHA0gdb\nbhgQX1gvyTwoR4bsOY0PmsBxLJEUmHs27FyFJkrp4JNqi6mfnitGnDIn9IaO\nga9ZvTxOBS6Tj9VJo25WLMGF8/wMM2ugHsJhHdpn5jp/3h4LeglHCtXXUIUz\n2mrn8BleSb+vf0/x3pcjsUrj6I9GIoK1kqieLadazXoTiBk01HyzE8yAnn8H\nnqCX8c63L61OgC5Qdle/czrUHrFWIrhIzNmwaPUVq7Yx6Zb+bi1DwssyyU4P\ntLTe\r\n=Vv6j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDv2NYPL58PyczFln5QjfYv7uTszTeHQdEGobZURItzrgIgCxK2R2VwQnU73vZT33Q6w7xLHZWS7SXlHv6ffWKdQz4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-1b6fc92.0_1564460390001_0.4807621455773379"},"_hasShrinkwrap":false},"0.4.3-64901f7.0":{"name":"graphql-toolkit","version":"0.4.3-64901f7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"64901f7be01a55099b138e24f0e8f09737b9cba4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-64901f7.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-nHW/jRCZlTPd0kX3GE8rkDqluN72bknK0R2ghFygQlI+yP8EQnJTGhH8sUM/gc02vUZDbepY9QlNVuJnkFK52A==","shasum":"f995c72d038e7d63d2bd09306182ae0dbacd1052","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-64901f7.0.tgz","fileCount":252,"unpackedSize":380939,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQCFcCRA9TVsSAnZWagAAlwsP/3eDxLa7YCJvF70wq9xN\no9iaRDlvsGXVVDtW7sDwLS6jKzQGO2xRnXb1lKiZBj9aklG7RB2KZIF/tOLo\nGMB3UDQrd0CNHnp2GLBVOunz6dSO5SeuZJnSvF+Fyj0qlO3J/b2MJDMebr3R\n3OvE9WQMJbc47ewgmLkGQrAHz4BOIxwBTMkYKn7CmcpIfW9LOv7an3AcZxud\nKGxttH8Rt3jT1MEokeF2AXM2pe5dac4YqQx2u1hUkgUMxqxrzOvYYWkijAmg\nEnY2YF3Zs9ZaXI9d1oNcjVvttKfDQzUcLWlA4lhg1KKixFum1j2NlY63YqUh\nxkEjF/1Ze7rDRkoml0fFC5WTXC35no1uuTKCnBHZYHzn66YknEsj8w66ZEiT\nO9k/emIB+rYDGzuxHyU46tJ18calzYz9d9Ys3f5DYYCZtwd5PkXf/35YeVOe\n+9plZoy2Ybrdrp1TlGKi6Cr8eTMjtiLeguNd/E/UWnqwsDhi1XPnQrvRkhGg\nl4HTkREPomiVii6aIedWEJsdFZiEG8NerLdiaGZMY5jUVZp1DXKhIgOnBPdK\nGyM+gzcu9vbgaydUdz8ggKpgr6h/2bnvIeQxmtgQrvlbPKaM2vYopI3vyqyD\nX6S2vrnO4W7cUrxLnrtY4VIXv28tCyNngoqpJV/Ar+jk5WjU0PhzDdCFRLJD\n/WVJ\r\n=gBdY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbRRTzK/1qvHreVb9rQG00PjDNNLYvXJ6STB/xQzjO8QIhAJp3E+dQsquQJoQfAe/CTE/bhbYCsMZDdbyx19JwS/0P"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-64901f7.0_1564483930358_0.589672317237778"},"_hasShrinkwrap":false},"0.4.3-02217da.0":{"name":"graphql-toolkit","version":"0.4.3-02217da.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"02217da86fd24490fac9cbc2bfedb084ba5caba6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-02217da.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-LeKsBi5QyGhY3QYCA1K1i/4xycUfHXepQQaQKPlYsqzmLrOuAOzZup7hnty+p7JwzhLlIosbxD1R9XgqRibSSw==","shasum":"ff27df8a83bc2d4509d0aa59b9d415484a65190f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-02217da.0.tgz","fileCount":252,"unpackedSize":383265,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQGc0CRA9TVsSAnZWagAA4sAP/1j9oXpJyWq3+NyY+br5\nZPh7u1uEAhwQ/uen0qpYPhNLyYeWvHe9JLVAzNY8X9D6ChWcEM/TSFX7I1xp\nv1ttYJJvvolTEZOswbOtUqy4E8/IxujCbtrxoFUCKe4evMT5EKptcMonDb0N\ncadbMKTbOMSLzcpwKB0R1SlaJq6+NMga0V8uxYXJuGmVMCHtGLJFFztylSNe\n543V/Yto7q+6nA0j82u3a2n58qv6iVctx94a9J1n24qicRTNIHZawjrHd5kf\npxrXuBiDSHzIUr+PXObveV2YLS2JobBOP50/FL67513Su86O9N8hqvusx6Ts\nF5YULkvdY5ShnvXKyLygvKO1gAXL6lJAQKBJGSG23Iq65ChNWtdjKARKoWAW\nQsPh9xi/XlgZxJV1brHCwJ9Q6CBi0tWYWYv8AwqJQjAtrZTNF81OVQPnegJu\njBcVjY535Y4j5KCyTlscu5br0uak/QX3Y+jmX0LO0xCNkKKDZ/HA2KlWoXj8\n9uRlqPUCMHdd5Adp/gReV9IzehIY9xT7YR/b82duaaQe+RvYMeAClQUYSlBG\nbDTFNMuiBBb1QYhmZV6Zw/aYisyjsCEcgg93RADDoVi4ChFRG1ndo/RalRF4\ngzd0NaPBnECXvp+xFmsryGnbc2RAEc4ZG+rgKk8U4ennsaY35+i1Dwce9Rwl\nh3TR\r\n=7e7G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEB+BO4ceZbgGW+fYJJeSsEHDIV+5ABCRBw/FO7c5bNgIgSS7paFOX53pfOqKO7Tj0dZaqabNwXE2Y0eyOuq7L0nA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-02217da.0_1564501811284_0.6449075978506733"},"_hasShrinkwrap":false},"0.4.3-00ddae5.0":{"name":"graphql-toolkit","version":"0.4.3-00ddae5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"00ddae5db132637fa93a48d225ae9058f9da24f4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-00ddae5.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-FBXO5ZDrwIeOE0eUsAMFf2CgfVDNgHT99Uvhcg9kVweFM3EKbOLc8a4PnmdJgnEL/xq0sMJ04wqmUinHt498FQ==","shasum":"143bfff16c3fce97460632aac51be1e7c5ba20d5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-00ddae5.0.tgz","fileCount":258,"unpackedSize":386164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQI5sCRA9TVsSAnZWagAA/cYP/jXVgfFXE6FbDTo2hgl1\nt6lk6hMOJuIb7LzgY+UQqw7Cufk9CBJCX7VvxzeIq8nFfk8Un9hjGm9xDJEF\nlJB29AqCfVvZRIQ52aYY54ezzHUM3HfUXP8w/sZr2JdAWo/bsvytQEag1omJ\nzR6cnCOuyvU+F2OjM7Rzx6N57bW/3l687J8FBfF7/ZeLc1D1GWoP1hHIe4t9\nYGC1jChNrMWrv7drWy3HOTh5/hKT+JJshKyA4v0fUvSpXj/kyX6KNy48BtFp\noXUfVEFqwt8hW4qR8nF8QWuLBHYodlPiTYXchJDXQKzuC+v284OTwD/rd3Ja\nlyMS3btDydcDpBZfUj+r28CbQLaRGiV3COzRnfMzk/iTw9OWLRDKfatVzs+4\nsWuLeSLYVXkX0gpcv9gZkhJSMYTErY15ENCLvDihdE8FEFvRLmpZW6Ojc1H3\n4Sm9Gxpg8FI00wUGmwBVn9XJQKLUr9a7TQfyL0Y+BdXmWPlZNTMpJO69DCPX\n8ZxAqHTNefDvkiEncN2LRVeSzRxLuRtyl80oL0kOgGqGpFXfdAzoV0NzDnLj\nUm6j3g9BghgapYGFDCbFuJMuRucOK6Ak2YlfNAJc/3+kL5AXNKcPHjEfLU/q\nuEOBYhizBoL7z/FVmG1o1SMO8l9Ql9hT3rRR+7bXilpBuzUMJ/5En7ui8QR1\nddw1\r\n=ezaj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+aq+jiHf2izFMJOS3rEmNibi6ekSqfaZEr1Jb6fD/KAIhALz49CTRc0EU60IoEhPnuTpgKAgvnTmidhFw4zeLI15E"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-00ddae5.0_1564511850810_0.43878478856845393"},"_hasShrinkwrap":false},"0.4.3-93f6314.0":{"name":"graphql-toolkit","version":"0.4.3-93f6314.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"93f63145392d43b11b8b383af2a9327aaaf898be","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-93f6314.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-QyiCfp/03RaU6XhEIirjvhpyvgouVhw974YAt9QFi/GWX6bnKPprM+m9faOQjlvBNjBwsE9pUi1CqOfgblLx2g==","shasum":"9dc69c291f1aa7ac529315364d4555136fd99a7d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-93f6314.0.tgz","fileCount":258,"unpackedSize":385125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQI8MCRA9TVsSAnZWagAAMrEP/iBn+46hXOoZW8nHqyJ5\nK134K7HHlhFXTeMCaRs7/+fKWewaQ/ia0A99qJeOKcmrbtQoXz37S8qcDFgH\n1b2fhPN5rLewxmgnk4hwiPL9cFfSDYQSFrQuY7KC59zKLZ2NldLpK1gF1U9S\nu7/3FaPZILL8+IhYiCjZ6Zl34WJYE2uayyGxLdouYn/qRJw6zN7XRKcw1+72\nmwXixHidmvNx4YEtzL3E0+PjWQcYyfKqpL1YztEqobjgicQC4HMzxhkioiSN\nX16TsE4aDhWz2GvQzne8whLnfhOy/BHoXmMF6ckmcAlWxPW3QAB14nfYkfOj\nduI88KNXhElncVjRbsyob3DUPieHs4fuKnWAc1rPf8dvXGurp6Ls9FE+A6pb\nh6RGQTkBJKecFrM7+7w7A2dAV6zu2LwfIK/jGiVfDjYf3yC43a8JwN0Btelp\nBh9G77RFitmhTZ/4yz9xGRIfw5/nqUzIqcl4hWWPV8M4EXVGghGI09wSTuYY\nvcXFLg9JT3Xj5RVhnFaIBVyf6Mkt5Ks3dD0q/lB/yw/DUH3AFJVOSK9XiRBR\nMSkoAF42IYq2pldckA/pGvVtva7EVg96OjbeQQiuePKX1YWoDfC9ukGsoTaN\n5ZyKbuo11RtPYcSfUl70YDgsOv4bSUOsUPuhQxmuas+c3K+MhQfBRVScAns2\nMgdJ\r\n=7RUK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHBtVycT+LEwTwfZV4ThKn4tJyVaHlws4b9Jod3XaCYgAiEAqhvBOBpXJeXodnTo0acGPngipDSYIVnrn1o8CI+bjnY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-93f6314.0_1564512011987_0.7922650626044729"},"_hasShrinkwrap":false},"0.4.3-d201a30.0":{"name":"graphql-toolkit","version":"0.4.3-d201a30.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d201a30b9e9eb7a02c0c9cc334b92544536099e2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-d201a30.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-hcqxFQ5oVakLkvEBW0TG01rKUF3wbtyN3rc0c5+8pR9DT7Xmmij/mag1t0dmGUUD9FfP/zF66hBIBzyX3ZuKaw==","shasum":"7aac81d62b5efc05b14a6e5ed5441568ac13fab3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-d201a30.0.tgz","fileCount":258,"unpackedSize":384907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQJJfCRA9TVsSAnZWagAADJsP/R+yVUCA3LMqNZw3KdWh\nR7nFfBEnn/51YS0etBio1mOOHlnN9RHOOWRhyHWPrGrGRW/LqC0wEQU9t37H\nMRqohAu6wv1kyqIZzBdk0+aOUjL/V62FRP3xGUDXP2QJ/RLHQIwFLOA+pv6r\nHVUbTwMtl+jAkBrI+KXIqra0YccSzwNY1nekfa8/J1LN0Q6pbcT3wYknIOPV\nqmfcqBIbNKMqh0GKHkk65JpHCYByQ1Tesfm+ESjnaesbZChcHaJJZXfAd+t8\nipxbmr7rtX+er7DKj70K5dnTDeYAI1ZqbtBdskkFesS7edXGw5Q7KyGZpb0G\n9wdEKuqdLcuWTM9hur9talyiG0KOUdn6LGsPg3TGApHnlLkZhV9JdyOr4vmT\nBTiw0/9VTW1KTqlYc8QhvBWEev23ugqUoHx0K8UwLA4ckjkmI1MzBKtpBnoF\nPmZihD4BkVEM/esIAEDFYJxmoaPlgqebQASfO2uvgg34DNEU6+1F6vbaDwnQ\nKPos9Fj0GrFRbafhJVygh93gVdCJ9DLVDgd+B11ErmvrBgPgHS8/YZubMCBK\nCS57ytb0yyUgZil5LPQLz0vOfbOtXkRsi+fa2mrt9HHJwhMGI0zoSdq3xH0N\nON/9GhlGfcA+Dem1eRLd+Wk1hQcaqYdU3oi4fEz427r4wHrtxUimYRiTwerV\nhxxg\r\n=K1OY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDkCVq5r7PZJusHYYppQcvbg7JoM3Un8189tgV8zfkOggIhAIQiB4zP+DL61jN9+0qqeoBGNq7atSH/5YRJBM/1F4UF"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-d201a30.0_1564512862739_0.9548290957512715"},"_hasShrinkwrap":false},"0.4.3-04e0afd.0":{"name":"graphql-toolkit","version":"0.4.3-04e0afd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"04e0afd0fbff10f0b4967f74ddc556f9fd76b3f9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-04e0afd.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-qLQiXSYYjO9W2LfBD+DYWtZ/02H0EqDvZvR/zbTfJa5u9hPiuQGL8d/Lyu/QOQNpqvWKg2+/W6Zt1lCZzjiBZw==","shasum":"be46b6a57512afd9e58b5cc45eb2ca049b0ac642","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-04e0afd.0.tgz","fileCount":258,"unpackedSize":386233,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQJOVCRA9TVsSAnZWagAA5TsQAIOwNBpVeu89tD3vRcCG\nOj0ukuEPUzjCHeZVmqWr25YBEJtAbkReYtha+JTAXi/R2WLrSaT3Lo5ZLbaa\nnMtaL+zEEj5BVwOlHM729PFcXPFzSqm9nT4cuhYkYXKaUolmcAZ3bPh3ySdo\ndcPcyhB6R9Xh+VKRlDSBzngjvaSB/DiySSD02qXy9PDiYH4ez13vmSxDQmbM\nNeLAvnJxPzjeG65ajCbfTWKcpralMRCEe9EUl3tN7TVWV7Pi/nyIOwKy5Brv\nx78itm+FVoKxrEIl+1y06GY66AjJskL2/Sj3Uh37FWMGic6by3IUDmpOl0ZC\nOoYTAn0tT6r+4N6dDTudNSS9BHHt5bmPY+EP4pwvhiLAiRDns0HMZFTJXiWc\n3AXtdn6BIN1OdQbDoHsNaLJhtW1DAmLFVvraRAwJ0le9BbHtS62VMWrAuB5D\nQnt2K9ep64k50+ixp9W+MPis5IaqFkglSjavrw/z9TjcFRzAnw8WkObPsP03\nnNgBtG+fC78IZbGjYdN7CTjtnQMU47itR9Vrpz4D2LMQ0kWv/BWSdbZeQ3j7\nmJ5IMdRGolCwBHODjq7IFi4IjdJs4iy9yRmwlr8w4Vn3j7v+cXm6XYMXL1KJ\nJngzGICuKC7EY89Hq8RAkcYug7yCESRbAJScyMWUi7123OTHyEQ28Hm91MdS\n8ZWm\r\n=x4xH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBh7yjwL3CaqtaSoF8ElXAQwXMXR2AgRU94FeclnKcwCAiAQjbiH5GTST8/iDtzYIMJh3XqEZaVX1dt4QmgQ5X6tCw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-04e0afd.0_1564513172977_0.20490527043712858"},"_hasShrinkwrap":false},"0.4.3-51ac8d7.0":{"name":"graphql-toolkit","version":"0.4.3-51ac8d7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"51ac8d700c01e923ac6f275a27d48eacf36e3aa7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-51ac8d7.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-M1G95c/pfehDKqS5vD21Daj1q2P6wHHOCiHO21O0jK0IBldV/31HbGIydRoH29M6EGmDaz14dKxvkeTKQoJaAQ==","shasum":"65f5da8d5277bf297416c1fbe8aa4bfb92fcd4c6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-51ac8d7.0.tgz","fileCount":252,"unpackedSize":381904,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQNWvCRA9TVsSAnZWagAALcAP/jJQFUSUf97tT5N7/0Td\nV0j4s81BprOp1i52CHjekRS+zLJpNSqo0aqQEoKZK5bZk1dtBfRjDtW2hdGQ\nk2sUNsDVtBBuefgXu6BpAnddcHPJFxBsAAGdYfdpsA4xhM4tJK7NqdM/zJhi\nrYgFVVKENp1yOTE+1HYnuhGaq/vLxD5ic+pSDsvRbmhMBuV0LhyhmNOzV98d\nJxJV8y4iLvZnZhpLcapkUerQgUy2T1j+b+DkveAmD7EDbARVs1favORH49Lh\n2oNnmjRWnjSWJcXfHg2ZwDMZjNVCVasP/IRQVGiknzehQ9mAjamJkyXKGg7M\nr547I3ORKU73jfbYcBWKknkpFIa0PFzE61kJ7Ytvq/pbiFhNtL01MGVWl976\n1pVNEol6LMhayjjf9k0iqUdnPT0ot/iy1eHngo5FisZ/+iXn86UDUUW6tup7\nJ/RZeMOcHrlazrjSpo21JuAWw5hNHuHMNzl/iMbSPXYhk1FImeG/uHDe62oo\nT2vYZYsvb8CcoztP1uvdBI60y5yjexZPaMy/2SGIIsprUiK0OPziE7UwFR+C\n0G2gUL7IfNzw9QkeQQleHxq1YUBTzAdKz1caeq/pdhu0xNnHFfVrzcCSURsk\n3k/c/8Tq1gO2AzNvVC5UmbOwl3iF9cwJFXKT/RDmTWblUr5hQpXcf1lWqp96\nfHkm\r\n=/psE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICK6r7LSI3rK7QIucIQGbfynw21Rw7TZudUne6drqgPYAiAIB/OfLpFzuESkhUe7ioEQpftIbKYoX9wJ5fHyJLKy+w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-51ac8d7.0_1564530094748_0.30529439880766596"},"_hasShrinkwrap":false},"0.4.3-f7178a2.0":{"name":"graphql-toolkit","version":"0.4.3-f7178a2.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/node":"10.14.13","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"f7178a239bae0d1f4ba1e313752e95439882e281","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-f7178a2.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-0jyQlyuVJzt39GMmiE02Dcxkxw1cuiMZEd2ajmLFFuruaEUz2Oj/FNcoyyp8iRDW425QX1tzdbEY2cGufUdhDQ==","shasum":"166614c3c52eccd308aa7044f51b762e4c3a0f8a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-f7178a2.0.tgz","fileCount":264,"unpackedSize":414912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQOzaCRA9TVsSAnZWagAAhJgQAI8hrKegrpJ9/WYxQzZy\n+kC95NnRkIc4d0kUGFeuMxHk0zhUO1cVpz+a4a9bR9cQkIVsAyAS9dfshq/h\no61OYcxbTLtt3mPuFbpL19s31wVHSpAoWZN/VJuCRLG3eb7BuXBYdk8nXf+p\nz+XDL4ybYRqwBoL/OmH/0K0vC+KMhMnWyvi+4wT56U78Afwe7GKw+NbZOLtX\n3G9MtHqHS8kD+4grAA0u5s/ctOmzH2KNI8sEnzTHB8zbc4CDpQn7nOCpOft2\nROSk0kUOkg8+qz1B/Pk5gGEItItZtoDk8woA9/aFCSnwgbHqQIho6s8Zf29H\nkSOdMrTl/hIxRAf4iv4P0O09ib2nCywgBXFsM3TRAP3/WwctlOzabtNZ0SuV\nTx2LSbfNlFOja6XYrfr4taz9yuJXFU5LRO5v8GxdPE5J91RT+gTpKIJHzP91\nwQfqweP2Y+5Qv/7sF/4purU0kN3gEC9dGTydgoyU7ImKEC2fs5NCvsFRBoKj\nghJnt4VIUy1MAQNNV+Tx9XdrtgT97quKslrM67TGVASckpw+/MtATXOxFvsH\n6GDt8FRElqVe+b8PK1rCbkA4Yo4JwftrpDjQKVnxL1u+oW7xxQhVIMYroEOF\no8hFWuch0vRykyQvpR96WonOo4uWzVRiY2aoi6RYHaVilHXELqtbhFwYVnXO\nQqHQ\r\n=9eyk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC237rJigBxa2zWF8PhYH2JyHJCm0xrWh0P6xXfNGTXAAIgPuR7L7jXaZNYXnZKKXLG7HSk1adkB6iiAAesTa77Dyw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-f7178a2.0_1564536025410_0.06792886853094604"},"_hasShrinkwrap":false},"0.4.3-6b210ae.0":{"name":"graphql-toolkit","version":"0.4.3-6b210ae.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6b210ae4f8810ea0cce8b22423893d91bffdba97","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-6b210ae.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-NWeTaMnicL6kbRExhZh5YeldIgfRw/38ceuXbeCBdyRiDqcsIxokTcNvPI4wNcej41+PE65ghS29UU1wKwkWjQ==","shasum":"6aba0d89d1343146c13036e0eb0ce85c8d61e682","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-6b210ae.0.tgz","fileCount":258,"unpackedSize":386246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQVasCRA9TVsSAnZWagAA9P4P/RMsBY38bm1giDUkvog9\nk37Y2k9ZPRuK5vRavnbWXI9sURf8V3LeO5X/rQ02B7mjbnAsLDf9dojqLUU5\nklb20nSbLdxjt+rpM/9hVDqTONAEXwoE8vbsXgXIaA/wPHGdVnN3HNPMtMaO\nboiCDKNuuKN3QfqBBLQyzszKwPyR102vWJiWD/CkDe9ymzLwi6pOVqlHS1OB\nnKTrzdGcm/uAANypHm7vS5PKGhgEitDotvm7BccqG9ExNlzwSvC55Jh6Oyh7\n9wxHfJSAnJzgedD3BIWsfDNtTsCM1g62vfDa+LQbCYph00a5ziXpuxYHRqjt\nPQ6oqlymWSmgTVTC7bSTjRwvJfd/jp+qp8ruUcKMiOunCslzWIcVVr6IoEjh\ndjovCfFhEgAbGHxLpGzTMkybv6LmP2v9uZ8ct1fMxEVbCq8FHQw5r/vTXin+\nMEjjoA2iWq80o9Zzfa2FkU+htF4yrpKXAaVNTeAAjIeRORevbE7wbA2zbw0Q\nNG+V+7tk68GQUZLSzddwbLlL1IS1jjEMD7z0kVvKYcid65iad3BUsvj8F9Wp\nuLfguZEJCxNXCpdo6jddlWDjPVCNt70AIKw5U4vXPV72n1E18T4yGPiqQvId\nGRh9HvmX1tbILAkDOkK28261OstO8GwaS5XzUnBAzMBVyBS6lWRJN4SSWPQf\nKwx8\r\n=MdkZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfYQB6Vamexx6BSnvyS/9CA2L8elUOor48/Mj0yu23LwIgGMRwsRDXELWYrkzR/gxinXqu1UNfRw8fbdgElmdN8uA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-6b210ae.0_1564563115781_0.360823985705345"},"_hasShrinkwrap":false},"0.4.3-24dc2c8.0":{"name":"graphql-toolkit","version":"0.4.3-24dc2c8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"24dc2c881d7fda60048ee713ce3fcd3aef761206","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-24dc2c8.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-NrZRhqKuFShq4lq49jHwAqie/FJF0AJJVRIVALrfXMm09Sbl/pWUnOxIxQ3iJeuBFOCbQ26CL+VcQkXZre9Yzg==","shasum":"3622430167072227693600dcb8a714cda11c3ee9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-24dc2c8.0.tgz","fileCount":258,"unpackedSize":388618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQVa9CRA9TVsSAnZWagAAIdsP/2b+7i9J93tb0GV7zDPh\nol/BbmcWTV3X9PnWnQAVJH84ThHfiH4+PEAwzOpjk2pM0UwNYtoPcPViUzY8\nneimDEsGqJByPUz5Qu6BZ8tBs4jJx0XnR0/BsT7Imle1XaGy79SLFXHr4Wwi\nzbY7Gl3n/XPwJhhvRk81+tGOHAf1F92/mMjnhH9sZqChAng7/huBusBvQ9vV\n9vRVI2sb+yEjj9d7h+ytj4dkVFiT4mbkaUr+q5WA7dPYOqAPeAquUCK0yHSf\n6IlYmq6G5t69J2Kts5WYQ+yz4Xl8TEQz9pa/zxZw0JjJBOJRHyfUfcFokb7v\n2zwrv9IB8z5jTY3RFKpXrMDxdbLEo2DEKE612WNTsZOTq/KDYKkPK+z2E6GE\nkgNY6HRPvoebKDbin/WtDCULvtxvZs3ya5iUDSJs3gtDz9W4dO9w5FiwS5sh\nY1nxyQ7S81Bzso00K3/SvW/ohbyMeyK4EBwEAFC/HbK2fqQ2Wkz0Bzbu8x7I\nqklIjpRhJQvjqQY4JwEjg96/5m/ak6Unn7V7l9W2SvJU2/BKe5EhtMoP4Uj6\nhI1c+akBW5PSvb5jO8BepEIMrLzBjhKHd5aA80RcapdmOaAm8ejsVhlwoHJ4\nObZvbUeu630Q+2BqeKN7dVlau0smffzLBt4InZlUPKkbnlrug0MCOkbXYbQ8\nOHAo\r\n=Do94\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBy+AHi0p3XNq9ImnSJr1/BAk4Rpy4vdC6y6f0PkhKc5AiBOw7VMoPqmHgQKDv3jG2C7yw8/tLmNriMbzOYMHxZUbQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-24dc2c8.0_1564563133024_0.6338230830072604"},"_hasShrinkwrap":false},"0.4.3-52fdb57.0":{"name":"graphql-toolkit","version":"0.4.3-52fdb57.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"52fdb57934060a0673478586d600b003f1d323c6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-52fdb57.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-t+bLBdRWkPRRbb5CqnpcMIC/C/QuC91nC4rrgXTtaxPMvopwJTaYqfwONksG8tiWp40NJnkIXK/m3/NegLE6vw==","shasum":"f5fbb90a5cad0df0e3692473313225b0f14060ac","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-52fdb57.0.tgz","fileCount":252,"unpackedSize":381512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQVlICRA9TVsSAnZWagAA8iEP/1Ha/mkgf3B8liPt/MXp\nGVcOHziVIA+e2FUnDonFvEn+KnZ+lEAWuNusETqJHQkKPMX7LBOimrqmQHXP\njfgf9zhYrxX9nXQa9APLhLO0JxMjpU5NVCsVR+PsGJI8pk3z8fSwIEBtQWVg\nlMjy/Ik+cwtK8eMRDaiLjrhmmnPcLgYUwLRbHtA4aHjprNQx5eA/RsYgv0U3\ny0/CA2Ujn/H0jHGvIcOZWm7hM7e3XrN0JD0Zml8wXf9R8QUWHivPWP65xH/j\n9sybvdL3sCsPtabbxWrskrX8rxYuscDCTGDv2NniX+Z9LmYwJv01oW3u136i\n0BZ968w7J/ymZg3HwHwwuL+TcQqfH/ZDcy/KSrYInQO+oD1QGlel7h0QuQdi\nEDwdVmWDMAtvPlskLJQsLvB3tN1FXfRhswTClB/4BYVftC2K5SjtWyVrGeMJ\ncMib0m7IvbO+20jC9b18fo+I6xkDERIjYnpNoDFMWE0eX67Zb4h22/t3wzAz\notPKl5l/p9j5SQJuNvKpwvNo1TAOGvP3mdpDEAwiVNPTDbXGuG+o3jLYsiai\nRsvYh+LErkXpZG8J6tboiXFZSNtwVxinjQiDAOP0lMowtHrZJOD2WkRTHteT\nIcgU/DLNu4UtCL/UlD78MrYlOZjdBa1gxDtV4b/TNvvHYoTfaNXxzCcS5JIA\nX7rU\r\n=Xmiw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLCDfXfgAJZfwhx05IBNvUW+VFqNo4EEmtGW0RfhgmtgIhAKAjJbTAdASoQiq3FBRfh3DWf56bLoT5HVsR5VtSPjLF"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-52fdb57.0_1564563784071_0.881680405581577"},"_hasShrinkwrap":false},"0.4.3-8926e7b.0":{"name":"graphql-toolkit","version":"0.4.3-8926e7b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8926e7b37d3f165b457a3e26c4f1d0f7cef6e841","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-8926e7b.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-XC7b4sCFbsAbxF50+X+drpKTlSFbqEl2LnZ4yYXCJz6hjTN/aPU45EbgPyIM9W6260C0517G1n8ffUrO6QSG8A==","shasum":"f667935eb385c44a4a5121f87ab86c5a689834e3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-8926e7b.0.tgz","fileCount":252,"unpackedSize":381507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQVnRCRA9TVsSAnZWagAAUqAP/0z4H5QPGwZkUkvIksqJ\n8EHrfeEhXZFUNkavmtGwqQ/oM6J3cnm+Gg/SbSxhVuK+Myw58zJBCmptovvW\nTu7/ElPpY/P4dZpvRbAOKk3gKfMWulxtJlobQ5XM2JTdMuxuoHmDrgJH6FeK\nYFRmpg+oK4Uduftd1PWLMU7rNSRwEAaOl0LPKFHfHw/oEruzx8ZJmku1uhmA\nTIVcNFKEhdJ/1B0bRmssM0jT8lYMoWITVEp0EiJyrCzIa1RRLt5B+ff7f6a9\n43NoCj5yyNJdqsZNJ+AJtcKW5BAF24Q+okZyirmAQc7Qo+NA4uEixoqcvQj8\nvw2kgmVQW1CWZxM7KcYyS0WqjL+zlER/z5pW3XaxcSXE7XM3UFP3jKmr0C24\n3dEMdlsfNGgaUe7nxdLYxdkqX4Ma0pp18SVQyNO0ZV3QtKAUxyd7MnPi/qHE\nTZYktyXcOx+6QX8zJTFsC7TviIy0uIcyAzr+3RgqQPI0Z+qzlP6HY+k3LHyY\n5C1LGKk6Ko1zLiJmvfdndk67m4sHJTeYIyazWH3mZg5r0vs6smDIe5TLNgAc\n1nyqMOfaY3zxNvKDA4bCm47piKgDs5W2zN6fJBha1uJvTIC99+kShon4FbQQ\nlYGlGt463ARbi6598M9acQYOB/xUvxkL3hl8XkPkL/TZ+RHtesowDGvGdAUH\nxSVo\r\n=nU89\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+Hk2NXcgp1QLWi86GgaMgrhVZqD7G45r2OIvTkc6CtAiAyRQ85rV1REMvVPMmR0CovaM8XMGlTeIzLdKRWCes+cQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-8926e7b.0_1564563921019_0.9762349833915986"},"_hasShrinkwrap":false},"0.4.3-3614144.0":{"name":"graphql-toolkit","version":"0.4.3-3614144.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"36141446880262cf435c28a534fce2e7d55452ea","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-3614144.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-3ne53A327ftUZM5FBii9esb3ljBgsBXABKKUN9DoAkW5N3Vs4GQw8lHqo2fyt+O/H4tOfqkHJWWYd/kn4OME6Q==","shasum":"f5d53ade5066b4c3605c7c30b03eb20bd61caad3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-3614144.0.tgz","fileCount":252,"unpackedSize":381684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQVqDCRA9TVsSAnZWagAAY34P/3+MVgwZHBaBn/R579OD\n0NsY1ZKJgMhiIGLI7NsjallDiM3w+RrqIPRS3NLZXABGrtBtL8GM8OT4zrde\nIHCn3BlbxI+k4GnbEP2OOGDGqbU3TagvKhUoCrlaN1KoOWZQfAoMDUVDAV0q\nmSjhn+MNv2UsXpaXmtiq/IotmgbXKTOnnPwsNMjyeI+j+rkv84QE9tPF372R\nL9z5sinZ/wSTmeRReSggho3qNao060zVNTKrqc/A3TgdyQUOeYDMXBxv5hhK\nBSm8y4Dw7LpqA/oB8+ic01Sm/NzOTm/nPErGa6sVYagv7XPbIRHAQuZPnMex\nup8V6HG2UJhP9bIbWm+S+Hk5y1pyKfKRusx/Kl1zluJQv3q3Z2qrxEi1lzJl\n59FY5RxS6Yx7Wn6tkE3nQTmmRS9w0E9p03QkqOACDLYoFZrNgeJQQsQkTEsT\n5J/APOvCbIJ0DJBgvMEcA9hRxPWT4tBhrwVp4+jRmTgb59IKLmvJvwZto4bk\n5G2Fu6jmUzsjZvy9GkgVcirWVfLQGb8MTmaSdF0r8Jh3pc57gv5TfBmXyx2y\nMTmdv/y61O1FL0+GPFaEnUSjMvZxCAauQoqyCpXZPzhHUT/pwnrLVQ8IiLJB\nKcs1BIIayYaFQ75E7LayfcqRCwMwO7ZhjpyjthWGfNfmG+6atDEfa4w4Cd3j\n+If1\r\n=f7xt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwasKcVbHZ2hRFxl/M960GZHkDzGHkYzMKgHAA7W/NGAIhAL829jM1I3f+Ul7Kr+DDhMOOVI72UekqrFXKOV1larul"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-3614144.0_1564564099060_0.22675003138962357"},"_hasShrinkwrap":false},"0.4.3-9ece366.0":{"name":"graphql-toolkit","version":"0.4.3-9ece366.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9ece3662cbac7148188a80dd38b4270ba699662d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.4.3-9ece366.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-T/aQQC/5Sx1Q1PownTqt1fztGm1QWNPfibldxtMQtIWXgal6QS4SiFa5jKzNKSXfTr6/7UMlE9wjtwyrnDWrkg==","shasum":"eccc26a87a868df2c96082b4c4a2872cfaa24606","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.4.3-9ece366.0.tgz","fileCount":258,"unpackedSize":389394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQVtxCRA9TVsSAnZWagAAFZoP/ReYT9PhNNnLUnfl/Qs1\nraBwFl2W2ib0Ev9RSmG/3k0WBZ16T/MX76WI6JXcDaW+i6PVGmTw/WZSQf8j\nrZRsizgQUQcE1ayG0AsHzdJsHcc4PmFEHOV8S7aUOoXwUDWTCOKf8t8oYyLN\neZhBpW0VqOTfDUC/LVQBFHOimBGZUggCbkpOEtmjCmQRDHRTABmu69q7GASb\nCJwDjUx3ZhEFGR0C7ObzkkrCWgwOW9QK6jtbnDKs1nHGgOpoiKrQYnWJFw0Z\nbrQVw+iDRylELi/XFCi6Y/5IXSd5PMUiFBNIV+EGvB0QtUtXs76jDWu2lhmh\nqPppsEBtfcyB2fqApAnNrfpXyTNWInvc0yTyj/lrywS5r2os+YMj9lCdg0Gi\ncq0wXarwsVnqUtTlfEAJrlBkjlh7FsJIoJaOZHS1Cgn5DUmsBY2JCH2I9mwD\nrPHmSxOZJtaRnfcnqkn0VCQ8Vl3jfAQT3HRw+M0sCkmCg7LXOzw/T4Q2GD2J\nneXOMDLOgWLy3kHwBEVBgP+xRfDg7ggfsdhryri7QOo96KsQdopWmy8WvJlk\nc9q7lohMetroWy7zHVc71A9aUmeqFLgLDHK4SpHxgI5agoAqmstZLdnuVlor\ndz1RgexlMYgtFgrz7SyiKeZxVQER//QFkROLtlVvdDUMUSQJao+NSCa8yDhc\nml8m\r\n=GGxs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAPIOaYCzD9Zw0d9uf8Qo7vau419OIOT/iQUs7hxDSLIAiAR1k0zSRTUVyW5Y+4SAQ7rujEtlkrEAuaMYnyRBF0mDg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.4.3-9ece366.0_1564564336751_0.6781493229104227"},"_hasShrinkwrap":false},"0.5.0":{"name":"graphql-toolkit","version":"0.5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"9ece3662cbac7148188a80dd38b4270ba699662d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-tBgqyWPHI/Pgt+jp+uLZZy2EBCzjd6yWAu73oUlmrhgg7XM6f1ONotVHvIO2MK7j8khR+ex/cUe8FgpS1i845w==","shasum":"7371c21809898286b2a9e164b45469586cf64498","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.0.tgz","fileCount":259,"unpackedSize":366192,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQV3oCRA9TVsSAnZWagAAYoMP/A7rwS4wHbyuV1vuIWHi\naDJeIeRRpKtYjRE7IFqxYecQJKAfi16e5bVqUROypB71g0fdBjj8Z8kfFUvr\nlJh3PP9++CIFd1756ntbXOIMQbAVcYFZz2bEnsTa5SCh9csXXkWAYBrh0hFn\nFMxuKjgMpbtrqrhZa7YCa/KD0DbVbK7RO3Xb9IuGrEDpWJdg6KPhwSSKI20M\nxdc2Gg4L/aByzYgXf9EptLqJ8S4+sQ1Zt6DwCHvrBajv+R2elbIeLcwWMOd8\nT/nN36KgGrYEiBCB3ysRsTr12k35jzsFpS0TF2ar9gjk3wMxSUtwmIiz5V6w\nJ5h5NVwUACNeek5eoqiHhYJJ5vc4iJfcXe/OFlGzpHrNpSE7yzyYb9YRItx8\n4dUK9V0NE5khve3UWTGQBYFl6V8pNVTjAg52pJbPvYYQ2ZULwpdeP+5HuS6I\nPvVK3XwmNVG+/VxyI8Uc/TXIdPESyg+naEhIl0mE3oGt9i70GFnkqKbbEUtu\n+FBxnFlctxUTgl0Ev4A0LOzr+/KFQpRk38dh4FKTVHqnu4Jqk7+3ice5yBhr\nv4MPN+ppmV1Jr+IoEYitc9sojywx0YtDjxqs1gKyorrZrK3Ywc2qcvJIaC7L\nfhkbmbt9sM0nTEXJDMPVTgrhHsrC+h9mfXpvXDCV4pf/OxxrKS8Fv0iBISAx\nbhxy\r\n=7IuX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGEEDAqg+7IWUBIlnUA16b1Mxm1B5DO67DbChEzSnFjYAiEAhfYB3tctT7aQ4m7a23pe/QM1mvAXrGkmxHgncPEAJxE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"kamilkisiela","email":"kamil.kisiela@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.0_1564564967773_0.9191622293650537"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.1-8acfd65.0":{"name":"graphql-toolkit","version":"0.5.1-8acfd65.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"8acfd65a29b1f63c0519228ec6084e6d85d9d411","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-8acfd65.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-PSKAyDqHXlxaOicMRIxIxkMZbDsWpZt/xEFHCVn880C40jv6TEp58ld8MeLEnU50CFbHGpz6mmfrc1mNu7Rk2Q==","shasum":"4fe130e45d2684250349a96f0a663e9c1087b1ed","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-8acfd65.0.tgz","fileCount":258,"unpackedSize":389367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQV5GCRA9TVsSAnZWagAAbOYP/0xM7rKgzRRHup/O3Gfp\nTm4wVq5I6gDwouWBqpQlnJ5bN2ceBjU75vdOkge3EI+NHXsM2+92gOzbbUz5\no8ty0Os8qvu7jFe3k56VEfp2O9fYZAywO+d31PGbQim5vB741CobYqOeig+R\nMX43cZe1RzcRazJ5LaY2FpvRnUuG94q4kFnJJovJD61j+WCP578oIupzsMrJ\nMeQjl0Fz7Xtt4dX1nzRel4e608YyLVNQ1MaYUi4bpIo/graJ1xbnXuCgdvXP\n1oUlCfBpw0Mwqfz13k/Ad1CdPBawJjbHu2TqSlBA0yPOEh8O1ccEgGi4J4n6\nBUMf5JIcJduDQ9WqDcdqn+hHo2b2pyhomiTF7hiDTcHusXo3Vnp/x1ZXULMj\nhDeGpl75ysP57yUf7ssV6MBEiaE94IUizuLhE2Uou1PeY/SuNBymXjIytfeg\n0mxhtVUPcXACfDkr7RGNK+8QLzVY30RCTqcY38VLI6v9WdBdIjpjyFlxrk/A\nTr1vO6r/09dI7k/GmfyM+LGQ/2yUGPEcYzMzYN+qscNWnnA1ci41JiTyCGgD\nbKjeNVJxcVn7cFcYF/IYKqfZ5cwNchaqigzq8DfHVAdlEEUtWvF3dXD1GY1A\nJNFMZYLWVqUWJrsku/PfrrQ81VE+ehVK/DbF6OUOyGM3dcR/FZoUq3TXgbxK\nBghm\r\n=0nIv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBVMDcq710IfS2VC+SqFXdjeT0Kp+98/vG1kuS0P7cVXAiA9r40xg+EJ8Z+Ut2S/wHGIHdtILBb7tocgKym1cbUBRw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-8acfd65.0_1564565061102_0.6778502704050788"},"_hasShrinkwrap":false},"0.5.1-1e5f8ac.0":{"name":"graphql-toolkit","version":"0.5.1-1e5f8ac.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.13","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1e5f8aca2477887cde670b48897c1b5e1288c1d5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-1e5f8ac.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-9ZljY7IEn6rtukV93tXHH0QOi/WOolhdAF43AZI9jyC5miTZMKpIHbIsiVQ9i7eo9QSfvfBP1+8CyKWeSgRScw==","shasum":"f2fd799ff8525da7ef2a1404d182b654a5a19b81","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-1e5f8ac.0.tgz","fileCount":258,"unpackedSize":389393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQV8ACRA9TVsSAnZWagAAbhUP/1d5oce0GY6bSSBykq3i\nKIw5T8TEmXmznGThd0Gp1VzDpsXaURGBY1bDOctUlSWs/e8n/MJHgJgVp7EU\n/Oo1n/Xl1cTqt/pv+hcSpvM8wQ0/AfrhgOfRtBtQPnK82P0Gn1RWEG0xm2uq\n/fkU57kI2rPK5XTf/N6wRDly3Nl0NMAH31ELIdvon4BMXpjlG5OrzFZ1bMjD\n5quHr2ekfDM3PeImwzFvaJ9iZVCm6bQwXVbV71LSNOyDL8+yW0P6mLwCjErc\nutINioNMcdXpVydJ9EvQCFHW/rxUZ/D5sh8O2lPwBEBYa2J2WeA5uUwJme02\nkC7sL1bAtkUrDd2q71EVEbYvqQd/eZd+uoa3mVDy21/J4WWgNN83xyf+PC1U\n+D7b12vblbNtj3rgUSqjvvkSf3zJLa3dGhgh4GFKHWEBNxjJZhJUxbzv/eLV\n/6jcHYEU28o6zYbLCVnq3HFJHYGbN4zSnpYNCvAhKLoVmloNj3mv8vDujCyl\nwgw713UIuiKMshAXs5WECkdL0ohqdA2s5oNExKbHVrWmgLsd/duLnQwvClxZ\nyYfVhcIc+NEKIwpTmd3ce6Z0xqy0BiK3qyAzFB2P58he8MFOCh2EFORBAVGx\nFAA4obQFvQtKm2U08h4o7ZsVY9wK1VB+yy07oGKkjon0Iu5jwGkBXGAJ1CLk\nT6z7\r\n=PL6K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLf51BulFLUDIFf38WbfQsH+QQQgDdPm3uBQzTO+qFXAIgKz6ZNQq35h53c4EO3UJqw6k7cNdKnwIf6lhoKkR97qs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-1e5f8ac.0_1564565246074_0.9094985662334036"},"_hasShrinkwrap":false},"0.5.1-a6d4926.0":{"name":"graphql-toolkit","version":"0.5.1-a6d4926.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"a6d4926b799e1d923c323e6d61a889893b4f9e39","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-a6d4926.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-EJVXppTKQtKzQ94LjMQ/hvNuHdtT0sl5TtxXv9Ra8eBKoflX2K4rSfsTCXS4AcWLBtlWuxsi9hsU3uF3GhqXNw==","shasum":"b825467bb8acd78bbdd0ff0ca1f2b1d75b1a2223","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-a6d4926.0.tgz","fileCount":258,"unpackedSize":389339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQc3ZCRA9TVsSAnZWagAAzhwP/Rc1Io226sobB1HGE/19\nSNRTuLNTH8SvmwDFBO0T020e+LqBLHI/0EoWe4AqXA4P53CKjfAOu5nlyieW\n4+IX3qd27McOtDXENI5UdZ3pCAfXrNSYJ7R1N+6xcTzEf9bHU2X9ROoBpOhX\nzp8NV+jNcYKGQinLoUBFYBL+fMP4I6eZ938TZ0rtm/USGIq+h6JHKTd2uCxJ\nTUW1neMt3TLJUNggO5rHlEiT4xRNn7qanessdB9nDMeml8iOQbEP0ccTRJX5\n+Nliaw5r2uAVB1ry5j9yrRf/EqaFWgMhWrVKNFEDR9tMO2nrgwhwFziFhgio\nagWDuiwwIwbTXWnSEsFWMoXzXUSAeEd77W/8F7Z8rINHpQ1v6GZrKUv4e5CE\nqCYKshwoK3DasQK5LLL1lmYl9mBruFR2A3DsLThpZTQqZt9uIHcPhWC9ets4\ntcvR5ouoN+lFiPawjz0l/JlvaSgeHV8LZ0aiG74UjJx1C2z7I/As/WFH3MBy\nHOCdZaAARKRSSiDdQUqVesj7NaW96GSU5ow+MQeRbXDRUvthYSPqDqCiONPc\nL76UlEeCH7e73uu1K+bK/SWHZ30YVRMTMylEoshXh6ge1qLbaHxxOixyY5tb\n5Ed5UwOLUimz7toz67E4VCRX03fX0VwJFRBLmf1kNaaMZgMecJnTx3Dye8HB\nDSVf\r\n=JKfJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDP6L7GK9aob3RL6T9nEQiDY9YZYUsNOVyNvNUnR7qdeQIgDjXHJAAeV6v+BirDQbIMc5A9lShPFbA45dARPpffWF0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-a6d4926.0_1564593624766_0.26425929574247586"},"_hasShrinkwrap":false},"0.5.1-bb497e4.0":{"name":"graphql-toolkit","version":"0.5.1-bb497e4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"bb497e496708db802006e4c889a9c79c11a4cecd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-bb497e4.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-l+4WBvZ7oJafoM7KRWrYuk3SJlr0BsBycsxjJPlOQRrjdevwq4UFWf3nH0Fz6bumc9PQRuIvj+4IYwSC5sCMSg==","shasum":"7f4d1dbe4041207d4accc7d0ec62bb9d2d51f328","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-bb497e4.0.tgz","fileCount":258,"unpackedSize":389405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQf90CRA9TVsSAnZWagAAcLIP/R+1cjaVOnA1MB+6XfWh\nF6eIRz8Ka5rmQ6TyEItTclBgE5IrXI/R6wwS1XSySr03ML27kEbwg4x6ibhs\nQ4TDsYmqhZM8/btmwTpWBOI2q7JrHdLgYgu39LntYIsh4OisNpf5s4xW/g7r\nPDlLj+DEZFsZBvkUH6vG2k+cV9lQmepQre1KSXnKN0QxzA7OgPDLx5FYnTgq\nl8Tj/pVtimJCTPCdcUMFxLcHHInL2kFqz9QZiwTuuBNulbEY9wf1E8XyvvjM\nlyfWcoxkFAwJdx+bstj3UIk50gyXRVDp6dpnW2Bx4xM77qhZnBkLUVMOxkPX\nOJ+vDBwvWxDB43haROeRb+Kv/57zG6xeLL2BJ9oo1wZHWkrBJk5HnReV4T/K\nEk1BWAeRZQfzOmVuYDZ0+CVnUROkLVSlOXytNuKtiGZYHqu1s6Re/PDLTZBx\nMKFsAQW2CZHD1Blb2VbEbVweUlvkc8xcmJaUcG3Am0OhsWnhBQiVMd/RdGsO\nF+dQcUOo3iy8QHDlNVnKcug7wUxLBSbEBtTiXAt9/TllqOIHQfmYSNpaGajK\nSTTL/Ki8gwhoQ8dF/uZaC++xxhDnNTFp47ZNQV33XXgcdRGGJHwxduUX24+C\nqkF7aAGw5STqbkiDolNcDDyyEiwanMqH1PeI2JsSusQi5NF3s0uApqAEXKIe\ntbkz\r\n=y7O4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGavChKA/vhNWKbT8WrE4c6gnGO8YrOy7+L7YxpPA3/AAiB78T4SzZkU+6jLg8OEh0z9noB3WAy7Krj+TBUleDi6WQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-bb497e4.0_1564606323642_0.3565663775771266"},"_hasShrinkwrap":false},"0.5.1-16e40ea.0":{"name":"graphql-toolkit","version":"0.5.1-16e40ea.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/node":"10.14.14","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","tslib":"1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"16e40ea3f0ed0d516c07c734cf3e9e666ba40b75","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-16e40ea.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-fZhP/iiMcs7SWjANRPi/tBO0y1CInyVXEHzyCiCgmAci4gKr9YdZpV3zrA9yaP+nG10X2hqoOvOoqyR8DN08yw==","shasum":"5446e1bb5ef4329da3cd07174f97180d4c4d34a7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-16e40ea.0.tgz","fileCount":270,"unpackedSize":423596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQgAxCRA9TVsSAnZWagAA3qoP/ij8Z/1OgLM50ucW9s7G\nVRc7tDUqKLHkQJxvZISO2BWVD0lKMzL9yrxMjYkZPySKC2gFMSp6sSV0gB+z\nL/AmXxD/e1tt2Arzd3qSrmfJ82zAYIa9z6LptslQSCkioKG4ApPxP0QVIszZ\nbvVoYvYmwgEOOCp5SnLZw1fgcb94pbaegml9KoxoPIYEN1e0Ifcr5SgSO8EZ\nyjZ/3IYvblv1Vx8ihOoEJ0re/nT58art5VCuemp9N5/XdsBv37ED/ugguca7\nczWzLSho27oopI6KprbeA0j4GSkZwBGwqSyi0rMnwI1puhClAQZDYj3XFNs9\nMBZJi+93sOSTuJ/7DHuxtHQmYArDeEoKQxOGO/yVNlHQDoLi7KyoqoQCxvn8\nCrMIOYl747a1gFLE1U3GVQu2a6FJbrJbxa5XnH1yqJQHn38E7eOa81b+Au9P\noIZrjj1iiRX5bJUUA99AiIMSnb0XzvnShqZZt6szWVRdBD0N2gvadK9O6FPw\n6yOluTji/xm1Rd3uK7XaQLrJxQ5cmyShcykNNSMLLmiLljKiIMJlruRYmTTV\nHBep8R/2R+CZtLYFajDN2/pqELzFUBq6Mv3oinE8w5/lD4fYYUdNhUdkq2DO\n3m4EcNGz2U0LRaTm7mearLuJcJpkHdYvKB1gslJYtPTqz0Bkhf+h1YrUZf6V\nnkFN\r\n=1YXl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+biLrD7m8UdlQQN8iwymgKS8wrKzDKuATtdL8k8jW+AiEA6KarxsOxoWDKlzB65YGiCZTn4Q34Ra7ten2xEInX/Wo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-16e40ea.0_1564606512008_0.8053264330215297"},"_hasShrinkwrap":false},"0.5.1-62be67b.0":{"name":"graphql-toolkit","version":"0.5.1-62be67b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"62be67bdd3f1cdd3f0f2d972505b5adb44d1f2c0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-62be67b.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-WAWtHQ83sHKW6+cy0u0AvtvqffBgUF9zWyd7QtVA8IqiQoRVVJ9fgn+5qJelgcwVKp17LkORA9NgE2w6Pe7Z1w==","shasum":"df510f50e7ab53e2f7718d97f710df48cb40b76e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-62be67b.0.tgz","fileCount":258,"unpackedSize":389398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQwjACRA9TVsSAnZWagAA9bEQAKENiQBvDt7PbX+nP7cp\nlDet9kPFlK1Hx4J6QsbHjWHeKLXVKjwCHEnWyLDBzMxnTL09hPo3CjFseWDa\nH+1qgsDz3G9pmBfi7G/LA4JJJuB/OXu+ZYuGCmV7sC8v8aRQYAI7me2foE+h\nM71PYnbSyjie4hMTMDLxFGea3kxrTSmrqT9CIgIGrmFETZBo2DbSDwpxhCKi\nTeIgUgkvI1vyQeYBdhfKGnsrJqlu+90YsqHudahdmqcvFereD3CJYasOeYBb\n5CASbd4v1Y5AdyQ+i6Uc7O7aYJA5poojiSqsLEPUOaVtOLD9nDgjRDUNc4Je\nHQlqYzjyvK7JLWFHq/wqYoYEFmJUT/HtT3JwtLiYCo1gP1q/46gYYmaMnjZg\nzaQrkvplc88hYbcBy17XV+/boPeQDq+pWDRydFUtQVb/r0nQurdnGj/lh0Oa\nq3xjTfbEwK4DqB9MqRnuPGO0lSOdW/QZai/3jrDF7p7cO+gjTDV7lFsKiNQq\nRaqN6LGe5nhRkaAJCaoHHWOOurZV6PcvvFM2IIgpADS34MYNt5m2tvFSXivK\n5RvZ/qDzUC4OT7lil52PJHQRcjMp4cehb8u0BwqBgZ70+3GxIQUy5FQxZNNe\nQqYdG7c0ZctSfTAHssWXzmQFINtA6Fw80jcCjKBPVWKFQ/tCjMvR4hf3ZLLm\nS1dA\r\n=a/gc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAzBFdYz3/4zqTpnkBelmn9vWGYHRnpZ4lwNULQHR/MgIhAI6SUzAMs205yxfBrN94JTLXz5g0Ds7kl3rHJ5XnHrlP"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-62be67b.0_1564674239522_0.19874604154059128"},"_hasShrinkwrap":false},"0.5.1-605bc7a.0":{"name":"graphql-toolkit","version":"0.5.1-605bc7a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"605bc7a0db577bf67bb0046c3a4dfff2a138bcd9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-605bc7a.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-euq2w9L+FotJfmBrpU8xYWMgNKmYHhZ6Ath1fu3ZDdVeWjzBXvQdgwwt1vl80w7MsQ+i2izKlz8aw0+37bjcRg==","shasum":"fea63b5e85961a6f7cab1721ef3c36d154a716f3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-605bc7a.0.tgz","fileCount":258,"unpackedSize":389379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQw1ECRA9TVsSAnZWagAAtCQP/1LjD8P1jgGIHsF97gut\n90LqP74lO5AiCp/95leRTwO/TNmnXpJ+GxqilLCru40Mk34wEDZMIfxYJvqp\nu0DUQKvamt2jWwCRmW6OqIZu9v3iBazlvXDiCzJxhHdrrWNiqClWY2aVzBxW\nFrA6U9RLz9mjjI7t0l0x/mu23siSMElR/NabpvC1W8xi+vttLgGxdTdq8vXk\ny0MpTgoKmxnJC78AjLjDKW01aw0dQsmRIcrmEWJ9XMp0MHtggU2NjULrqsX+\nAturZNjexFb3rfCNJNReCCLoyxRpMn/4a1pp6UoMZtkAdUij/9kziwsslHEm\n9Xwm5E+e5CMtLdbQm0OFEeNRX6tSpLC/pLYX15q7FPSoQHrxbv7CYABjzmcN\nzvJ1UHIo9rM6lpJOXlb2nZgj3IxjgMv/vIU7rjgzAVGHoFpXIkfi3WGg4yWp\nPVfk9frI0zwlQ/RR2qTG2ejilcHSEjF0JyhvNWO9py5+KgzQJiGbkfcPLtU0\nPlgpvGnoDe8nBTPcdBWbHA09UX5QMRyMROweO34+Msh76NGHuuRP2SEoOga/\nzDqTyiJQGFrgWpwe17u0iHmktNhpqwtPOA9+eRsGMNzD2llOa+TblslYcCCC\n1jEE8ObiSxUkaOZaODpRwF97Xi4+9U464dsdlqz6eAY5VnTeqJIroQmsjVXH\n4zKb\r\n=Ssj6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCugphQby4m17gHI3a5E5v0a5W5ybmK4GJGm4dudP7vawIhAM1J1OAMS29/8ZGhhtLj3ag+ovXLBgKYma5eiLsdJkR6"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-605bc7a.0_1564675395448_0.9650070974222782"},"_hasShrinkwrap":false},"0.5.1-c3d0729.0":{"name":"graphql-toolkit","version":"0.5.1-c3d0729.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"c3d0729b321b04507472d23a9e473dea258c32d7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-c3d0729.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-olpgAW0YIMllFdnV+w83SfXH6Q5xClf37s0TXHGYqNX+l2LnhoDoD2+sBVIXdVt0/6vA81Ksvp0Yem4I6nJ7rw==","shasum":"e8851949c0c0e2b83dc3dda8be8171664c4a8ad6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-c3d0729.0.tgz","fileCount":258,"unpackedSize":390109,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRDBJCRA9TVsSAnZWagAAggIQAI0CrhlgCASOTAfqEKTh\nB1SoTg/pHpBbnjc1lJw3rfJAt+Ndn3Qu2nmIeE/AG7Cz4dJw8z3FSOZnODuj\nZ8rSyB3jlPEFPV9HvoLDnfM7Rz5pX1Huqokbs9RBPx8PrTuRl7jLccfdsOJB\njT0MSRSBUVkiS+26YOhg1L8nra20qfQzxNaG3ZnAyfjKulXrXFUaaQxKBnvP\nittm1VMM7QBYOrgj9BH2qetNibCODos+qvcySHqVUAb5Yxq3q0PYiyqrYSa/\nueIqCNQgp40U+fefRl5inFdMPIBpiWi0z8gVoKGnWgDhZeQv7bgs6qraQMGU\nAbFZHAkSXZTtcVhQprx4KXcQWgTyIZilPaJWnpmXsIoOBXR8X9rs3G8tN3yu\n4qT7oT8NKjCGcfuiiVotHbY9BFyyUugpZHprHI+unKCX7cWcPUgaJ/9DNEp1\nStYv8NOesUA3fbC/JGAFQ+Yco6JRI/Y6uxQYFSa02mEZnt9BtPbWnefjV4mC\nO9loWaB9Q29MYd1pEyntZUdj88/ZY+djeacsy8cSApu2N9VudL6xOHAfD2CO\njw/vexfTpkm3UML/ZA3KcAPNHXQuM8KSZuMKFh+BYX0jNUfo0Fza+rKRDE23\nWLRFImJMxojv9ul2pu8zK1GToNXStdugadKUdyVCMj7wh5f3yk3KOTri2EnS\ndB1I\r\n=Mgz8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFAjxSvJOWQ1YpDz9mVoO8W+Nm+nU1aJwRkizivJlNPCAiEAvnh6w0dK7U6KP2fNVnux85JpVaYOi/SnE+jjgNe/LWg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-c3d0729.0_1564749896974_0.5097792099721989"},"_hasShrinkwrap":false},"0.5.1-70213dd.0":{"name":"graphql-toolkit","version":"0.5.1-70213dd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"70213ddbb23bd0191432a2150fa874ef41d83925","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-70213dd.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-HI1eoFPRkC78W7zOVgdITn3jqpXHT6L2vltUbF35YFSS/d8X0FdkpYYO7E7LPHmqapgYKBgqM4onuMfw2Rm0og==","shasum":"e968b7ae47ee9533c14372bcce71eedc355e8bfb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-70213dd.0.tgz","fileCount":258,"unpackedSize":389368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRDCICRA9TVsSAnZWagAAJKMP/3/oO603ZE06+uulAX85\nqXLNh3g7in//V0KQBZuGQ9KjPI/cUqjsSyQpVwi58WESkwtAn8U6BHaDoQb4\n7A/mXK5O7vMdSlesxsk/3lPM0nN9AU7Unmli3dQE7u3r6tL4X+GE7MKr6aI6\n2dw5NMlHQ4aKuFU2Ff2zifd9RRZL0iyjnoaX0nA/UcVlLopRFzcq6RNEIrc3\nEq5T7PTxEw93YLkqr+/+IEQeYj9IV4KnvDdyypJySEtv9hy2CglLiN6qe+Lo\nw1IzaAgvQAKjxx+3Zr8CA/BzUB6XS8o0EkIYXePtpBk9y0Zh+vTbK3Vemy4T\ngiHD0K9krsmvY1PyLcBDEcfky9mB/Pq98jP3dn3QwTvqPhFxHUkGLe77bes+\nUIHry6Cab8TaJBuJmnvjOcZRpEKzaw+8i4xdqX8kcRbFASob+zlr/A0mAMRC\nAEs2pRr9ysMt6jGKKSFuwLcTiEwrc/nDqHgeOoFYop2J6EvqfuRkMHR1s+1B\n1B3bXgj33fJEpNfSmX5r9IduIT/7557RKwUZAjypaJVKQJqgphTM4WgiNAzI\nTdIYNmCwjJbYrm4IL34lPRa+8cxIFmrDl5+3LcjgFG3AlSZFYuTbHZ0VZV+m\nyBjZr3I8NnPLHlF4+DT7axRd5HeNNnW4jKPASgcAguKHG61bowST4r5VLnge\nKjvt\r\n=PoMj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBRfp0YKDLcsTjjSfXkDzSP8LIw4FhD+DkijQHioc1SuAiEA2/q9IAVQXJq0byGTuDG7/BjfPy95MtxcmysrhCEpwCc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-70213dd.0_1564749960061_0.008061283116418627"},"_hasShrinkwrap":false},"0.5.1":{"name":"graphql-toolkit","version":"0.5.1","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"6a75bdc264cb7971e6e53e09bbba0883f70b122f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-erzqKVlGh7DlvNvzT1oDPe+DrOqg/qu23xU7u/YoNYq5ifv0QzrXTSNZfAP0fzHirVAB7wr3GZOJNzynvbk8ZQ==","shasum":"95bbeb9765293331285f15658d5f95080f212478","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1.tgz","fileCount":259,"unpackedSize":366928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRDCyCRA9TVsSAnZWagAAtPsP/R8hR10NnremaHnEpUl+\n9mSIChHRS6A+dyB0FMGwAzIurEOGAALFLecHbAU8iSlwk8BCLnbRlzeTs0dT\nHDN4oC6zEe1gWKed09hMwZ4mShuTn731aVIt/uGum5hy4Sd2BQEVHop5kTjO\nhlr1jxa1BZdd7xipepV7dI3Poee5hUikrfBgPaaEgVOgRjxTNjfNdz9YjNEm\n9wYSVQh2CFcpNY/5BmXpmISnZFLHNfvSATZUcvdeD8Qx1402c6oCDUubBPD4\nCi8zhPb4Y7MJB6smCOSBp9Wx7Hf3hClMkUMb88VLhXplI0E3qPMkFF64vH8/\nLYOxdBmdE6YKzcJrroE6Nexq1Dk23I79897ddRcqE09vNjYlJuYjDTVo0jgF\n4NAZFvD6fk6mgnEvvEH6qx377XHsL+bdhyIDLV1I8wbRmCVfvPS6zZmaVh8K\nTwUGjL6XzdYXRkrfR3fnm/8paRMlrS2S4yiE4v4WvPIOWhDtlWGCiJ6kIG5T\n5VHDx8zkQ0vKP4tBzdnqg/d3O8SAWKwEWBsVaFJUSH/aZJkoVmjiSnXgWJYZ\nDFmIuMtYdBmjjRrKRKSL10d0ErEAlaU8I76pUSOHHMIsHyYiJVcSHxnS5zYh\nF3iXu832w9uZ8ZwaHjAaugpjmty8lD8rsU+V8x8dZCEb4mykIhKel/npxlFh\nulhM\r\n=Er3E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNez3Sb3ebhQHWvAirPrROenU0TTauc//gsU4beUL35AiAb/BSAPu3u0ME1WmYzNMMmjKtyRzRcyB3FoETRe9TLLA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"kamilkisiela","email":"kamil.kisiela@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1_1564750000845_0.3869597213493243"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.1-6a75bdc.0":{"name":"graphql-toolkit","version":"0.5.1-6a75bdc.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"6a75bdc264cb7971e6e53e09bbba0883f70b122f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.1-6a75bdc.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-+dEIdT5uv2ZVRJie3ErKv0rrJk/4fvw1IuOBVYJFEme1obnOe14zVn/nsDL+naMlDtYM8X/jBsMgZjiaWrR5Fw==","shasum":"e4851350851602f80825f7facf1013cfec27addd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.1-6a75bdc.0.tgz","fileCount":258,"unpackedSize":390133,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRDDJCRA9TVsSAnZWagAAHAMP/0KldTufr+PclEDBcisV\n8D1dBwe4pShHKT/MYpfmdOj0dI/A6/3JFMQ6btOGAyTIb+dCqihZ+6SIR2NA\ndI+33kMxRo32IlKujXu+bG5CWFQ5XT6rfF4k3oHsnlFD9zirbL3GP9tRDk6z\nvuwiJUq7AMLrIpEkO8FruyG6rJFkssS+vT9bZ8DcB7Il7A5Efarsj+F8nayc\n74oj9l3l6C8CJn6c0/MUawAIrdl7ldBZt9QhJNXGMVo1jowgoVFJ9u6HfOWH\nRncSgjcVuyPswmhmlprPxyFdSoeXV2OYmUiWcv1PNrpWyhnylIJlTGzCAJsN\nr0dH4qnbV+YqAXY/IZLX7atqAb7o2+72DxnWOV64096Ran5DD/h4OXdN7pns\noqoxLZG78p/Ne8zOICK271erlV/GiC3GE0ArC3dSIc2NyoKh/mDsxEhwU0s1\ncFL26e/umCCAzwMvfMTxkBeOjyZHOD4+LdlsfqT0oIdG0rI/kwhGQ89FqbpX\nWQr7BWrO5iqLv3qxG5BtO7bVAZWNl5Nh6LXMOI3U4kNR9NMgOtyqlVb/RFby\nKmvtrusZaylmoaxTUSdeC4obSqJs3e1wd3vM/AKXN5rbTU0Ljrs+S10m4SQa\n721SUAQ7GdXSNzZZoNLULOWCUq/k5LNRm0ruuNJUGsdlCdQ3vKizidkGwdCU\nBiLg\r\n=BZmZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCX3OyxCUHAZf3S/rxbyMFHIU1vHVK3DVYje4gwR2yPowIgValNjly4XW+h67JTIaIoYmMmx666sCoD+aAXl2zY92o="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.1-6a75bdc.0_1564750024377_0.670051252250885"},"_hasShrinkwrap":false},"0.5.2-1a3b5b8.0":{"name":"graphql-toolkit","version":"0.5.2-1a3b5b8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"1a3b5b831f13e242624d8da936fb0e05276df975","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.2-1a3b5b8.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-rCKhU7E7CkaVUu5GMkYVVwo911yEmzw8dp9bZEh4rXKBBoM+Q3QkdhfMNt+8splwKHixloXkETHGn0BL3XmUwg==","shasum":"094a87388c699bac9c6774da31da117df09130f2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.2-1a3b5b8.0.tgz","fileCount":258,"unpackedSize":390139,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRDELCRA9TVsSAnZWagAAvSIP/jXUAadas/HHUTY1z39P\n10rOMMIHXtkkyEJ8OPjD2A9wQe9e86lr7d6H92FKa/VBObEPG9dctIFqSB1T\nZO2LzZaMheMNyaGYjwqqXo758QsjrnnPjSbcLbsU5R0m9Vs/2uiQnoc/ZuHs\nzqA1X3bnVYshfM/7YSvXL+F4E0tbuoz/WT9DyympKJp0SONI1+Ft+7kqo4G0\nzlhTVgPWrOaNEQ68FadM54AOuxOx00Xb8rtIa7N5rr5MBHgdst9S2nhwhb8M\nZqL6KplOZEpze3z7/n1V/nADcC69H+tDK8uO1QV8bl+c/fwJ/EZAoxOMha5m\nVrxw78jjcn7JOLgUtMOvr3kRBZiQSMAzD8Ox+zrWoomrtrtcSE82LHYrNCz+\n4AEg/IKRE0Azuk37AhQ0LPHSgXeD8cGwsnBcLcqwaYt4l9OaLjQyG8GBAG9Q\nQSPgM1ijd3OLuAy4O53KOe3Fy3HG6SPkKYQWWUF6yf/W8hQX+8A/WFolOf7q\nFSZjtUYVCivtj/2rFtJRzZ/MAfNOdbWd9HtKtue8uD8rvJSj4k0Y9cxgQ9cK\nEL0e5ZxnJ8QVOTd9WPjGA0jVOPkP46UO40rLyuv6PIYCgcQSerZ2H9796X/D\nVCMIN8N3mszosxB8oHiLykBZIDk4I4CCOkNIYGRpX9gLKBkU+slyjCUE3qwR\nh2cc\r\n=PoFT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAw1ij5PxtLfZ4T+6oh5tSVPPjWnEWLb0K2KbApX/KEyAiEA/v9GghwDADRFAVECIGPEmkhxirx7P5Wyd9/FxDnT1HU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.2-1a3b5b8.0_1564750090935_0.15243554154586336"},"_hasShrinkwrap":false},"0.5.2-5eae031.0":{"name":"graphql-toolkit","version":"0.5.2-5eae031.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","glob":"7.1.4","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5eae031413c32de68efd165f079f58b444074f70","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.2-5eae031.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-HLMpDxbdZBLR0992IfR1GgANHG01wHzze6X80vgbkRicrS3QOravtRBqc+QdF5abMFENs49TYtYHL1QsfVukTg==","shasum":"32b7dbb0565a5a4f6923be6027861fb23443ccdb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.2-5eae031.0.tgz","fileCount":258,"unpackedSize":390079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRIriCRA9TVsSAnZWagAA00gP/31vvzA1gAmiYyMou17L\nM1I4s9iWnzZmrjyXwaOP4NAfkfxXFUfpeXk0+4Rs2YMZIrh7sMbD7wXJwqjy\nX3pHF0jpkzfTqUte9gE/AD+BXG85IbiReLMIXMRI/fGukoXj/Tsxwsi4JX5D\nsjmdr3kerQ6XThKhHIW42rvoS1ryMvMLXkMUjlCitOSifd1zyfUc8dR9J26a\ne6qu6+zptIiU/kUJ5UUjt+ktAcVN8iLKJEewVYY3m0uo7eR795UL5yEmid0q\nllLSJBnFp3x6hNnT5M/Yyo7W47ZdCx54spjqohjvySyqrwhM+VSNj5dETHR0\nrJ1YAVuI9icQ6OyK1XF7wg4VG/xb9XYRy9aAtuEhO+RBvrLnR6STzVCYX2Tl\nEyymRXBql4PXg9B3XTwklei4xQFFFegkww6JMKHIpIfHyVEUCUkUiQaUc9H8\n/W/E2TCOD2BzqyefG1SrMdNL6IowaLjJw0llTYHTyWtAA1P2ShjMALxU/dTu\nxVhH2BrCha+l2/gASD3OxdzLGCTPl5nMnCJfXC1Vw0vL1pff9FveUC/bz96b\nN160e8Ain6tAmfsnHpCtCpPE+a5FTcu4N3pTT3UqE0gyreW+P2mdOBfnCt7j\n5CM28fNPED8VjRF3BGSx0fFGxxjvA+NTlTA/p6T7J47cPImzt4rgpAOXPpee\nfhsZ\r\n=lPk8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHxxfqwbsZs1PHsIvpj1I4pjyYOuZtxrGqFOr1dcLwSXAiEAtCriqAI5Af33ExyKE6/izM0sLF8QXkOC3v7lZM/374M="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.2-5eae031.0_1564773089623_0.309632511555181"},"_hasShrinkwrap":false},"0.5.2-7b08294.0":{"name":"graphql-toolkit","version":"0.5.2-7b08294.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"7b082942f0ae09afbecf99fca18a06570b72f561","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.2-7b08294.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-W520Hu8vIFPUT4fiNR9ifEGoGaKmMuzrPjbCzduYEst4YnHF62uK+YvnmdU7cnA9Jo2PBnRcT+Ios524NfVljw==","shasum":"c8d56d44b7ea745a1b0547049bb502d16669ea05","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.2-7b08294.0.tgz","fileCount":258,"unpackedSize":392878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRn96CRA9TVsSAnZWagAA1vQP/2oK5FJfF7ijknl0fpF0\nBcPNyVZJs+jo83Gn02O4ikYnW366DUdda4kdVxOKmdH2IFFOV4MwSAubUDSD\nm7nfUZGFLDy0YPvFYKc2lTQvnAnoX+dYQ+nCw45rg+XaSFfYedSBjev7jm5/\nmILzPUhKTrZFiLFF1mfhjqVv05t+A6ktXyfmhvD8ui7KCIJ/r4j54mut6Me3\nU8LV3C3pLL6ayvAGLR7rSzUMHAr3XQS1mNsym30P2Ltx4xU6XP6qkeFAq8E0\nAlbJu6hDdu/41yA7Sc1qdD7XyxFiow23HxYMH/rv+nx4PLyleWkx+Tv1zaj/\nAdDiYLNtcP4ivJK/Jzr5uuTmTHztd8LihIm6ILgxVoUImliTQeHsxxzJVJaY\nnBwsaFDFL3P2H7m6T8AJRie7KZBCqeXaliV/16v1WlybeV2AaYLrZHf9iR8U\nSUUWv12GirXssnZ19H37NrcUw3enFc1orOjZjrFtbiTPKdYADImYdlcisWfV\nlOWfeK4xIDgDS0w+Mn7+GA8TQ6fG57yQdJC7LeMYBepNUibpT/RcYUvLnXIH\nye1iPo7xnj5dd6OSafgDPbWWxV8wa6ivuWUJMFHIyVKXM66ZkG6EdWRE1quw\nMAvAYNcncQrm4xAWDiX3QjhfBErDWIUOje4w4wsvwxFNf7df/b06NfUuCFBe\nGXFd\r\n=ivU2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDiTCiKgjxNULjEDpcH6sXsSj5D05XuanbZkLMnCbMG0AiEA/GxX54db2t4UsvwktPJ4H5jjVBZtHZ7NJgpxito1mAY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.2-7b08294.0_1564901241778_0.5713103523919887"},"_hasShrinkwrap":false},"0.5.2":{"name":"graphql-toolkit","version":"0.5.2","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"d9b548daea82e420d6e7ef43183d3c71e96a86f1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.2","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-6RNWfa2Ohhticzcbxuh9zqp/hpQ02CK84RcjI6ShDsVz15NGVP95OGhyo50kIOj8LHljk/b4rdq+tUQQDYc8Ew==","shasum":"19fc0dd042c463465f1b33e74de8a7506ba2d88f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.2.tgz","fileCount":265,"unpackedSize":400506,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRn/XCRA9TVsSAnZWagAAlv4P/1HzoHCzNuFi9mKDerrH\npvQ36zSk/eBhAD/DzuFOj3nMd6wP32B03OQZb1m085M+p6b6Au2bTPUmvCHm\nGwJ8t0+84iTsOPra/5ww73r1v5WTpuoUk/lUmCBe9yhVotBPFb/3sPjFCmRu\n1g/inNBpPl/Cb0EBuKCZsUrBljXv4dXbGJZvrg6AzXL9ldd2GKnx8tMjNkzs\n7V3kkZaJci4M9g/uJWVM3bBANp7c/HL+8tihF+0e3rmVM+bt/t4mUpty7zDw\nxax9Ai5n2RQg8mkKA/3BpR2rjhezIHnwOHIEHHDE6S45ERroQgP3B+AXltTs\nQ8ghIVpvzMrsaHdkEPAavJS7zRN7IBobRkVCH7wa4E1/a4MFzUpZa2QtP5iZ\nzQTD3WaZvNwvKsxnTWUnGg11soxtUs2K2JvL6gfteXh44axto1/LzhYoVQwB\nqamNA1rgv73ydAFOvvtUz/XC0m4IuYIO2S71PmHueNm8MqjfCGKXt39+3X5I\nFUA39wByE783GVPh1EsXYpyr7oBno+qHrSiCQg6ujAHdYDiFAVbvtKxZG9Va\nyMWM+bwJ/5n8GJHIL8kUe9tSQle6ycycB8GsWZXygv4mMOydlcajOXKV9a0l\nrUwRNDDBkNQfx6e8e4eSz18d4RYTRsFhIjVQU4Q9SxsodG9/knAa6PF1MrOe\nZCaA\r\n=mkgU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBVjz4HBRGLdlJ69wUXwclUcuNguMS7Xexx7o98p5pyfAiEAk9bxBqPfDoDBHzhRIsBszU2vyKDt0h4eXn33J0wlyS4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.2_1564901335178_0.1605330150647153"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.2-d9b548d.0":{"name":"graphql-toolkit","version":"0.5.2-d9b548d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"d9b548daea82e420d6e7ef43183d3c71e96a86f1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.2-d9b548d.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-74wvBrPDsJsOi/iaIPFac07Uh6HvNW+fYWfGxHntGQxitITfBu4Hju/Yqbz4PvdnPVufHNpZ803OfnaxhtkdUw==","shasum":"14a778a3bbd43da4351aa5963c4e292cd678cea0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.2-d9b548d.0.tgz","fileCount":258,"unpackedSize":392871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRoATCRA9TVsSAnZWagAAZKAP/iykcyxezQM9vWzsWKV+\n/cHloygPyAB2BESaRz7JtpHIywAKnaVkFLQ9Kw3ku/8MYAtvTnXDJpSP5jaQ\nvO6u6MMzjFC/1dVchm1GgR2Qq0F+LChBiuGR+dF83kXF16HLfUpUTYuMhtRN\nvCYUJbxs0V100vzOKwveQ+9NUIcm/+sY867+aMfjzGZKrOZyYW+dxRfjmiQZ\nDQ/1nyQYP6IWXcBW/CoiaPGPEuyJ3iE62M7bYF6lQP+FBokAArKNN4XWiGoF\nslWTgGVzyZWuaLM9Pzu0134JINEMdhbR8SjJAztfqrmgNk8PW/sU4YO+7xbb\nUXT2cKORywS1lBzisT3RMCLe0frTWyZ+s4ipjH7RhWI/xl5ZVL4lyg19al+4\nxWtulwvlorYWBN/7twJDGvMLszE1s50VIgVuw2a15SKM5uhOSZsc/fDSWbI9\nhAx20etCsJX0/ryu+JCBlJxkiDcQMGWEtyPNEAkpyZl6GIf8MKIjuKsXULhN\npxeIPS+aF/+LgV8p/niLrGGb1ssy6K/0tGOzqCnl51BBy/oEp2+VnoyIZQFb\nH4y1z9JutOm72+Bb1/F7LK9M7OM/nZSRiznrFgK+KX/O1S8NOju+dVeUwY9O\nLB7RASvEdxn6nR7cVgNSYYKQh/wIw/D4WxIn5Q1+Tkvx/j8dLlX+wrx+tK4T\nWBS5\r\n=pWaJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGC+lsGC5SwmK6IXFcVaPmBuw5qzj4HbDfxjNPsJRb9FAiBmpP9GxpAe+6fIQNn8xGCiCXGRYq7CTeICRlkoIf+D6Q=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.2-d9b548d.0_1564901394893_0.5255942401499145"},"_hasShrinkwrap":false},"0.5.3-9c1b29a.0":{"name":"graphql-toolkit","version":"0.5.3-9c1b29a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.16","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"9c1b29a3a1a0c4b5c332f403aeb1a4dd4f5fb004","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.3-9c1b29a.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-uZyYYw51gYDrrwQVVZVqNYXjiztaE4iOSHeB3V+PUk7OXlPx7gEK2nIcmIOR+4SeKljt/5wgZEBkpB1X3FSK6w==","shasum":"27461b1d138f84e41fc9a447ced06acccb2b7aba","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.3-9c1b29a.0.tgz","fileCount":258,"unpackedSize":392782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRoAaCRA9TVsSAnZWagAAhY0P/iHHJtu6SlH5lS1wOiTM\n+KQ8xF1hexAXckbbQOPRjmXK4t/wKe5MlWXiGB/VGWpIzYmTNeoPdXa+h37w\nGA+HwUkNR7Tnr3IeLDMwXmu3KyH4a75YaOq3Ytba0uCjGu9vA+JkmleKdQGU\nNbk2H4PQaWZOrzcUoniS9lgOcelqO3waA8BcK2+Ui9M7p/fWEF0dGRw29WaL\nkU5+xSjhAnpyzGj0k8mS8Hprl2hifRhXRY+7JEi/xNfl6VfjGKmmoRU0dE6l\nloKkN/2NN9EfO0pEqcv9tgtoDBge8hR2IUBer19MXdcWvrpp1b3OGCmkT/6T\n//p9Xy8m2kElCHXNudsHbX8RinWq7KMQk4qhuJLF1ANx7HwATPzZmGuWlzVl\nwwmmGtyTJk14KVhzpU6wTO8/QN++zHlbTxpglfiFaai62FGJVy/a+64V2kld\nPXvdh6uXOYnIW0MMKy8zFbZJPbZfeCc6JyNxFqAMeeu2Rbz3SmzIsib/SWqg\n8zTNPsyRtZoAjA27btVs1fmrX3VEcaBPnc1TcqVvxxhOgrYULyMew8qTgGyk\ngSxs+aIMSu5DNlpPkYmPGNKmE5fYBVLejcv2OZS+L9G2/tsvutDAqDDD7RXO\nTadc6jXtuF2f4WjeV9SyjjGj85F5rcBPB2lA9HC7TSJKEX/nSUdqwQ9+h9Zo\n6W8X\r\n=t7Gi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCA0Wd/fdMoliSHZ7lrfxUX6SYkbXmkogII8GJz0hsRewIhAMXElZzaeR8NF7FEhHxHvuFKJHnOL4VpNsAuePvgTRPF"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.3-9c1b29a.0_1564901401374_0.7603193144249487"},"_hasShrinkwrap":false},"0.5.3-981884f.0":{"name":"graphql-toolkit","version":"0.5.3-981884f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"981884f4d37d84dec9e30c8435e528838ab5969e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.3-981884f.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-TMBcMLDqiESQkrqs24I59q+yo9NdcMh09Sx5LL2RfyjEHMe2Lxz4EJH/IBAl0EPYVvC4t7yo263WNeLWgjkW5w==","shasum":"a0604c277ddc5effe4ce5302eefaabc30a4a5a4e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.3-981884f.0.tgz","fileCount":258,"unpackedSize":392846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSI9mCRA9TVsSAnZWagAA5VgP/3keLKRBaICvyGUQ1jkI\ncS7pQkVZrMNahIOzJCACdxe7Cla0ru7tU56Vlf5ts5xRJ9d4bquMD1cZ9zAb\nqF/8mDLgvo/ExTjSNRlN/pjVa3vkqkVhliDwrXLzT1cD29tVIv7ckjTUr2yZ\nJqoFoJxgHfCkCds+eq10S6T90kQoCnyLupYMJSguB/BgiJW/v9evHC2Utmkk\n6qYW2Bt4slh8bykPElaq4VlcQO9wvayGi/sQGDWKj13Dpb3o9ZYomsPXcpWx\neNs+iuPWZBqQ2UOzZGb8Txocc2qJvEJ4olJhKnGw/Qs3H39EbMgL3LzYdWSE\nRHd7+I9gBQhjSpbmFf/NmOxAPFVd5J/wLEzOhcnT9vBDr+GQqV8XcHYvYDf/\nU4/H5yLo7nkN9SpeWBsXp4Eypzi0EBPmGAer5Si9P05ECVmC5+v7YI5jkABk\nvCcwLAFU0rk/PiyIOLQK8Pu/NRZ8iHg0a3U/AuAUFpTfNBkSfVFHLX6y/dyA\nmzKUZqQp0SOekp/AchkOb2uv64rdZPWpQTyJLq2ZkedL+ZvmGfbRxzApGk5x\nBta6Jzgzqj6rYH0QKgcRafXgRHPJNQ8t4oQ4io1QVuNYWFzvTxF07W6bK88V\nHMUo1T+v5y7lulYhDFxQ74ms8UjxsnjKcsePljInreIBkQ59fbHDSIozg5an\np4uR\r\n=E6k9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGU+SPTwIJmZno6EmkQO/eKlAlLTjlQN8qXpt35H3w1KAiBD7/C4+iXJKsqvizG1VANhhFac4AswuVLs51GUmXjOaA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.3-981884f.0_1565036389254_0.7503353799873076"},"_hasShrinkwrap":false},"0.5.3-81def63.0":{"name":"graphql-toolkit","version":"0.5.3-81def63.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.3","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"81def6308f9c38ffd73a16cf42acf55dad639687","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.3-81def63.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-B5v65wXbQPC0aUCjoFgzVfm4PeIM85PHNo8L63LKAzGmkGNucKgxwQw1Mhlsll/HUUD+NpJiVAqZHKDJBA9etA==","shasum":"2e44949f7106c2b5b6f783a7a25e6d0c83317ab8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.3-81def63.0.tgz","fileCount":258,"unpackedSize":392829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSOH6CRA9TVsSAnZWagAA95sP/2kAEBj9H9//ybSMELj1\nuQ+CoJvMG4zAGWmhnMy8X0cs5xjBAZ7xDRxAt2RgE04AF3scfyFrsFgY0fPT\nj25Fnm0RgG8DNyErzrmNRhDGlNSJKhyn0bcu9VS7BB1ue5M8OdaVD/0IOUFR\nq73t4y40jA+BfLMl1vvsXAiOF6zFG5rVMIziWVjq/o4L4yXG16Ja58O3RP47\nTqQroC1UeN/mnX22ai92PwWfWkt3PJ+dSKyE/85dbopB4b9LCJ0pdTjSIF40\nluB4zg364Db9jopfiTfsMehRcilL/dJJtwtBUsVtGQxAuEtJucwneb2odsJo\ni3j/7/cjkZzqeByotfkq3636o/Zrao7PYV0LzQqMfMcYfIjrp8KGJGOqQkof\nbSB+tRhwJO2YW5f7jugy0vquieK+n/IPoLlyOypUSFmCJJRTExoHGk9350ZS\n9ZlCeQ7HgsKoCTHI2+R8/Ywf/1zPvfX5fFn+NS3DVJ9BV8BkcQm5MLZUDXY0\nbe+CO3JJG2kwETZppd/4lL23HYea3mRzfZMiN8ZjQDvMTbZriB+xvCZw+ulm\nvHFYqBx4bZvyuaa5few7Kn0l3lJ7b8Ou76x1MN/YAcYf8FCQ10RYt4eRJEX8\nn9GVnQrGhZR/eyR9QBHhvPi4jnF0VVg9W6vVQAo91kl3uZfzVnR6FRWBu2T9\n/X6T\r\n=j8Dv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+pJq4DrT6VnoUMQ/7gjzrga9tJTerbBqGrhYdS33mLAiEAvUprVIp4CmlrVkMiHS9cT+8mu7S8vjkm8C83UYWk+Lw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.3-81def63.0_1565057529195_0.6611338840763588"},"_hasShrinkwrap":false},"0.5.3-b2c35f4.0":{"name":"graphql-toolkit","version":"0.5.3-b2c35f4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"b2c35f487b8265bb4b3a44064610fe70518f9154","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.3-b2c35f4.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-bhO58CvM43n3oI8shd3PKTqvn0dK2jvNEJOvwHm7dMvj7e5TcoojizGYEpUQqatsetMLFwLy+qP+65twXYy2lg==","shasum":"c7e848cc1f9e5cae1512e549660b6ca882f69229","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.3-b2c35f4.0.tgz","fileCount":258,"unpackedSize":392844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSWnMCRA9TVsSAnZWagAA9tMP/ihuAVaiV78BESIoS4px\nPtX3BMPly8uaU90MOp0o0bImfQ3th3CRZuzU1mCPBbSwTrXXlF0v8rwd0Xzu\nLEhgSPu/dQH/eBmQpO3mBcfBYt1cnglgTqNdwI7PDICwuMoPAIc8c43rPy1J\nB+IhmgweTnJMqJBdXSP2dZQbhs4ffUNte7VT6f0zOgSaePrbeBbP11//SHQR\necZrkfZXi3KbM+4RAsaf9TCIE3WzV9QhzMMK514O8Or9b4z6hcR3meoc6KJb\no/vr3vze/1PoGybqZgMRYuxe+J/vQYfZD+0/CD9p3+5sF7AsOh7UXbwmCVA8\nOrP4rw0xQW2oO4miMUJUIWgLR0vxh9XgarfT+J0nnfBYEQ9IfEgbEQa+97Bn\n0cSbnIOr00pB3XlWObiZRcCmuUkvR6wPQD7qhgg628LH1IHWXmEMOPzkPquS\nozOc/UZco4mnmCqtC9xqY0WIuKnj6KpfBmOCblntt+sGWTdfmWcBDn1VGRMH\njcmXj8ZUiwjRwD8Zbq70+hQIYJAyD4KruyvxgfnCveX1gML6RYdQ+69+eK/y\nee7v1llnW/azYrF37eB4/nnljomrbiApI2uCd8bC+zX06LNQcObCxyavK5Tr\ncQrJMjV66AJMyOSXaGIuC/3kdkuFGUFfX6yFUJe9wtmQVdkhKLKjQ9obabEr\nAC0z\r\n=YDBn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+ovWr8LyWvnAKfTg0S2V+ePWboKpyf47XAweTvLxqPwIhAJiKzfuTepBSrGZAL5AB9lP2XMIWKCgSCgKB+wIB7a+D"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.3-b2c35f4.0_1565092299352_0.7774104990217701"},"_hasShrinkwrap":false},"0.5.3-61f0ba7.0":{"name":"graphql-toolkit","version":"0.5.3-61f0ba7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"61f0ba7c8dd4e0b75b9e808a3ca6866c8c968b54","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.3-61f0ba7.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-U1c3eKZJoVVeCJVTa3NVK6f8yg8ZFTtYZb8XrNy90P1kTjPVcW/pl7vUlH4OgwV0R/ZaVn3esTqpNH5Vd033qA==","shasum":"ecfde9978b41f05d9546e7f84513a7b0b92ec9cb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.3-61f0ba7.0.tgz","fileCount":258,"unpackedSize":392834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSW15CRA9TVsSAnZWagAAzk0P+QH4zeJtAI/gYjfTxn8/\nES+vjzE3bZOLVzX4XaZqRij3fRa2i7jSTXQcfpKwSLvsTev1IAvhIuUmpB9g\n3IjqpmJ++tOtxTkOyigeFz/shGuH++21UnZy5EZ7OjXCO+epCxNZcg+BjDiD\nhSF2aNrdPe6oSiad2wBZtkLHF58Ij/M7g8t2/EOS4hmJLzUWck+5+PAxhx1r\nxunvQ5mksR1tC9zPpf/cXIxqV7k23DvGgaGI8kGFpVgsFtNPXY8UBovz8B3I\nOHSF9XR9qt9fNaI8vwFJ63S3IIG7XLu8xnUG6/8jDju34mp0T5O2KxKcShPx\nfF+ULKtvvU3gugnH5n4sC0Nq1mh7IghnE0MiRG+c9UjcHEeXNsqJSuzUo7/o\nO5GD3UWHLyRZ98Eu5rAZu+7tY0sE3BkrGTt3R/N8SjIw/LhyZYFBSCQO+1J4\noc7vCALDhmVgZgHi4quVjKzJslkQe4YZPHz37y3wPTOMaqkQySTxN2ffZfhq\ncPzQC/SdAYmVnUe+CSVGG/pVOIEkZzk4pURO7qWTcWWfU2zSh8QLwJdnvxBH\nnbNqKy9wZ2UjR594QzTE/75cghjkBLJ269bubiOzZDWFz852FOUw+36kvdvr\nnXgvBRNzY2L6aivnFvGtHPVyEd0BG6310hMdpyl8ipQpCz74s/kBQJj+2hSz\ntLYD\r\n=f7xj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBtwVJ2DQlGlgKYvs9I2/DusQgReastAizP+09Zsu47VAiBett3ajY/5xDHI3NtQ+tDwAVqimQh5slyQ0uG2e8WuyQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.3-61f0ba7.0_1565093240293_0.12368436274087324"},"_hasShrinkwrap":false},"0.5.3":{"name":"graphql-toolkit","version":"0.5.3","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"46448e097ebba61e0db65e3768d071830c46e35e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.3","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-VRBW1UbOBvZs9FOsBQEJlKWZvR5LW5gWh4tFVKXZHfWcCyrV4eYkcXdj0M3fa6ILcmcci/Ab64W8qKO4rBhOtw==","shasum":"b80a34909a73ddef01084339fcc8a3c2f07018b2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.3.tgz","fileCount":265,"unpackedSize":401401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdScc6CRA9TVsSAnZWagAATNkP/RRlamt5s1infH+6CrFu\nHFVhhiChtyUkOcMDvQ76qa0MskpubYhXobZLsxu57jO9juEoD7elnaa0ur9y\n7UZpX7hdDWuI7AKOYKI7ffxKIiPkGaR77RHK9DYqC8Hj/RKM3i5E3JodIfkR\nTq+Sdcg4TRStzFd8dCVrzkrZzJg6mSHJQmZ2NFiaWGO3fK8lJ46oGLby1fSY\nObSH9V6WU9mWikNuc0dTwjQqn4kq6B4vG9qf52/OeEPasBjQxaeFl5rHIq8X\nSSs983rnX0H8JBYTfcuBjsydMUyJkczSFT3kNOPPpT6wMi/ytYqAL3PimCwh\nZf5husetItWPe2TqtDXi8ZtyfONvGqbukZtJrq5lMcgqgWsKr8yUAsO1I/R2\n0r/WxEmNik4e97+9viEgI5HWfPkXSJh2UezOgcegU6RRfO0/bEhikdGHHYiQ\n7ZBVnO2MtdbhFvS5WMmiA0tYpyDl7sr6ADzaGsCzjqCDFcmvLEq/+dmIsvgc\nbekG/L+y2L4oSZ94DxwhoRqGs8K5jAeSeCKAhxc52Pndgdz7xjHVt1h2oyob\nnEoaPe2AzUOZlyYmJeL43DzyufPG9hTW8JwPC9Q1JQlTQ0I0SJPQQhGW440O\nI03Kyqhj6rdDvk+61xrlGypsupfyDFoA1ZXrD1CRIidb0E2lSJIerrnEagfJ\nv86i\r\n=Lzb0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGa52S/L3iDHLo5mYhmF8jxeh49isUd7SKUJHQolkGfMAiEA9V7pzY6JclsFAtVpVhyIBLe6Nbxai+Ih4ZrO6iYqtVk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.3_1565116217200_0.9300361097741097"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.4-46448e0.0":{"name":"graphql-toolkit","version":"0.5.4-46448e0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"46448e097ebba61e0db65e3768d071830c46e35e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.4-46448e0.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-+n6IP6UOgiNw5na+J+vEXMbBP6qcR00b2CcgXAAFg2KmSTFOdfk962erUgXlVgMPKyf6PKxPML5ndQ0+F7vbbg==","shasum":"5e3d36f75e728466f4ca625ce45d612a2abb6e7c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.4-46448e0.0.tgz","fileCount":258,"unpackedSize":393737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSceGCRA9TVsSAnZWagAAD0wP/0biRKXYNLIbLz8VNznH\ntb4pgYaS9MF345JAWccLd5EjEtppwo2AGG3iDsSq9/Bbxng4SuBBtmD+fCRH\nn4BcsBHRbntvWy7DsuCZHUGG/m6UQ5I9aJDILs5yWr7bW1qSwGOBrQsICG+h\ntl0kPWtDmiQU3wYdqi4UjmojbiZxIMDL+b2oFIkGlZNIqeksPeK3lwifdOEy\nofle4pa1b7Z3jTniy97BRWmOGVLZgq0OcZYdTSBAVpMoPAZBWMcrL1ohQfN/\nq2CTdWJSpeUp0cqBhRAVIREYTPz49lpw6fDYop8jrdg+duWgeRLZdtAFTt25\nkAFUBaJC0mmaWt9lnBilddl1wrluVLUE1E6W68f/tYmGTMkhhPdrNNZp5m0K\n6PG/33R66aY/BD9mYWWufOiyqaj0tmpFuf8AsrT3V6CFCj7uj9nvEYIQvBRX\no5FebapNEDFOffb1wIoszdO4Fg7HIFAAS08j2HrrEt3zHuQq8STErJ1iY+cO\nh0toyH+3e0KeDr+eHhAkHPe8HjIwfRadUTq2TAo/Do7eqQQEzf5mJqvFV9pH\na2QgftvcSxYVkOyIMp/SVaxkphK68LNZ3nVSWJMsUkp1a275g5hB67gI1zRN\nj3xv80Z8baaH0dO97iz4gyld1N4o/Twcp6yxsJe1VBeJI5FZYOC/UM3iRBts\naJug\r\n=bl7i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICGQBxaZgos5jrxKZWEtPPeC0U8Y7Gjahye1zo660NuaAiA1eaMQ7LlZx6Etv2+Ctq9E3ktBVA3TCGdMg5eprhV16w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.4-46448e0.0_1565116293148_0.9949957741523163"},"_hasShrinkwrap":false},"0.5.4":{"name":"graphql-toolkit","version":"0.5.4","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"5954a6913e87fb0fe197c9e2a692a57fa97f468f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.4","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-Z1SIK3mgvySxOw8eoYPnGACnjgL2sNbGaemTQH4cCDfElyHzb+IMzvYA1Avb0FFETImQYuBeb5kDq6b2kvsxmw==","shasum":"df25a13a1c28b9c0b241077097e530b45b9b7058","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.4.tgz","fileCount":265,"unpackedSize":401552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSdNvCRA9TVsSAnZWagAASfcP/j2UYj36JXxVXYfEQBn6\nAX5DcFgyhhgBq6NWYdDofkzXAHnFrghJqRctIcPsC88G2OOBWGp0WmEFO++7\nfFMx3iHGK5EM1MwHnpNe2iTQywrsvPpHRchQkCwRzB+UuFzzH8DOSpbvcj3o\n6ZHESNfgXkfCCFWBr4tnNnPtYvGChnOsBM5gEBE4tPM1hw1kmMcmYHZidVLZ\nFrUOcO4IlKlZFj+2tB9Zgj1FRVkmAaYE2BaEyPTC33Wr8V5EylfJbbATl/rC\nfKvpqT+vDF+MHJqetgOYcLL8jrQFdrAhEe4ds7xNuvv8hK6syURoNYja0xSc\nkd5FQWZXyemoi2eFySPf6kIBEVamMLXEMAtEn/yGtZm2GfSdXnRlTUs+Yftz\nOujLCzJsmdtdZ3COtC4da7xyHbzNHssEVl0OX8NrE3QlSbWfSxmEl8zutqtK\nxbe6fV2bn7lrr92Pnioh87R53pXYrPx+IMhm7TmKon4bsH9HbSUuJZV5H4c1\ngrGBJzNq7RW1W+YipE2WkbrK18jWbTXuLFiYvxR+aEuD3kuDXgbB96jXGuhL\natafxcInnz+J+hqgtXcLl/bh3u7sQ8iqFve+7GTwYrA7KNlkwZb66N5cakv7\nVte1NeuldqDUCAKailH/xSkh0kybCJlS0meLumJP9AhxuXtFvKOXq81ES+Kq\nHjpj\r\n=YeAI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjsXI//9mBjp9r0/sTOqu/Sjk04A9KJAQttz/NLMRGtQIhAOoMn4Uo8o+aMVKf9CRin1GyDzNAn3Lk5D5G1mLA05ze"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.4_1565119340065_0.31146875722260825"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.5-5954a69.0":{"name":"graphql-toolkit","version":"0.5.5-5954a69.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to documents loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.","readmeFilename":"README.md","gitHead":"5954a6913e87fb0fe197c9e2a692a57fa97f468f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.5-5954a69.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-5GC3dyylr6Siehpv2/zgLkItBRuqvz25aaXsJNjCqVJsMOtr5Lmop3p5EVQfJfIHKm8nNKRF/jnWJDBq6GXCKg==","shasum":"85bda1876a1c33c717170c61de22c331d078d6fa","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.5-5954a69.0.tgz","fileCount":258,"unpackedSize":393899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSdPkCRA9TVsSAnZWagAAftQP/iEKzeErbpwPHZx4fTco\nVt5sHr5+xWN6JBUi1UAgUXdYtrtcy+YDBM867fxBmTpkKmkTyPNoSniZgzib\n0eZm941Aod2aILv/plmqKujG60SA1lj/Z1LYI7UlIbFt6OYpOHVQ0AIYGBAM\nHcSncyGUZ56Ekg/kOMgWLBcTzPdK1O7YzZWeXhbuQ8AI841tCeHz1/4ht65Z\nwmlPcPmNCV2vGUtCEAVHVJRxU2njaIh2K/4vmhHU80dpWdnqEyzaf72Jd4lM\nL67Am9l+klj8KJQh5UMypwWoqu8rMmERP70e7egl46VRrq6eM2WvqHh7el6L\n5NXkvRTxU24ReMcwsnbbPiNfvYN3dQBQ4N2Hd7fAYKAgPRzCeUNYft7pUrIN\nRHVt9Cji4c9n6dZodw7WDNJA6bnbN6m1IUtdHX3huxIhzdYx+XE7QiCV/I6j\n4FvQPND0aS5JX8IZm9Tp11cw5iLcs8uJZY3vDDPq9ayk/VIXghJrsRGbFEcH\nTU6WnG3E/fV/EhUV85PcUfTWQCx0fqlgdznq14Splk68D5z3S1bJH8hOjSyZ\nIV/irQ1U+pOk7N+i16rEInwI7MjhsC3YXc8dXEt+61S95dRljnWpFlcnGb6z\nktniX3ZKmfBbEHOeH/TbDRqEMTpDaPNEGRHrSh2UR/nnRJSyExdu6L9r32Pd\nk0Ru\r\n=ItOC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHVfphzoaGvc4N5tL0qTof7xjwAnURBrcMPYkPz18loAIhAMKDnyyA4J3pqWRCd3DYo0uVUco5wyyBfB+T+dSAeK8f"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.5-5954a69.0_1565119459275_0.5882153533886831"},"_hasShrinkwrap":false},"0.5.5-393425b.0":{"name":"graphql-toolkit","version":"0.5.5-393425b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"393425bb4e4a920ebf3c9e3951147ea008fbee3f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.5-393425b.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-mbjvoPYOgZWOwYaRZir13mZe7o0Gsox9wOXn8dyOkfRvBWAaqaf+DOhGK0wUkwQ+26LexuAmmf3A965AZ6YHIg==","shasum":"7be08a11d7e888787e0d609f7f28d9bf3e605886","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.5-393425b.0.tgz","fileCount":258,"unpackedSize":393873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSidzCRA9TVsSAnZWagAACzAP/300UdCy4b7NB3dxPnXj\nL5eJxkGrsL0y7Hm8unVA0aZdRsxAQTHoaI//seeITlwU+PbpQFzwrd6Ual2S\nz0Sf6nSEbK0Fd0C35R92MOeSLRvZ8dwSCh9yYbzkr1cKMs1dOX5WwmMhON7B\npTT2QsCaqM0kNnN24GJBr6lOv7/Gvx3ztcXRJDjtInoDoU6eMsKICQXLf3/R\nfyFaon9+tPYJ53qjU7BgSxSVFIaU7MtCB/dor7hbFTCrqvVvQwpakEdrk6mA\nxjqu/mDJ6NjufVXkmgfBZsyv8i8n9Bu7KdLdAQoZlqHzQTiOmOSyfzpvEMWi\n0FCn3kEPTNEDGwx6ka+nYYdx/OcLADZVCX7DFQbWHlPAkV3QFtJo79BCVeQe\nw9gvVcEkfhctnLtbO2adJWxFHFuVecJVXauJj5V5ZOhWjxsezTP0WaDIZyJd\n7UDdCyAlGedXy82EHQzT/vhT01ZPhDfvUSOGpKmu+uZpWGibtJM/LZLIC1r8\nmWyQnATI7DoZLyiXIIuUlvga2M0o89koDn6ZB/a21WQMHfokRbFGqTagC0bo\n0+LzSXpzLU5ixhzI2mVdrjs3J7WP9ZlL0cwBlMOgjjq+R2y+ngXhGx3+vmdt\nqKW6+r57cryOIPjLBrvBmckQ668MEeFML01csF5bh5peLyHZ7IB89f0rPEAK\nhARw\r\n=kBf0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdW6+LFaLswRhtVdfX5G7bsTam5I4qO0DQIID45yGIvQIhAN6HuqT6ncM/ryebLIhpSD8YK2z2jC2wIl/lclu+ELPh"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.5-393425b.0_1565140850699_0.22797864487994812"},"_hasShrinkwrap":false},"0.5.5-d16d941.0":{"name":"graphql-toolkit","version":"0.5.5-d16d941.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.14","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d16d9413b1c57a1786b5d2d95a9ad74d9dec2b2b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.5-d16d941.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-FI+wOPVyjel2h/nlsiQzuZOWRps9UqI1pmm1NNcn6XWBIAXWqnn67DDVC0ZH753xyEyEcGNKT0nqnpHr/CfjCg==","shasum":"d5462df33d276137aff54506fba598cbb7f8cdb4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.5-d16d941.0.tgz","fileCount":258,"unpackedSize":394036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSiehCRA9TVsSAnZWagAAkUsQAJQDRmXuUGsdIxSwGwwN\nQbo7Dpt6bRBtYgWMoYR5W/YD1C+KW/Goc6N8VP2D0dj41+t8SZOjUlRhha8P\n1++k4EtI5BYK4mYVfKo3PXSWDI5EDtUwh1bmsMbSjd0B3ipn0ReTTXLqSU5R\nh3dgjl4DIQ0AeneBxEilDRcgStXKUuUvjOyGhQrXbhNvkJGpiofbWTxOzB+C\niRWZKeacdq00zLdf81WPNI4w0URE8xTywQaJX9GIRF563/zMy+/lFjeQeP/b\n2TU+r9NEhjRYYMXBan6nz43AmwqlMBLJX6FDvmcF+jOozr1cmNT7odzio3qR\nEm5niJ+GZK0U9qvP9vj9jN/qisNm0sOy5ArgJaMuQmEI1hF3epU3t5jO/osN\nywukOjFgWRLGOSPx+gMWV+dZRQ+cNWgdZUZghLXOfq/k3LfGT/TS+5H/gqH9\nTLnzjDI9CDX4kzn7P9TJ/E/09sxwoWgdVmCA0qOY1sIUewZhXJuTrTb5829W\nly0M0fAXUXxM1Y1xOVDCUl6PRCM9w/q7Km3tPngmjruoXG/WvNGB8WirfQJt\nXNCO2JvYWLkv6DCsYnXFVy6aR/CgrT99GnWOh7Af0Z6uiPSsaAwsh/zC0GE3\nLhSJBUY2iFVDIMdX8oW0Sarl8s1wuXFwB5xW4WgIdHDL/zZHczqhe17Kmo1c\nRG9Q\r\n=mrMY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIELJqNEQzjTAEL1sNLAOZflgXB0FjJYrnP16JwAvktexAiA0ZLNZa0mT7qKdCn+UxS6fM2u3KSIUCkTvbr4pqSX/Dw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.5-d16d941.0_1565140896524_0.9167843305496115"},"_hasShrinkwrap":false},"0.5.5-d3692b7.0":{"name":"graphql-toolkit","version":"0.5.5-d3692b7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d3692b74be7b25dcb93f65f09c1b7d9657275267","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.5-d3692b7.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-ral+vjBPOTXI831BsHWbLXJcuKwaxggD9S6ex5yukARb563d1kRP9QQU6p+vp0PL7TTIb+QQgduhSiRYXLiDLA==","shasum":"8c98bc1d5ce831e78bbbb9d47fa4dc575ea7df9d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.5-d3692b7.0.tgz","fileCount":258,"unpackedSize":394024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdS0a0CRA9TVsSAnZWagAAZ2gQAISlqoDBWVPBA8JFyRo4\nynbP6tUeer2H3+A4OunjyuwHTeV+37h56ooVx6yVK/WvlLphwZ1OFJGWzmMg\n/Y7oeOpen4b2Vyq5DLQAtAoGFlt1zi1gSIiAga1/Cg1zBHmayrBD08KgS0oy\n7zuBu675piRlkMqCop5uwTJub29fL1iWmeXIDbSZOKNGKx84HSc3qa/3tPRw\nrfZPCxzRe+SaPB9r1bK9OsTla0a7NCbq2mxoPMMjszp5iTleHXDSMd41WkdL\nqF7ROnLa1ALX9FTekKbJW6edu+NJbb5DffznBoRo/UX0V0CKWjp4CQQeAIUu\n3kZ8ir3tdX+kll0r2dRCvXXh0XhgBNKzSCCT/8ijSokxhdY7UQ4fCLwXZIBP\n3xIC4DxAcod4hiKvGg0Goigd6BUk31syO9zfFJArCWtst+cYH7dned3jUSyR\nSzBCPyV9coa7gpUydByTQwicUDZX4SuKXgFC1X0GCvFPJYP/TKZiuWO1Dh1V\nYsLAJzJ0GF32D1xovXLmcdxDbW42fQh5FXf+oi+dHAMtK+Gi77AdxLv4uobu\nTvBvT7tQlOQyqxsbff8L8JaV3yznyL9oB8gqYAJFJQ+psuxu6adYSjHTAxBa\ntSDCq7M7tzN57yBQNF2ehHAR/610LLUf1ZiGknwozNlAMG4rspRln09jqt6y\n5KOh\r\n=zQ9U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXp1SnYmwfkcriBIQNhP9SYfVnD1b2MxbtI7AII7+5ZAiEAotUX+Ud+0a5n0ruttC/fP6mSiPzypMHkZvuZiArgkHw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.5-d3692b7.0_1565214387675_0.6832702156061805"},"_hasShrinkwrap":false},"0.5.5-03d5273.0":{"name":"graphql-toolkit","version":"0.5.5-03d5273.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"03d527370bb1e0babb68a597f1e618b38e13d370","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.5-03d5273.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-Qo2SyiA/hkjzSKhs2+52DHYOWbvYyU/muyAfrq1cSP9K/1xo/P0yAZLkgkTV0e0gfQUS6cA77fcWjqPiseBXJA==","shasum":"11fda351fcb0a3f4b5056c46e6825d1d329ac426","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.5-03d5273.0.tgz","fileCount":258,"unpackedSize":394055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdS1mYCRA9TVsSAnZWagAAuAsP+QDKEdVTlYrYA1ti0Z50\nEgtcW0n8t8vQRRolNiEV4YWN/fI/t9o4xrK4fqJYIx5CVnH0+pY3upI1kW2N\nXkwGeB2j21LwzFj3U+xBbPEP9WU0eQa4aWzJJhDV0Qj9DTSz21ejCNTYrFoZ\ntfjnN3UH1UA1RgtAz1R4808EfCXYb/me8tHUKtHeKNvumGmr4SCXaUK3o6cN\nwugmMvTIYX30OydkBVCqSVfbC88xV4Nbq5bokeuo1V+5Rq9aYMXwxKps56qI\nhoNWsroR9MTPgOg62K7n65LiS4MhFDUJr8jgso+vTgqw/zQJ0gAD6IjcBi8G\nSwHLUJgR1/khd9dwYhmEyPiS6g4ASvvvsiHvbbWW55y8hkmCB4w6XH53oToZ\nVMRYA2j5bzvj8XNqaTWObvav1utB6mHIoUyJ6DlOiUySuw/QZuiePOF2qU7Y\n9roPHllsDO8ZxrNu9xokhMv6cdssDHQEzvmesVINAaF+1pjo7yezDMrPGjzb\nz/tx0DO3MeNgSExXgajXyGDX7HCskAXfelxC/3Z7O8Z6ZvwOAOq6PJaGK2zc\nJPimMJTIYmHQIpaoZDTKqB8DdqMQ0KPk2C0AyNUskRo2V+YJbK63/cbaHhQN\nW1AIdunkfvh0pBxEJlnLNn1VThDStp5jgtCttpDr4FG3C44qENFQvxgxyy3e\nrp6N\r\n=jVnM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE7XTab5QyOP33vl2XKStBv6aWeNguTUK2QKO7B35hRoAiEAz5Y7qMeanzsJvii4TqfTIt8e+1QPHX0H8mP+UH24794="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.5-03d5273.0_1565219223132_0.9292952549889413"},"_hasShrinkwrap":false},"0.5.5-dd93914.0":{"name":"graphql-toolkit","version":"0.5.5-dd93914.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"dd939145fc23d5ec912ea2cff2c38e1fc80681fe","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.5-dd93914.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-EzNl58l/i9Jz2/LXl+rcJM2HI8OyHPD6K84CeEe0G+mB8bwbsbeQKNQRizBzeMPjLFro4/NsL1VSGEqM3XLeSA==","shasum":"094609e137380dfc8394ef364df5512d5939c457","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.5-dd93914.0.tgz","fileCount":258,"unpackedSize":394038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdThTGCRA9TVsSAnZWagAAAMAP/2L5ANz/PjrkIHDH0nA4\nQpzn5SUc/oNSChNDWV9GnegAGY9YNxod11z0b8GlNvKCCjzIkYX5WVQHfjWZ\n+noGqiA8slWdgluVT+lEXiNQHkallQKEBPkvmD+0uLY5DgWrea89sudNe2mg\nR5AU8hdDDUSyrL9pbVSJcMHtamQh5B2IVWg9UAAVl5e0i2EFl/A7zdx2ZO0t\n5g0HbcqOubQc6JE8H2SKu/gpJ1C3CV3bVKC1e2jj0ZETI5LZX3hqIp2A1GIG\nlMse0A2OyfQC3+P0YNq1eCxjdZPxKiDhqgjHqDUWlHOXHpJxTikw33Gd8Zbt\nGXHJ8S1njb1lXWScUjHFogcokUdQCVHHLxj7wqTvq59jmvG7aYTrFppWvrJt\nYoXQyL+a2bt/uat5LoNQr28aqSrgf53KgAKQa6liLXOTOZGpSfjFakzPwq1f\n+Ug2NlXs+bVctC8QRb/XzbWUZ+rEbYxRPW9SdO3LVG4QIuN0C0m5DVXr0Qw2\niBeyNUwF+Giu5o5WQfOfFHWokjg0c61m1U4zvsfnNKBYdvpIFIi1AWAjFoum\nfUgY9X07XJiDL9Csf8E9COGrAJScc7lIYN2HS1rHwDQdWln8pllYX0iHXqWm\nx/GqTV2+hy55gLvdobeFe0XKGFbbNW3pcPcZ3pdhCLrvpCX2pz8kw3poMp9C\n4c/m\r\n=Tkbe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrj5b82kMSrtlGdtLu+PgjsvJx9pFCPu3q4F48L0Ka7AIgUA0PMjWC2mnpTPzK0Vjr3xhzJqmxG0/9S+XYG+juONY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.5-dd93914.0_1565398213318_0.028206926731219273"},"_hasShrinkwrap":false},"0.5.5-2bf8ec5.0":{"name":"graphql-toolkit","version":"0.5.5-2bf8ec5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"2bf8ec5d8ac1c8016148af531fd4de740ec211e1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.5-2bf8ec5.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-1j1FLoycdEnQjjXwBmWaBJQFY8vT5LxJlgN3Och77F9iLoshQPcdIfyf9x6g6AwxFCZFTpyaRbR/iRoVGWeyiA==","shasum":"dd0e882ec4c86455a4ba18e689e481625f9e258f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.5-2bf8ec5.0.tgz","fileCount":258,"unpackedSize":394070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTzZTCRA9TVsSAnZWagAALfoP/19aDtM3rlB+IhEgZEOH\np2RyZZwgLpcHS3xwwWwT4q02lu9eFOvh+lWkVqNvz8/HV5XQ0w6j0rfkI0Kx\noQrvAuri8lVll6vXQuSciSnqp6p7ou0Cg03MmMXoXl++yRLDCzjtPQdIlGYf\nwaySATtr2UJhKRtfWMSIoxxMQsgPlfsucK1ab5/RM8Do79E4m7tJg6rhRvCP\ni+mHxA1budX4FeEo4zbyUerghzGTpXQaQYo2wYGAfLbN8wNNdHmYYTA5GUwJ\nfa5mOtwHBOI52IA/TIWzKEnoN/ClUScg2/+gNV5JtcRCac865JZZXbv2NGbW\nugD4ZD1R5zcdleoYc7UrNMop5aDJmMSXKxFzZCoJz+OMWUObSPmZv25I8opo\nB3A6Wkouor2/ytB4gBCWGQjmbnmwdHLGKmeMXE1dpBZxyIWkSDcTwCKcnn2J\naBgqT8T/bwpwRmdH1HXp+D3Kvat0xP1u57ZpcRM1sawZBAydpIMCwv9GePZs\nR+qzljVZ9kRkHXyWSO8dJ8MuPDhH+q3WaBvcgr3g/1Du2lFDv9xibveKRk1r\nbKx6hfg/JItVoMG1hBRT35oyBaxyFmYmHFbfzniSla0Z06BaT36BjfxmEb+J\nEFDN1+zanu21heoUyoewjJvjkvMUBbqrfvX/zD9VQr8dTJ/YMgNv8UKwh8YQ\niBfP\r\n=eFBj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAzAQRlTm76FMwGpus1HyTYDQYAk8IyGLMXrgZUHOrYAIhAP0l0ZdilnW+pECZYOO1O1QV7jqReoGBOKvSWr2ibTOI"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.5-2bf8ec5.0_1565472338431_0.9018056619979047"},"_hasShrinkwrap":false},"0.5.5":{"name":"graphql-toolkit","version":"0.5.5","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"6e0b5f9ca363755e83433649789bb27ef5806611","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.5","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-uKUdf0pvuOa19Cr06J+bpXKjfiWGu4Lz4sBJYYJeQK+IYypruP7wOWQHAmq2+V9kuP1xnxLK576MnyCQ1/1zBg==","shasum":"adea2010558abf631e2a7c4498acaa3a17c627cc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.5.tgz","fileCount":265,"unpackedSize":404389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdT6mUCRA9TVsSAnZWagAAF3UP/2aFI5yfjOtw2pcNiP4N\nRw2tHC6CG1qIgVTnMP9Idkq8Z1NUQUTpaaMCgjKZ7w198YetfFxCI660TNQX\nVp4IskhIe74w04DEo34LAu1xtjYhQOoBcuTDVvzFK3pql2x2G3IK6CunOWg6\naGNeqYtZg+Ep7RNTSNTBCLUMXdrLtcz+GLUM2egHZ8pcC8uzeimVX4zJ5b52\nsH9+gj9/wV1ut+M296TQO4Sp9fpSXoRZdqFX2KS8e0kl12UXxq3vRe+TqKvn\nB0LMVQRPN0zh+ncu7Y107mb6WNoMz1KBA56OR3b7JB41bibMD0DXRiKwurDZ\n8sIkqUgQqvOJKAVZ1VDa4Y3NwkgE2BCA8rHeKKNCU0euyGjR7r4fv0GxQ0s+\nCUGLCCc17tB/NJVuekUDxfNY/MgsPjvfx5mb/L9VmxsqOa43ui89l8lgmUSa\nZu1fDJ1velx1D5UMDhyuPuBrP8ibsbVIMyMT4SuULCwtyRlKmc0eLyiK3dub\n47PPlTKpKRa6zUi9ejzHWecqVkCZbtD/Y0KPIup2332lnmxD21WBN1bOMJOX\nNyk8lN+gMdhdrYsUgVluNdiZ9ngfbbMr7gN2rF/aMX8EwopQAR+4j1r034X1\n3N4k3F0804V5vfy4NOkGr9tFzGjn37X+fyq5DXxEB1DLPz7Nnq0i7aGXDKyQ\nw4ew\r\n=Oj/s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCa2MrYnwzwBBLhKSjFsvsHBSnsSYLPPjBH8zQ7T5UuKQIgdmD1H8IlABAxBe4FEtcQffAkEC7+V3gnqZl0RRJ8b8M="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.5_1565501843926_0.29033932035718535"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.6":{"name":"graphql-toolkit","version":"0.5.6","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"c5e12e6eb3b32e39e3bbf7dfa3defbf2bffa18a9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.6","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-eDA4jKmYvKowSTz/jKu5GFtZhTpe/wq6CHBPlVenRACtfGBxiWPyyrwh/CCd2AYznSzfmyc7XiyVfYyV3CIw7g==","shasum":"9bbfa7697a74278a3267d4b9d4cf237dd69e3f24","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.6.tgz","fileCount":265,"unpackedSize":404254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdT6pNCRA9TVsSAnZWagAAVSsP/RoJRZMJFxFlM7+Gtzoj\n4rfV7K1Ek0jl4+9dDXjIJm8t5qGA3HQvnSWNi7xuQ0zXD2Lh77cXbAxaMXPd\nabkvi+ZgReqg2BxMnwLn58b/V9gP1kn1id3NUv0QGqjyYSSZjk2N5rRbaKCR\n/cQYOHt0WVLVszLL6GVYE4WokCdE/2O8CNUNBX32TWBd3jbGBuVhnZmgXhhy\nTG+121UbOtiU8qsIz9ce5UPZiGItSQY04fwfFpOyfRfQT4DUSlajGb7hw7++\nwzo+aKTdzrFc88WQZcPsDzHzSKaRD9XPr3rMLytvH1uyibzJSmtWZGm3y1RT\nEyAli4hrU3oFP6Z4THkW2zVMPeSlVg1yKtlUIgwosh2FZyITyqd8gZimTYoG\n3lnpEw0jhSpYNyhKcL2wkUpchL47DDFh9txHeLGimpCAk3r9loJWLPoNB7P2\nTSvLQC3rQMHSZ4sbV1PejkFqT/hzohhTgjql2z94ZUnpnt4u35GYRQLsnRCn\nfp/xVH4WNe5970JABnG6QobP95gtp+YK17MsIO21FXcPzwR4afJ4yxYpyRGV\n14qYDaXfBkv8SaaHfHyhyF90BwO+sAJ6jcMdOcVZ3/8Q8GbN1175PbQ8sl5G\nPyC4AS425YbB7k5xDjMUa4PIm5EoB2DkXqAzTPl7eJ6aCLOzO1+AWvF4s0l6\noV/1\r\n=YnSY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTCHvUw2rK9+jcGvR6BgdGY06NfLw30Q5q1f6WQEQlIgIgfVFSsaI9RQNjLgr7Z7GsyZuAw+MGvm/+ybRrTfIH1q0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.6_1565502028870_0.2642027116324528"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.6-745fa01.0":{"name":"graphql-toolkit","version":"0.5.6-745fa01.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"745fa010d48561fd550a4a0aae61cc5ec34de1b7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.6-745fa01.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-EDtPTkx+5SEAa73LpF76O0vZSXPqZqQPmu/D6FRqhpw/bC5JC4JZfNR30IPsqQpv/8FclwplwuO7u5Mb6hiZPQ==","shasum":"aaf2ba032d432b930891698ac923477c4fb28244","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.6-745fa01.0.tgz","fileCount":258,"unpackedSize":396578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdT6peCRA9TVsSAnZWagAAY/8P/0T1LFkyV9imTwaL7lwm\nIRuuIvpyhrNL8YKKFUOg+un8KaxUI87KLF+n8VajYB0/W0USgdY6WMmAgZTG\nVhnlLIJlEAqDuwss5EFHL560C8QG8LahF6itG6vr8cKsUoALeLGz37vgaDkP\nesD6DTzYGI8AMSNB4KAiQpBzf41Af8z9d6BK4oZIqSfPVNe/z8E63Wjjs7qq\npWGDHsgad40sAXqL2/gLNqQXofwY9Q7ab5NrEysfp9jl/KJF8QtS5hcWp6Ia\n3zZxhwDOjgXswA23bKIcilNOcutt+xaRXsf86rXA7Q4u4uwQEe1DoymaRECJ\naOR0MI013iMPe8Bp5TemOz5WyN4Rg3CS0Gg43nG175yDwLi2eHvp4b1NqPDz\nI9j/fgASFtZ6jshllx9oRJwAbbWfglVzeQ4TBONtAVIaEqiHxkjIDBkYbbJ1\nq9rK1nhgrbP1eIh0aHWprGddueBHxxzIXuTo00bt1iFi8wrkx7TY011xUD6O\nkFZgE77EWRC3vC872qW3kdTDoyD1amyfGBqdaWLKhwqU2mluhQhcHgwubcAn\n8qXswOPBFajL2ZbGMEyHjXvftmi6c263WYvCWS05sotBXIioCg94UueWeeE5\n3XN+7/T0606c2izwyoJAAVEUvnebffDfFxli0H5chr5tHAz6du+jh4lDjc8A\n5UNx\r\n=5PzA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL7EFjA+m2zMacrIu7QdTLzu4RZ+XSyTqWEJTQ2lOAVQIhAOCZJzD7JiXnzIcE2Od0GGpx1YeMT0lXiID8CdRzlz+J"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.6-745fa01.0_1565502046315_0.9568760038053097"},"_hasShrinkwrap":false},"0.5.7-c5e12e6.0":{"name":"graphql-toolkit","version":"0.5.7-c5e12e6.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"c5e12e6eb3b32e39e3bbf7dfa3defbf2bffa18a9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.7-c5e12e6.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-/um5HkbcJcSZkb+fAlxadEE8GiZYdORcbzs8/Qf2jxxDVGjind0JxUadgsfLEUqQYAJ6UXKdQouMLCRVRHLV5Q==","shasum":"1dccb761b86b9956b3eb4a86760a2d5fe5dcab3e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.7-c5e12e6.0.tgz","fileCount":258,"unpackedSize":396594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdT6qFCRA9TVsSAnZWagAAe84P/1AI00H4mEgQ1moOSeir\ntQZKC29wq9mcfko2C9RIobiokIJHMUgE9/wu2+KKYR3N3A9fHGB7PMVF5pEh\nIHqXS28OUj6vhI9nrfSQ/H0Rnwouru7biE13KhrOGkl+gzNw5Uqtbkv/I8rY\n9VtjdrOeLSBZFvamgIQzpd732Fp1DsFyaG4nE9f2L1S5FzpDTP7w5uohefpQ\ndXWYwORYTtZuV6ucqE0UxfkYQLXNW4fVH14z+i3MaACjiZ8t3PCZGmupVVwR\nIYA25AX4rcpZ3gyAbpjXExDdmtCdyH4nudnSFSR2c0up2kZlNbNGA2BJOVUF\nmFbYDC2hI53JIwasNBj74neTob/Tj8RxwKMS9M3giJemjSPoJDyVLTOI/vuC\n+iekYysu47XGOQ+2rFxZxcgmIxCU+BMQdk7GDyEGOYKxvqrXyQpk/dOI4pqd\nuxwRCCgyi1JHC8n7FHM3h8txgtwgj4gCRaaWZhfKuFesf8hzGpXUecu+n68Y\nYrsC8kf2wsVJtKhsx2R98I8RHP4CukV9dYRMugIdH6B/0+FVE0sTlGzdZheR\nT3hO60vVsWdOqPL2GHmxqMm47A6HF5saVpSzsiWiRFpbQngjUDXhQeZ/Mbm1\nx6It7GWYX0tASi1sZg1xO3feiaqhKe2srGoecp0YMGVtC/kIZY4rdYkCLxiA\n4TGz\r\n=MCqT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAMFm0O31LIdS+3fVtiJnyJtcZoR4oh2Ho7MMbUPKb0fAiEA6jKPyzkVzp4VVRGWldUYYcmg7yqTXjXHubeEMkdACP0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.7-c5e12e6.0_1565502085274_0.6366295391981844"},"_hasShrinkwrap":false},"0.5.7":{"name":"graphql-toolkit","version":"0.5.7","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"227680f02f7c2e3011fc78039ec926494328d2db","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.7","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-QPF4VRLKi+UFSBLK4QM+qARvi3qzdOV18AQ9NY/Dgl1xa1S1ELky5VAvIrqzZ9Vxlao/Yo6QGeu1iwsys9B5Qg==","shasum":"54b44aa452831ec01a3f50287114dce12f378c55","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.7.tgz","fileCount":265,"unpackedSize":405273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUAeVCRA9TVsSAnZWagAAzI8P+QFBRsR6SrEYOTJaeLds\nwXuBd0zZ2zx9X4qX2J3gonyMmtP506dUwo62R9NQ8jJTyS7lfixiMN+8iyB0\nlo99mHPWmZVj+lEi5vtZLlCPelHPmDnIdpzWG0h1I3BbDqXDsY22KuvTNy2W\nqOM+JshdB1jkXYQjl6N/UdcytuAqajTc7T/D111vW0ZgcLWth5dmlyShLRTL\nHhZyXZ1QPHK3+JSbGHPv7VvshckUisGr7eAseNwiVddcwHZCcNoKpETcU05M\nIx5sj1yvH3JMSI1e71S9bYNMhw8TumOhlo4BGVl7EzKoE2hKMFdOvF5eBzx6\nqiy6FCo2BxPug2VCoVCqBaFXWR3Y+tg+uCDpcOyAsztc1oIILIYfL+Zbnw1f\nOgbhPg5DxdOOwi/sR3hhHOYTHaxOXcz4xGrcXIvJjhpUnTEXdEnvlrmmoXo4\ntiQDT1WxluFKGkKjiS0LK2+OXKWfMgidFE+ToIZFlUdIc+i5H0qlVx6vPlDF\nISWoCpdBi3X7ChoKkUbXgIPIGjNWRmWYKZwEChzLFXr1hX0qo5qThEwVi6Ph\nYBjcErH6VnHY0mHYt5YNDQLXx4kTciBti9tE2us2wdIGdQpZ2Kv33eMbakfl\nXHDPVwvXJKxGG3MR76HGdSI4bbd9FDhwxsDGrzlvn9AjerNvipNItCJkvCVm\nTBnP\r\n=BvcD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqpGdw7X/P2Ppq41Jl3jh8ucpqDmZhgF+szYFnKvUVHgIgGWu7XsEfs+phMFbU9ErUDDGD3DbYe3cUN0vnjtRa3EY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.7_1565525909021_0.7901543034628482"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.8-227680f.0":{"name":"graphql-toolkit","version":"0.5.8-227680f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"227680f02f7c2e3011fc78039ec926494328d2db","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.8-227680f.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-obXAtOwwZm0i/cibKCBuOP6LMu8YrrH6X+bdZtAOkKo/uBBbIeaBqXcqgMbhGsKKcCuMah4juOlN8wFUbHisEw==","shasum":"7b8ec3de233b902f1edc634f97b3ddc789c06b20","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.8-227680f.0.tgz","fileCount":258,"unpackedSize":397579,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUAfMCRA9TVsSAnZWagAAsb4QAJR+qdDOoPTKGGbNfErT\nMA3vqBqK05NfFYKQXA593LdXWt7wYe/FkKxBcF9ylLAnAWGeo2rJ978fMzIg\nEWh3mRwb2U6wXaXveVCJwuFkoaFUEwRqXfHEBlqmgmdYWnUckGMF6JAmVWJh\nV0s1/VWFL3PUm3asOZsZt6ilh1/0rlJGv1yme/w2fF5kinHDTi4hfGEs0V1R\nFNNWLIkxg3mj/60qALZmmTZGKN+B7szgQWwzeY0HUsPiWnxOVkc97qkTYy6o\ndmmGaS8VtLtJeE5MRU1KcEu7nBwue6X9OGXxIA8r17njI9eT0XLhe7tn38fC\nr3K+rop4frweZK1tlAIy6O4mxfuofzHOeM4/EgzcS51dazbg7bOrthSA/UtQ\n/gROImtGU6262U5EdQjaS99yJHmJ9VgYMRXLcV9LX5c2cQxMroZVwMI+Uhxj\n+TqhxYG2cPTH4x4qaiu2eqsUE9qmqll0slUDNMFuqR4QdTpFdw3EQ6etp2pc\nODOmrhW2l4wN+QQpHrHnFc5S9/hBJwnHDbsyKCfGLjroiqLMWxsYnoBn0Wq3\nzga+U5YCL+AqjW92pRczJKP5alj841LdTQlWgeLOEXy1kUm4ROlS0x9vWoTo\njugLsGtsG9VrGlQrpN6bqyW/575fMkjGO6jGZMWrjbIh6ArJqBi1Cts3m46A\nzOrc\r\n=6gBo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1vXPqxI4ZpMupK/kIPhx4CA6NqZg9L2s6Jybhx5yMqwIhAPshhOwhh200apXKqy4NbVDwuJ7xLb60ZSsCLLK2bq1p"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.8-227680f.0_1565525963356_0.4531974914016017"},"_hasShrinkwrap":false},"0.5.8":{"name":"graphql-toolkit","version":"0.5.8","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"c9cb28861aee0393f7db6db2058aa6f720cf8561","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.8","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-KF6euY/fGs5ZOfckPYGWmKShItqq+ZnRK3kvgBVn+hPF85xebMTpaSsJbhPtzX7AmCalMPQZyZI6Uv1rXZp3NA==","shasum":"8a803b16ddddd1fb74f2c9c4f7654a71a49eb347","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.8.tgz","fileCount":265,"unpackedSize":405680,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUDaDCRA9TVsSAnZWagAALJ0P/0bbFD8Q4WRrpUqaB/pp\nhDlrgy2FAdSMKiNAWc/+wFKUAL4yFnePF8B+cCtsRe36qYvT/f4VsqPxpPHE\nBqrHP9ST3NGzD12x4kD3gmCopubo5vThEOSlQZwPZOnzTIWs98y2NEPMAUN0\nWJ0wKwDimv6GNJfib+ldTlRCt6Dg8tx9lgQIRUZWNZMFzl/OKezBcpgchD+9\nqJgniRDDI+oNuA0M90vfpfnsKb4fN2DgPCqpOTlwIdfYslZ1zCCKXhXpAVP0\ns5eAP02DAXL375anq6V8IQgo8Qwyc4fu2WURvvzHPQMwfrsI4kTgtakl7zf2\nCa+B1LwCkEje1IwXzE3406hX7F2Dt02njIHhVKs5RD1ucal0cK+0MQ8niy1T\nTL0RO9wZUnGQrW/IO+uTQHvV2BvRevBsDVP22sKfL+TOsiHwq9u2WMhbSYgU\nelp8nE7csTHJre++N7QAn6R4WFOWviEfCgbYmQqIxc7F/udg2a4nTrjh8+V2\nR9g7W+JROtJt5C6KzOOMx4k+V7wYYcexY15KVIuGbJQGmhU5UoJE1KQMNx+L\nDK7Or5S9EGhgoJjCbeEjZm3JKfAA4Uj9jSLrVxFEG+7zR68zLg80/RQwbSUY\napBK9xMq7g+PE7IvfiiYj3OujsGe91IqlHYTyY2J7KWxCZJohQu3Jc9NJgbU\n7BAr\r\n=Motm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfAkWLYnwvgHEJy38vQ+xFHyrAQzk90UUm8FGwX8Co4AIhAI3CcdxMWsfwcQbkTwUP4WEBFdufaAx/DXIoQh+LHSvf"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.8_1565537922570_0.47756248733868367"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.9-c9cb288.0":{"name":"graphql-toolkit","version":"0.5.9-c9cb288.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"c9cb28861aee0393f7db6db2058aa6f720cf8561","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-c9cb288.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-VHL07D8rCfRdg6m3pDpI7fZRsFMf69fWzbsRts7fObYAD4Ewliqfof7tgysGid+rgmXwPt9XO72fyLnYHA9ewg==","shasum":"3249a8b456f6fb21e7b95ad647c4a86be94916db","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-c9cb288.0.tgz","fileCount":258,"unpackedSize":397964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUDbfCRA9TVsSAnZWagAAaGYQAIyeVvObxdqCql82zspi\nki472WegT/JzCBWVUn3dCL29c69m8HYD2V32hX2mg1ZDESOvrk0KWosQdOfB\ncq0NBsjocnCCiTzuKHoFfGuW2MzNgWAHctYlP6jNcugSWfN4iqVMhI96tt+S\n2ekzCdTnKiD1ykk4X0+aw5KdIkuQhvljog/P0kccXP992/5RifRqf6V2JPxU\nxruC0yhLjva7y+Sz62tvz2ryQVnFnnSlNCKTp39TnHo7qcxde0YGZvTBYpds\nbTOAy+cKoGAk3ygkjiMcG2xF9ADISt5+llmRt/+fGxdIw2jkNGAxQJkiibHV\n0WyPVuZWN3b+Tbp5HLI+Fn/CNjJSvE/AUQxEkN8IG4Jxa07KlNOH29gjrbnc\naIobQI3Tj8izGmWNf6cCjxPsu8JnwYCeAQdMbhDEzPxPVfkr6vG4oSCZ1czp\npbbvOAosnWR4IshdG2n+aOXbu2UfqfJ7+tG3cjTVYEZMNhYYSh1HxxtS+BkZ\nOEvA+HqkXLgwF7DID9hX85c4HPv64y49wwEaSoldkip9rIIN3Es5Zu+IpWyS\nthN6wahxqROQ8LN3yCmuRLKLwfDbrwIwRrpwrG4oF6bfE2EzQFCow4NRnVwK\n8kmhrPWmMKlG99KwKVNPPY/EpjSTSLQfQJKfLPj36Qz+yPwl0R6+GLBkpGl9\nVoKF\r\n=yH0o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEmWTIEJDLVsbvV23gzhay2ZP0v2YNOBMxz8BoJ036E4AiA3UvWc3TFSNgSkoirQTDQ7fV5hLn9DGcGEgSDLAG8Iog=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-c9cb288.0_1565538015338_0.4294640320258234"},"_hasShrinkwrap":false},"0.5.9-2d9be8d.0":{"name":"graphql-toolkit","version":"0.5.9-2d9be8d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"2d9be8d3509c306eb77469b925744403cdd0561b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-2d9be8d.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-O+e9N/ZNeh03SN9vqCSa3ID2uKhJKFW0zQxi65gVfu3U8DhKVjk8dgIAoGamF78Zgnikgc+7go6X/fcSg106Rg==","shasum":"3b929fbe65b9e753f1b9b93e9217045bb6c1dac3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-2d9be8d.0.tgz","fileCount":258,"unpackedSize":397926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUvjoCRA9TVsSAnZWagAAbn8P/23/L//hP6Teexqvb6xS\ntBTqbQamV3aDPZf41ZBB37d4XxHyYrtuOt1hvbSyquYCDir16cBHtjs8+mkZ\nsRaU8Jy6JBtObEmWjQJkUu40KlLwrUj1Jv0MF8UyfMpOhZk8BJzVqRuqcz+i\nWMR/WWr54yiE9wNpObWCxAcqadiJY8HY6Pde+SW1TtfHISPzyO4OhVCkaNwA\nyTFqwExkDym0Nle2TBb5qxBA71CAcBs0g9DdwxFE4BSIyfhHn2djr9Ju45MD\n4WkLyaKL9fSjkXh69FYYktNhoZZMFfeHjudvkUtNsoCocYWBjPcYPLku2/ql\naGI7sElKD6jnQRyo21shd6y79cUKVJJOLfxloDkm5L+Z8xh4F9Ua9GwNhzxu\nCvp6nozmB6XlRMbCDTRqzDV6NxsNXYSC2m924SQAT8H13lchKATxTamVIgpu\n0ePzje/LHjCIVjSAtqFdBQH91kqO3csicG5+QXAedYHPioLah2L0BIphIGjI\nxy8xi6qDu5Ndn31dGArhoBanlhG7lm1cGv4JW69RUl/I1FAQFvnBlq0zDd2+\nsp39sTPmsab43KvnkD8VMwCOJo7pgILkaZvfjKmIHaoBomayyBK1EkOVoczb\nYboYteWMoZvA/YiIAovzWeAjfXayd6YnsOEG+28K4rrj6NMdxcIFIGsu7bE9\nb+lw\r\n=B9eB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRIFtz+KsZB8+fgUWZHorqd5VF/Wd4eiLY6EKByUvLzgIgBjt0q/5eqiXVIkXUkaUa44W7uCndTTsES0j/6P5nJTE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-2d9be8d.0_1565718759445_0.11548787964659679"},"_hasShrinkwrap":false},"0.5.9-67a6309.0":{"name":"graphql-toolkit","version":"0.5.9-67a6309.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.6.3","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"67a63092d17152b1531a9c145ba0157f6ec8d795","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-67a6309.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-PbHpUkei6y481sapelQq1MwBV9zaY4ElHWaz9yhjJJI7oz0hklNgJXOKpTrOgwWD24QCBGN+SaXjMMWkwtWItg==","shasum":"4f0e1e41d7368668f3609215ab22278b1c8c5e14","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-67a6309.0.tgz","fileCount":258,"unpackedSize":397935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUxHtCRA9TVsSAnZWagAAO44P/ROMP/YucPJjKjKLXshU\nONQHP0g5l6MrCSKY8nr2lBSbJSa6wxE7kYvXCQS5IuFtYHw+bOrz0BPsEzM0\nR4noaFW9gAveBujjsr72Hp6cSf64acigy//mye2YzH3uFNhclHBpOVJUG3kO\nzQ432j4L0hYs6/6KxcgqLV6ctMhrF6mgSYoWxGN1Eq9HS/8pA1MQEawTiGzO\ngGWhd/fdVWdcGmI4JWIymPU4D2otD1Y0nV3EocpEelo0WiOeRdJvgUBee8bF\nMc3+KPlTyCNmfN+v5CX7bpSCNkGfaJpAB3Kt0Q41LsoxCWGegGGGJvkySAa5\nkKbFFImnFP6Ey+Ja980Wulo4/Ra31EgjzY0HjHyP1Jn7Adsk7z9PvVoOKcn+\nAmzZjqJuxxppeuTRwE/q458C+O8Gk6DMTxsxeLPQITDd5uuPcrPW4kaaZGhS\nHiNjpo4JwXdWwKS3kKfJwQ2pYLrfl4BNxKg2UAVKJdsD8mkkt30Cj7GJ2gbs\nEVQwMYB40yKCyR4B3gIsOhl39icnGRjxYWY6OciR2+H+n845aA3elxLnBkqx\n+PDd9T+tSn8brcbTerHAMBpTNClGWViRsi9f19spgTT+bClR/2KkLoG0vf7O\nJGK3TcuSP90bPbgDaMt4Kp7ztCMPonCrc/tS1WjQrZ/fW7gUoxGtW31p1tQb\nB5es\r\n=WLuI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEIbmvBpFHneCbSP8jtAcgpE9E3WtL3PfnEj7q9W2y/eAiEA56RVsLZxTIIUhBKos9LwC889a53SibjQC7dv4UwJdY8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-67a6309.0_1565725165160_0.11378855679408817"},"_hasShrinkwrap":false},"0.5.9-b2971ff.0":{"name":"graphql-toolkit","version":"0.5.9-b2971ff.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.7.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"b2971ffe0c30e47e427cee896e937f49a705e62f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-b2971ff.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-kHeXaFZSVhvFGOKE1WVfSwINh9gdy1jwrTNsyjSG6nOPRDkTISLrMW72Vg9qJkYDvLddAIW89jgNcw7q6SEFTQ==","shasum":"523574dc761c6f1faf697acb95afba98ad34de7d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-b2971ff.0.tgz","fileCount":258,"unpackedSize":397906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU1MFCRA9TVsSAnZWagAA3pMP/31BZ+dY4M69E1QD1LYj\nw26jpt529TznyoqHVlwcOV/O7qZKOuWgX/NHxAQLwLKppj9Tu08BDwYZKsYg\ncFIVKb1niuL+CQ6X/iC5EPic0iqT4WSuBjVrX1pIK6kQ6DeImMnMp00jgHAA\nJdwkCFq8gUBxPrEKd5Yp46P4QkDDcpqLcFNNXvqAdNEtaIut8Mnbu9N6Ba4m\n/JIMWoqhUEDH91/NwWhmkHIWU7eXscYfmOhxJj2sI+oblBJCfrhhTXyEp8vU\nPyDIdJIUqiEqLNxv55zOBXNwXgRS2Mpn2UZSVKNA5PR74pQv21rCKqdXqZI4\nNq44muaWSZ4xsuVvN4dmJPdsiC7Oi0b5YC86tjthSo7o0B/JgosefdkatM6D\nXgMLNGvs0BPWpnCgLJCTk2a/9xZK1XiMEa2gkyVhpaEsfBmDZBbrjpX7cF/K\nluhym5GPJMvtrygBMwbpWu0T+o1rLQqmMhY0LhVLpCFfmAaVVKeJLVVo1l34\nlCWje1pO0ecAoDd7PSlqXYeX4tvBk+d6NOZGfMs73ZMq9A5MzGFkbqPIxCNi\nOOOsXKQlS9if+f8NGWVpXal86RE1xq9n3nif+wpWKbQAw83asALw1tpruTg/\nJQI1SajXeInOiN8KVwow6pFFsyCBvfQQHWdEYLQ36Et/xObVxzwnWwVebSNC\npyZd\r\n=N7Qt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8T/zYVZhrXCymJg8C95MU5CqKIHa99gnqqvs/h9BMBwIgNKIXSJ7WwPaPHNGnX292zQXMK6hKYoW7m2BRDC3l/tM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-b2971ff.0_1565741828797_0.5010331591585793"},"_hasShrinkwrap":false},"0.5.9-0bfb030.0":{"name":"graphql-toolkit","version":"0.5.9-0bfb030.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.7.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"0bfb030788f0cf6a915c3bb3b248e8f718b29e2a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-0bfb030.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-aAAF1IoZ5wLPMa3UtpOcxZlswQwXcyM/knZI+h0Xf1YcUfZpYBbe3vX5UnjSwHIRQNFvAzWjDWtSWH8ybYh8cw==","shasum":"f64edd11a34df464708d7ba9d09669c425ba31fb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-0bfb030.0.tgz","fileCount":258,"unpackedSize":397922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU1NvCRA9TVsSAnZWagAAusYP/A+1z/YKfqUIzq5HuUPL\nrFotyWpCZNc6bTt6HsIqdmugOrPbZgs3K4xQQLyFMWJ+du5M3TCob49EjaoU\nSQ9IOQKD9Xn8DfAYP1sl4Ra9nON/UwWdIxCU4XqTdyXQdqhu29xnu4yqIEZ1\nitYTWd/RKbnx3rUfJQ+VDz7oNcSr5s+A4VX99FdTHKvsVnv3xWK86j7tiDqM\nNYC6JCRM3p4LpyoQ02CL5t3cR3t/oQY7wkFzSF4w1PLNU8RtSRamKB097l85\nCMcjj57Qyil6+Rx7VfTN51NcMPssU5nmlANPtS5+tV67EIenULEqn7AAjJrY\nmnWlI7yI/VIEtFyd7zJgCx8PzNjBln3uUTCoruYHNWXPugB2lJ68GhjwxZjq\nQz8nliNYXQXwTgPqxdOoqLKLDzrvzHpp+j/JHenuSvXXHEzFRvVV7Ftx4Sx9\nfFv/VJjwdhapQbAYMIzW9r/hA5gBuS4dhkhHB03kpxWSfzS6WMvCzfkEze2s\nKYFxghXm2pXUdM8W4Mngnt7SEeRFbG3+gnm0GU7YodB9lGkUXPh9wRhAMprz\nxp/m2kxAQbk4uZbj1tsVdgObAA/H0AjU3ZhQEfIRTbXRz7IbMrvNoGrt3B1c\nmRZe5BQJGAnx5+VEJ6xBQ58m23pjC0Vwx5M6CsAPn+eisNpbW6iWo3tGlLhu\nf6w1\r\n=fuvb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGh1uszVRnYwZG1f4Wo0cbb/CSewV7SaNRKQRT81TX9WAiEA/9+CsGudNeglbFvxJSuVKgxTRuYON2+c6PH/O7Maki4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-0bfb030.0_1565741934293_0.5221173011874709"},"_hasShrinkwrap":false},"0.5.9-d476fd9.0":{"name":"graphql-toolkit","version":"0.5.9-d476fd9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"2.7.1","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d476fd9c17960846e16f48607a4c0ab24206c72d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-d476fd9.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-eXbBQ6DV/TMPyduwvv02DTRHFin04NkLrUz4enuvV8ujgTFprbBXUTl9Nw2vHsDG5tf/xuunBzOWbrP+RU09TQ==","shasum":"6e20ecba0c2979a6095800e0766b4bad09fb0b60","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-d476fd9.0.tgz","fileCount":258,"unpackedSize":397916,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVD3CCRA9TVsSAnZWagAAmQAP/jWY++guz5My4fGBlvIg\nWUm+scUeqlWhrMG9ZhDid6BiCxtNFhE5vNRZt0kVa+WtPEV8eaFSlGIuh6qL\nf6Grg4y0augtJrmxjsbNs1+Fy6f18NXNNcFJ0gzCts70/praJPIIw27aFpXs\ngFlXtJqdwrTtvS/PnFvhHo0fSBt71VS9P4f3yzKKW+vBX/KQxdA7boRWTfG3\nYJ47Oyq1IaBukMFRRHmpPKqoA7Aus0TNxhw4OJDtV5MWOVnZK9TSm84c//qQ\nHsRiLUNWC/FJRErB63zB2YRHFq+8sxImvqb1oX5DbLvHmpXjGBmFD/Ryj3bc\nnWdH4Fv207ZqytbQzpmxTYbPP8rtx9uLVq0pjFXQKgvIQEozOkWN3ZDSxaLU\naoCdzq5BKsCuL3OcAoenq5aetp5M1HqcF9B5VaIF6I49QYgpgevm/IFvoYwp\nQQGpdtWM6UmCHjXOC9er0Q8s9KbXoO0hU76CL8WL+/JE3Iit1C3FkbV6NfVe\nxzDvmr4eqWh7NfYTV6kmRCP2owNAzsSnZDIbBG8AlctgY46amZ4MPv+stp6o\nRxHARe1j+9YW55a0VD1/VmwrUDY4/LOy0yu6jqyxvdADRw0+xEVjGSbqRoCJ\nsXBkghlhDmLoZQDYHF/rZXW6k3wvdixqeLRy3BdVUXCkw2v5lMjUmya9ga3x\nXQ9d\r\n=sffQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLmviVCQAwA54Yh2gTcLDaQRl95Qo+CiBoveTmJLvS/wIhAJUjxKEJ9JgHMe9rRDyqJNmNi51bDttvXU3bMuKE1sAs"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-d476fd9.0_1565801921834_0.985898284912198"},"_hasShrinkwrap":false},"0.5.9-9fd346b.0":{"name":"graphql-toolkit","version":"0.5.9-9fd346b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9fd346b8ae217bc38448e857833ca1b970a0c7af","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-9fd346b.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-PiZa8ZQsWv5DD5/6i61oAOddu2D9QQweedc1cS6ZLFRAKK+gdLVQR1ABsS3nfV9fU/7M0E9e2QpwYSlJ3DS0Iw==","shasum":"16678ca4258a297db229640b92ac9b1beb5a5d92","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-9fd346b.0.tgz","fileCount":258,"unpackedSize":397942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVFIyCRA9TVsSAnZWagAAyowP/0wVQwBYu5YojiENtpzL\n37Ypytnsoy6RIX66oEx9Ws+MHHxfan7gantlhLCDFIv41rgTsl21MlGHBKmw\nv7QVG2sHMVHE4lE+9hBww8OHP9ocbszxg8GNunxafumKZ494CKu85ndf9sik\n7HbhQw4cp2PeFEJfkiZdvnBaMtbekVwWoRBTWYzjOmHAjhJ3rwkyehVNKpsC\ngDp/1bOg0JFthD6PkACX4FgzKaOIwS+DQpUVITKiFoF/iqfARis2keE1hBWg\nKx+QWBnvwoWJN0IhJKO3XF/v2Yci9E/j/CWZVAUE3+5HgrUtScNOPBXj8mSP\nvuceR3ZeZwNs1yxg2limrAe0uz8vvxY0Vc/uAZzUozPc3GhcfxLRPJOJtLdt\n4wV0S6BPGDsU43VQRxAEAZ0FMoD1nWvFdG+KXsMpZDteSZJ4dLKXekQ5FkLS\ndFCFTEuh32yEjz/dBc6yOPeLEeMcZi8/l9SJV31DaH3iv6Y1WThVU1QQRufh\nmNtS7ZewW2ya5wiSFTfjU7Wqql4n5npale5TaqP0zZ9j9tjOn+V2i9VXqWwh\nm2XSTobIN0z17CHC9CFhj/Yb6fuOYplTPzPhb8+Mwq8bWyQGtdm+HGdB96w+\nKfXbqW7BUaos7xSV76cVNhIQv9n71ZnVuHBF8DvDrAXIkjoMXc+zwqEtiq7g\ncFIf\r\n=+r6a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqvbI4HoW4Mse91sWGfVGu0mXPX7br4Ow5s88VGZiEQgIgEvybNAho6z7J8wAc+pJ2euHhBstKRy7AFTAQ1y3+5Fg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-9fd346b.0_1565807154329_0.06740646533013339"},"_hasShrinkwrap":false},"0.5.9-4d01c90.0":{"name":"graphql-toolkit","version":"0.5.9-4d01c90.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"4d01c900deef9c5bd5369da6e763e0b49f5a7081","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-4d01c90.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Ya+YjQ3FBFgO1lKZozDhcuYcfc66tYPVS2Re8ekTLLo42RkmbrnzIx1oRQ9IBVLxRcdiDMJ7IjHlO7qM7ESGDQ==","shasum":"4c3e4fba2846cd7d387078d443e79cf60588f1ec","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-4d01c90.0.tgz","fileCount":258,"unpackedSize":397911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVO19CRA9TVsSAnZWagAAF/cP/3JYqYCdmz5Vzn36JjCM\nZFFk3WyuCuYLX6J4Z8P0ukvJYU7Gy2AZ684sqcuObGPNtiW5Cpzb3MMi95n+\nRNU1j8gHMuFVjr0C2k6piSfBevZJ1fPwVBxI/1TzkfPjPs+1xwUPX+nbEV73\nZ8+2OMEjgbY56saEwx/aq3dpRh9u8NvfewWx8EfYmQtRW/sZoj8poR4H/Nyx\nNwgNNVlAZmPhub8qnfQRXGIpYl6r/kshHtv0skVUPlHL0jlh43Mh4iu4++7O\nwC5RTMfHx1B32k/7xDJnKHOPtp3cy1GlEBTa+12RpB94yQj0ax04l6FuDHvS\nS2WAlx3X94TgH2UuJGXiwXFtZIKfWgsCcZbj1uvP5hzek4c8AYxGgu+bvmAD\n19KMCyVhM/xCBdS/bl5U0W8+pTWcZXWlcDeyxyyz1AcvyZt4T2oe3uBhE5nr\nq635fk9CXnFggkWMcVmS+0aaBfnbD3XvdfMsdRZn3dr7D0a7ikV5aVW1zJcW\npV1jdSlhHTuAr601ZRAMb4F03KbzSQPMW8TQPIHkjZKj7a6o0Fdh16bzQcpo\n+XYuAiXgqT33CAUqTQdTth93KoHaFGZDKhr9xx02xPsnsYIC9BRIN5svsa0Q\nIpIJkW7wtbN/t8fUCsMSSUEzM1nww2RXGP/UuHSbSd9aqRwSmVmnJpDUWeVd\n/9YQ\r\n=8e/x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYmdtxS2tmKsXUADA+mpRqVtkeDF1yaq+Nn/MIpmENJwIhAMrWD8nB6NYn7BMk3iTrIylGImw99mH1h5IJpftQcQnO"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-4d01c90.0_1565846908698_0.5581523596228484"},"_hasShrinkwrap":false},"0.5.9-657f7d0.0":{"name":"graphql-toolkit","version":"0.5.9-657f7d0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.8.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"657f7d098659407e79921cd93b3324ae46d4d9ee","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-657f7d0.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-F37S+Z/DyU6XlsN6WrQw+xVcUcHt1t/d1xdiiDGiIpQV/Iq3yVFoDlqWqxXXbHRpvW+13qHalAbsIqakp0YF0Q==","shasum":"0b67fa29c16f199b75da644247fe8bead2a5a247","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-657f7d0.0.tgz","fileCount":258,"unpackedSize":398352,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVWPfCRA9TVsSAnZWagAAHEgP/2SxALay/V13YL8ibWZw\nxPr3oJyRnkiAaWpGEgF7bVdWnZd4ICxVTPeRdCIO/ufMKyrnt3wfbwFEjdn4\nytJ6Jo+2yV93mtZWzApKx5sABfollUEQOc/ICNGF15TCfkYGCC3optDlBM5D\niPpsR9uuIttKWQlSDRChmbasF0Tn4yKSaBFXiLZOUIkiOAY0Dhh2fDhwt0Cc\no3dvDSrEmdDpk/PUHc9OTIyyR77NsUYnmv6Obrq5gOhhex2jV8Kc2wUmIvyV\nS2huDc3MP/caALZPmjcfv0VcVr75C9J5cp5dN9N/xUfMSz/3DEkzv8zEoWEb\nAAVfQEvoCX7pXG5BEmji4v7XCV8jLkigj1Czj9gRPj9KcgNes8AWTFZZ7ZB4\nyGeQxYHCa+pjURNLiFqrrH7HOufFQ0lv8xevrvztVCMC2pOiAPVNc7plfug3\nOKkpoXmYkdnUpGqPp/MxGl1gfepmHDY3/2gfsSSSKVx3oikMVsd/Cw7bLsaJ\nIMhMz57FhHYMoSSDqGQnL5Vf1YjPoB5k/m6gHD83yLvJ9yzqKeJgRn0THdhr\nWHj8RbdPKwkkFVbD4dPytoBVCPKXYApDHbvQuYHDPoZnhg50p+BXcKrx+Sco\nTLY0daImC1hpDInNG0ov59LbT81hexJHI9lAY/Qhb7AxI0mHZ1kbQoKilMwV\nlgS8\r\n=JtIl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqgQG0qn4Bu26q4jQOaM6+KvyW2/N0VjZU/SLEGUzXgwIhAL0akkY6QOkgEvJ+gFfOThHPv+/Assqw8FJOIzIVmGaQ"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-657f7d0.0_1565877213936_0.32579381471255897"},"_hasShrinkwrap":false},"0.5.9-dc25ab7.0":{"name":"graphql-toolkit","version":"0.5.9-dc25ab7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"dc25ab777f76cdcf90d8f00ccbeabac0c2edbe7a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-dc25ab7.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Ejjb5196oJCDv6SPt5yoiWYOAw2WyNGVj4Wf7ULQzgZxG6YeGUrYfx+fOvl2qBjWZdVhCimt4w/QoQSwwjQd2A==","shasum":"43d836426db6303d49513b61427bde39be2066f7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-dc25ab7.0.tgz","fileCount":258,"unpackedSize":398300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVk7sCRA9TVsSAnZWagAAACAP/1A9RhGkCF8T8S7jW8z3\nb2twuIZr3DPKcMIRhbt/wK7YqpXSgNwGh1xUsvw3FcgE62io1onQwIz6oWK3\nZmwtKXCUMqt2wdJD1Qbc9jYVz1fufU8vdtBmIw9huxhiWrd/pKW6NZf73LF2\nXjWpKyKsj2hQxDMTpGnIkkQyfqCDzFR4EJ+EreFpYERelN2YCODwIvCX+A22\nG1guWLplAY7KuwBedAisFt9wgvn54iCjmUe64bPv89sl3QXoRyBXlg24dvEk\nq/E++NvRbXdr5SH3EAJZts8S2X5kkGVtbd1T3HGneKFqDpsTQvtTO82eYAcr\nzVRy4VoegRll/g9CqkUd3wy2Cfgm+ejNeiQxkGET1GVGn+APLkvkdKMK5hDm\n4Y/MCppQ2fEMoMnhKk5GtdzbLu8Wx1NPsJAU6k2pHkqFvri5/ZcXElCgoANV\nTgXkA4Oth8lnqHu6QHg2oYZ64rr/AaIHOTNGeb9Qr4vGX5HSFiRwXHlJoQbg\nL1PRRucshg0n7ZzUM3QmnlKQGxFIYoickjisQ985XnjDTwdMsUu9h2XO76rj\nL0TYc349T6G4KwNv7JTrpfvphIPfnhidcVO0j9/q7j5QoMu2YkEztl05cCzE\n0xx/HLYlqU3IDtjfld5//npzzb86hkw85r628wTnNOmUa8glg5varbTm5N2P\n9ku8\r\n=KeNY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZu5u/i/MxulQcUezdv9x0l3E9surVamXOCaWioWblaAIhAIs6WANxGzFzhzdNtyNYhkt8Dn/Ol51KO+F9vJX44zmq"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-dc25ab7.0_1565937387358_0.989743048321023"},"_hasShrinkwrap":false},"0.5.9-9b41b3b.0":{"name":"graphql-toolkit","version":"0.5.9-9b41b3b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9b41b3bde102847b957122c4b977e5632b23a35e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9-9b41b3b.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-sGgjMB+t2DcBLkvnMeCzMWAcPuQwPxe/QCrPxpz3nsO4UE7bk226GzSPFjwckYM0+cXQoQ3s/KTJbpTjKMLjFQ==","shasum":"3f72e56dbdf010161cae939026f08ad10702a1b8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9-9b41b3b.0.tgz","fileCount":258,"unpackedSize":398315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVlt4CRA9TVsSAnZWagAAO2UP/22nr9PM1NX425fDLssU\nhHFLvtZ5lcj2vmwjHAvG+2C4oNhBvzdD7pMyhjl7vUVwzkfyYyQyHzEE4vAJ\nGVSDe1tcUfv+uHfNdV3WT0NYvi3nr+rNYEVgT5KalAhYgSLo/cAz99DGCWhO\njFMCErrTOKA0wrhXB65qM0igE1iNWVDa3MqXel8JsrLqIAHRPXA+VclQkA2R\n0fXo0i5wP1XFdcbP1of0+UOINRkJlbNtOdrya/lH6YTV6YjXZvlXQGxq8W8e\nf+CXGp0RFBmYI/7j6rkQBI9OMl0jov4DrENigagrgfbh0IfD+lvo0/v54C6N\nMYeov/XmfPo6jrx2apjYHibLzus3ZFtjRwYnE9dnLQ4Ui8IAyILXJdTpdX3T\nVEVlBCUn0wSqNClWUxM0Re8zB062lbjF7/Q2xxjRM3PdIxPATR3udvsL47TM\ndzyocalLF9f6UQMKupSwwTpfD5QDpN40+LBPg5t1FsOIbfZ4+o9lYvZblWSB\nztTJHMmnV3lZPOw4CMhjZMNFdTnjNzXvTT+xF9OXDqu6qstSEeS7lyOwYeIL\nixd8YUgWPI0I7xmQn1kE4HJVGdZdHgaFPjfB5KCEnfYItsoriUs2etLJntsp\na84AteSyKAgf7TjVyfirPdwnKOHIz/j2pzZwrhY47/uoNsk8fxHydXQRrr2G\nH2dS\r\n=IeSC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE1D0S2XaCtXkp5MV8Qh2DpnUMnHvnsujUZIjKtuH7kCAiEAtV21DrvhM4KhJzIJFxjoQnDXoQznU94cbbRLeBsY9n4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9-9b41b3b.0_1565940599534_0.015124694129069916"},"_hasShrinkwrap":false},"0.5.9":{"name":"graphql-toolkit","version":"0.5.9","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"79a591494050f3fa96b56c6847e041009fd5a2b2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.9","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-Ndig9yWPROsxDviijIzeK3sUG6VuCyPhiQiBzsZRHVOg/RDc6/QcXfZOExJD5WEWBUIKUKEoAWK746o15Ao55Q==","shasum":"456dbee3c5e04747329c9f807937148ebaaa0113","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.9.tgz","fileCount":265,"unpackedSize":406412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVmCRCRA9TVsSAnZWagAAfIMP+gKtUY78WT69Un2TqCJS\ndWoesiPiqaGG3NgevilNZa4Bwn6dLKBc80MTaqwAx1GBpH8eqRiCQ93wKPNN\nc7uaYoQxrM8rdD3vqPCgDJZm8QtAtEsaT/QwZcyZfR4VKisOPPvwCBL2/aQP\nAy1puo4krmNUooYSFtReoSItF8gNWBrMPlSnJz9Qwwg4e7QjoDt3xJpVUe8L\nn8yZ9SgUtVphigchLtfC+R65TbwqXnuJ/IDcEFBTed0S4G2+C0uhml5Hdn1l\nEETacCjBZTVzfEQ2Ge28kOnBZytpWyicXLl9wFoVFfzPuiVZgLqPjO0r8wDy\nwS6saLTjqsDLK5J23Y45c3mmsuaZy8qw3uGIRsHXfQXZJlskic37CK1gjCFf\nZTCuvLPU1F6mpkCPrC7RE5y3+QvoikIfFprTxlLYW7CcRN7ApvFr+21ujzEV\nuZT0MBg8uUXKtQ8VN8TaxE1kRPm6qDGaaOZ5QDWD+Mxayr+qYPcM7f4InnwC\n3p1na9Szo+f53h9uRJaMdmVOfOG+e9vqkx72dtIGJTFYBLts/qXX11IhbFcP\nTakqLHFEWGOmRQlhPGgC8huNnnadgiw8QseFyfPNbm8+fE9hObApoXQeq2o9\ndkczyzlHBuqx6kxK9brwdPDxoeK46ZnTeAAN/TftHb6eWbcy8xVyjPNZ2HPF\nm92S\r\n=oDYg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHLIMYtwL+Khx2/UAX27eeUOdAQzdrnS0wuVA1SaRizTAiA5CZhq4PLYUqTBQEzrJ7fupeHtQgz7DJmpRslsSTuFfw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.9_1565941904800_0.17095488628978583"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.10-79a5914.0":{"name":"graphql-toolkit","version":"0.5.10-79a5914.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"79a591494050f3fa96b56c6847e041009fd5a2b2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.10-79a5914.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Ec5SF9uOMQfgyiJ5IRMd2KMNFxSgS/SHvA6Z1ACF5dd0GcMoZRvEXJVgDgjp2NlYQO4TG2c6vMIUwU6GAsOpbw==","shasum":"b1ad1019c999b85ae5c123d11cfa3493070686de","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.10-79a5914.0.tgz","fileCount":258,"unpackedSize":398772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVmDmCRA9TVsSAnZWagAA3nsP/3zYvvNQcttAuxenz90k\ngFEEkWgX2Zl67M03KEoMklxkXYszllJwEa/5a//9mN6U5MdRy0WbUjEXlDhM\nodG98p60ZOGJaoEf9nOK6CcimrZ3bS4B4eeuLpsdtiTalYzZddO51mJfJ1rm\n3ZQxm31B+HQHb4A+9mx3W604uE2Or+TPM5whBSi3At+jU9QDMyPs+GqvnwN7\neHqPj0zw0NpAwhbkvIkq4hqTYvyzcLrcVloQ5KEFzBAn2YuH+e7ZB7WWB0gq\nCxqgnMTDvpR7t+UXyeQtlEEZu+70Wyw3+EmyRdU3wj4k2lYHouJLZFVeM3Mf\nBFSHalPoCd0+0Qtqf04bTPamvJOABF/95aqKa9+urBmg0Z7wYX3L5hRwHwzq\nb/hr7GaUy0oYLI+FLyd4vvsaYAopcOVRGV+GCJt3BtZ/Bumsn6RYk4f/d0P/\nBILCO5sAT90jBrdkQNCwAo6t00KZmfdMWLDD2Q58kbbvhxARP6lgSpTFv3YW\nkmXd0BsdyYJeGSAwg7ZyeLV6nmGRedSy8AD0aIF4fw2SqSoxW6VJUB58QFoL\ng7hMlk1hQlsAde1g3Xs9LbEeULhBvH40lNqS2fqsF/TUSRhcWOonSvO+bnMe\nNdjjCdngqUii+wqD4/P06kh0yiB5FIMIf9RigqwJq1+oIU0IPiLRYQ2J1iIb\nNjKz\r\n=XPJf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMM57BJLRfxvEVMaI9Q5oEPtDJBRPY8ypkCwnH/mEHpAIhAJsEV2pm6BCFsQPjLDMf4IJNBZPVyDoKr51TFYqd2vFh"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.10-79a5914.0_1565941989550_0.8763795994925876"},"_hasShrinkwrap":false},"0.5.10":{"name":"graphql-toolkit","version":"0.5.10","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"dc6fbf452750aca90dfc73a464328ebfe7ca927a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.10","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-mMHNezD9oT0IlM/vkZd/aeoIKtXqKnZq3ipJIMcHZPmMDPcZEf7BMzbB8naKWSWPaB1Iskg426DrfzQDUgU25A==","shasum":"7b4d5e84c421ca72801d436084478d4a7ac06444","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.10.tgz","fileCount":265,"unpackedSize":406439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVtfcCRA9TVsSAnZWagAAAVsQAIL2j746fRpFrJ2SErDV\n5I8fWmcw/4GvZLsp3pszPtgY/pKlcTvf2636Ba1SCl1+I8ZkHwzcjEv0IeV5\naMdHafkRV/guVNKpeL2q1IJTjUv20UrLp9VwO0gABbyPe5QcO1aWfaaRtGkV\nolFp3dS9Ik6Ex5+GzELXnaqwahuJG2UQOpXKfSxnIP5TxyG/qbWUtPYbDLQe\nUO+iKNGC6MujdVZqUdSJaFHXiNpXt9skuu5yIulqNjMYMSvnYLPoY9bEXKge\nqfZB+MwFI7+Sj+nOIkFTGQFi0YbY3ERWodR3Zg2GdWrkndvjOI2Duc3l3GvJ\n9UnuEifoPVx+xnXkY1yc0BhrTp4ezYQP0m9zkZthhMjG9l0oIRoX+VVdUNTK\nbY0oso08hVA2VWPfaWHzZwMZKT8Tlii18nRIRiQeWnk9OUkCqMs+1AplyhKA\n/YjiD8M06Raiz1ngSvXvXkhAGIXYIyDh00SOWtaI6lYjypPugQzQvPtHQKjY\n1DrOol1v0BYvNX6Gemo1qdgYH1C+/f7drlYHaFOkO1K27phgovomEOVdGLKF\nV227Zc9VpF5Y0qxowGj+11E3dwpdFOXyJB8Z+iJpLVzrNcshGXwye03zwnd8\nLl6CGpZlUT9IHQr/sNr4IfAEWUd2/hzN9IFpDe+0OU0ecyjR8jeLvzAQCAmv\n7lUg\r\n=Ikkr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiihZsJ9xn498PvmCU9vGjklTct5tdChxDLuZBLAV2NgIgEsgG+WEiA7nUdW/fnOJq2mzSku/tszUHyyQhCrRwmDc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.10_1565972443289_0.20648175621886034"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.11-dc6fbf4.0":{"name":"graphql-toolkit","version":"0.5.11-dc6fbf4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"dc6fbf452750aca90dfc73a464328ebfe7ca927a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-dc6fbf4.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ZCSarRLeGrXCJhM3vWTbK9/aoYDADMaaH7B4U9pzeDf27WDem1phCG4WG5k6Jw1yjlWAdmzojzzp3beCXHNB1A==","shasum":"ca5e8eab1d85c45e6e76ac17b476edc78dc50909","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-dc6fbf4.0.tgz","fileCount":258,"unpackedSize":398803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVtgNCRA9TVsSAnZWagAA07kP/3uf+K5Heg1KrGqj9ohu\nVS25sR71byjiMHjKVLIMZjOJhTfe5YGqYzBOSyQpfyn01qMjtod9T0EpUMci\nTVCKGisBSZNttzbTmD8z9PDY4FuxzivfuK5e4xjusgJvPTWTheuHGTVb4GBo\naygUSPopzeNXgcYp36zaHQr4KMgV+EsbYJEljCQ+8JlmnvThVHLT/rZaD0TA\nMlBFKBN4SsMbh/Vo2kc7w8G6uhEC4y8IEi9ZyAH6Qxo+SmczFruKbI0u2Bqg\n02V+DarMOeTl/zAsQYeTUo/yuQEFsxbQy5qOaxkSSy09YnzSrqKEUdoJQnj5\nRapGz+1zV+Sw37xcKACM+51RF9hp26Afycg9zlT4AG1cFFb/LlGs0E5X06RE\nd5sKlEpfe3Kp7XCCgje1Urutj6ZzILQ2inOUvMAlH++qJxll6RNDukf3L2iw\nG95qtcTfwzvRWnwMjojSSHwKZP+IXtJFPAfjT3X0Khdy0Hz/QaPIQatKX15l\n7TBo2pwJHeKIc9i053jUc2LnH9o37iTY3LoolHVgCvEhbmDR7+Pfw86cGtZP\n6IRULugAUv5kzAMDUmXeqHiYXFOh9BfYrmlFezu1C/uxbqVyY12Y0sxTT/+p\n3nxGqRjxKpQ8+tyCdXq6j8bkG0eHkUk6ZcNDOp3jesBMqVm0hMjrxV0+xoON\n1JoX\r\n=TnDx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDPjFtEkRb7WZpUBQC7GXNwe2BXY0X/MCCM7ylA22ChtAiEA2jA0+kjPRAYyXolYxt0qrBFTQgxehYRzyGZuARg9rbw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-dc6fbf4.0_1565972492629_0.7568146559415507"},"_hasShrinkwrap":false},"0.5.11-f1d04e8.0":{"name":"graphql-toolkit","version":"0.5.11-f1d04e8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.136","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"f1d04e810e328548ff940f6115f104cf1c0b85ad","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-f1d04e8.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-bGcHuF/gHOlIOJE8Ktq/Kx606WkzPTihkpJurlt65e20H0g0FVXuqkymllrSbBL7uEvJWlwcoL4U4TPrLberSg==","shasum":"0600f2754e67292ad589e37da2d4de124668b3fb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-f1d04e8.0.tgz","fileCount":258,"unpackedSize":398809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVtg7CRA9TVsSAnZWagAABwYP/2avLY1poP6CQZHhlV4t\nMpxECPU9j7ac6aFjTgISNR1yew3l7NF6DoGVBKKqPFYMMadd+0BNLUGcRiim\nxmr0k+ZPkcaue9A8E56/0kjg78LDzFlbwNFdnpaso+tduT3GDobkC3e+T6Te\n2sfsPJMMrzWGmvRBA8+txl7Ocr/glxETyhhdz7wEcnfxNwWiE9PGzuT8K+YA\nwDVUMnyAd5bh9Zl/cW9751xSRX1pqB8QUjTCbW3fRN4kYYqVKn44QvrGRcoQ\nXhWtR4myByihi8YHr830dq19yExe6Gu1JJ20MG/7TcGT5afPvcw4dYmT7jkO\nl7G4E6+H6TtANUjyaCWzgi0Uh3X4UatV+TnSyROfAx7SOinXtYExH9Tl++Bb\n8uclT3/ODXEb9JtCY7Vz8QIn+itxIWUiKRsQC/IRbCL2rw+Ppg/Hu8R0en0N\nx4NCJTCFmLxHcD0pZkphqT07ik8rOsUKqMNangac0vpeeRmlHFWI6kbbdj3d\ntnukraczTGF49Sc/oFGeovrLFPig5wrN1WAwcJ4nSYAHUdvljlOku7rQzfMG\n9qWvXgfct09/ZcqaCIVDDPRj9GZdONPIlEkskJMQ+KjMmLN0wQe3KaQ2NH9K\neB7DvPYkc72fMhy1y9KlFcGNbHj6A2c7LH7ycBR0AFti8EV0v+Zkduax8aZw\n8GbP\r\n=c68a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAhdNkduRNRg1Edu7MDdvzH8+LSxyMTEf8Yc6g1yl02NAiEAiOcInaep1bFT6RLsSULMGykj8BI1CQZ5sTGC96Z4dz8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-f1d04e8.0_1565972538102_0.4445422841665585"},"_hasShrinkwrap":false},"0.5.11-51650ac.0":{"name":"graphql-toolkit","version":"0.5.11-51650ac.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.137","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"51650ac3c2568324eca5581568156f37aff9850a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-51650ac.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-WBNuLM33kiKW4tSRC7MKRJOFTfuLGS41pE5jmQMPTMf4Dns752i2Bug8cfpmNDARbupl88IfZZpqDCKnHPYChQ==","shasum":"8414bf647f29c8b4c7b6867767abef0c01d98937","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-51650ac.0.tgz","fileCount":258,"unpackedSize":398776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVvekCRA9TVsSAnZWagAABUcQAJWWdn5Pz5Ik22OHJW0k\npulN4ow9BkNvcrkXZU0Y2Ftx4p4Qo48gt5+2gDAnElel9LkkVdi8suIsm+OG\nMOlcVQN/HggesGjWXMZu7wKXW08LysF+hv533m1BTdLK28wK7E7YfJ8aMXqW\nvn5DNJBGdMLULFvGMoRPIBOUsXxHBlyNjFmw6wVFQmTG2CHEhpXaNllIgyoR\nlzqb2FSX3jxRZLRC3QoxQ1B8uACmGeOpYlUXmuI3c8lVNo4A9utNb/dHprIh\nXKNbsb445ULUxR8+1XAXNg9ynUqxDJBkj8omxSTo8fatcFafhMr26IDb7l1o\nauiKAmuJPdTGspCb+ICEWUFm/X9BRHP6Z0eTz5M6HymKKSdD8Ns2jMKfisv2\nevcc0+EULQFWfRo8cuGPr4XPPu0Yw4ciX6FVBgOoV3SQFgiJgNiLor59EnBl\nXFBqogs6FBX2tyAiurM7v8p1siwGF1etYxTTqoFLlDtFM3HxR/Soj6dEFCSG\nvns6RZJ4Gm4k1l9/uC0z2Oic+ZyrRJj6j64+/aRR4hO5I6+kCmeLnDtCo0qR\nUBhnt8KIL5kbTGhirvy6SkBsyp+J+HRqbElOUTnUr7GEdZT9tlFv0FaW77OH\nWsaAyVFgsqRLwnaE3VbNL0zdoTqg6IThi0TAjXMh19KVQ2fHbZw85QXUbvxP\nMhgn\r\n=gRbe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPbwITulrsH7GWE0Fp5WyyCLfiXObPLBRy4WQM4BXxsAIhAKDwEpSEIEjXgrBPRbVi0ZnhuaD0vZ7BZ3qJY0iws7b1"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-51650ac.0_1565980580165_0.16189769964708245"},"_hasShrinkwrap":false},"0.5.11-3241c58.0":{"name":"graphql-toolkit","version":"0.5.11-3241c58.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.137","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"3241c58e4f4032914388abecfc231bdf6017530a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-3241c58.0","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-wXkIO+junkzszwAv2shwG2Nqb7WeMjShq9IoSjzRSzw6RXmRSXZjGy/BTqAtJZ2WGSkTjntyOAhkwKGU/13opg==","shasum":"42b352607ae88dc86c7b4425eb168201e4c9a175","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-3241c58.0.tgz","fileCount":258,"unpackedSize":398788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVwNmCRA9TVsSAnZWagAA9qEP/0zGIFrR0023XOKDXM+4\nLjwG9JQfwsrc+Vu5ff5E7dvLRWArGmdszG91gzi+6GGeZoP3NluzcvVuwj6X\nibZYRbNogC0VrzEv5NChAz2ctyec2PgsTX8UDVFwHgMwf2c1fwFTp0FXdEdU\nTe7Tzaxvf8SZPavrtaHkcNtkxEib5+4HJad7qCQSVoJh9WEG015I4irdLzCA\nfSJug18JR/ZslBlOy8eanqB6Ss/h+kjWqtc1lRK1OZ4amRTK54D74xSGsKqt\noO6XgUqP9sKYMwW89MRP9NzHL8wbk6ToWiBtg3NfpM5jmwUUbiJB0IVOpX/G\nwFzaI52Rhw5sU3b4/dVyymNYqSgn9myC9cSAqLcYuG3EU/aYom4XILMX7x1U\n/mHYeITMIpCokIfptUaCeLD3rHWe/VK4Zaf3cRpfGxvtfUs7foOc4WnPa3pC\nEi3Q9LU4Pis+DMmW3pCMyKIyEgRYswR4v2uBmEc22PIJzTkXvhPNRCOUZ4Dp\nt8kT/9c3RMsjBaWBkW62CBLzPivy5qPCz4ENMB0q2YGGM4JwrZUeNCTSmwIy\nyPop8iWau6BwSZ2+eHV/kol2/fNNnYC+ef1RtdW2SiVrJ3f1xX2CgSJGkTVl\nbdHwcLQnEMc4gVBUcNzirEVUZ3cUfoGn98HvBn+E4MTJGqXMaMEkO+1lzK1U\nSgks\r\n=Oana\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVeKGRUXrML+YZlXSJoSQGlZh+K7grG1tlrWnCbinu8wIhAM/lP4SZsy2TinkqT9oUAs6Yj5BjLVKDKKIXYBphlrNt"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-3241c58.0_1565983589667_0.6716060930825085"},"_hasShrinkwrap":false},"0.5.11-698b059.0":{"name":"graphql-toolkit","version":"0.5.11-698b059.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.137","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"698b059dce0398fd46a289bb732504c5eaf98f91","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-698b059.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+wubQyIGcw6nMSeQnqSRsWa6pSgNVdWj6rmHLRVFYBMxbzN2yP83U0J/E90TvRB1uPs5UgKVhvjztrhPAzBULg==","shasum":"edf9a77a3df107a46c492d35f90fd95dc02f6e7e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-698b059.0.tgz","fileCount":258,"unpackedSize":398822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVwNsCRA9TVsSAnZWagAAEAIQAJElOK3ojZxXH0ABZM2A\noxfP7IJpWYFE4yYsxn5uDFdeLyKXGaw6btlUYCSYyhbx98LIqqL+UZc62hqo\ncg8BKaKJDMJUka0gWWCDI1iC9eHFdiX9kEqbmv1mrv2huK6IwbcDQEtnf+fK\nWXHP9mMEgO4P+JpkufPOXq4dfU0+JZaTetaQZtRSrPKCGa15n71dkL1rSh6+\nNq3LvxhJlU2pXpn0HGxZ3vRZK92WEqocDTgagvsx8Q1dHv80XMwwmnLaPNT4\nsQxHYjU1DYJm8p/x7LmZmF2X1UJE2YvD1l5SePiHQGznBynbPlS9g8EOZczI\nOt0LJi4GWGCtCHtBZeE1sdnvRFySb5CZLR687+IL/ZHRsU/KVe+oq5mviIue\n9lGT+cVFlvi440oEASG5yZo3bD7FdF6f4Zto6tvUN9EMRWhYqJD0NCERgWOV\nHdoNa88REMMiEKPZuQDmRn2Q2YyL7ym6efeHnDje0wzNuV1Di93Dalet5QZ5\nvaEpdAS/2K6DF96m5ZJTAnhS6/6+exMZh1NnVSMWXFkfuSEMS155cFAhs3Ko\nd8mJowtA0+n3QMt6cE2rqbNZ1TppWRi85AJ/CSlEFFqKK18BbRzz7mQ3gxcs\nBKFNH5uLsQca5R/eBneL8sGNvIZvMs/q8A9ShKKSvFQyPk5NOmepm9dzGYTM\nD6eY\r\n=mSh6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGed+CmFRdfuzduwyLeZJnvyML/MT5homTG7n9qmOqFtAiEAqtZSWa240WSEP8yQsZ8UJ9RJMGiMi+WDZkVBlxp5PZ8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-698b059.0_1565983596432_0.009105369976133204"},"_hasShrinkwrap":false},"0.5.11-d12d9e7.0":{"name":"graphql-toolkit","version":"0.5.11-d12d9e7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.137","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d12d9e7c7becf20e9c1a27f5d251c4f698c206e3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-d12d9e7.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-c6eJtaMXHC8PtU8qDi884jnpZTnLF+2MN8yG6Ksi4e3gcmRABpi/mFcG4Me1uhEt2SKJQt6SEyUiGqeECy0kuA==","shasum":"9410144bfa01d14310a2f6eb0fb1dc5ffdbf2ca8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-d12d9e7.0.tgz","fileCount":258,"unpackedSize":398796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWOWLCRA9TVsSAnZWagAAKn4P/1aZ+X/5zSiCRzs+GrAs\nj3iXQ+x+j7qPd0cF1GMJH7evyQJefwIJBByzpJAeUmiYXhRpurMm3oeuJPsx\n3f0DAwYBjIixaN9BHzzt7RCB3EvbSUkTs5LVnKIITfLJFSgiBAZZVy2ECGFY\ntReH0Rh0hr9NIYQl1naiNpEzEafjuzOizDW/FAdVQo/roiTtB9S+UQ6l2YL3\nhwIFwpMlGh/LEbgVox2kBrkwvu8/TslSnlx1gs31oDl0/sWUeJIJ2ko9jEmq\noA6fi79flwxjRmKwqx9YL+BC0wZ6WMo3okZVPy3V0Il5i0xqzh3OD+1d9dfz\nouUOM2RPW4uD+ozysHET9u43laN0+7fop+ZL7Ve3s30TKXi6XgTjjThRYy1Q\nqZGaT2hsl5tmS+9W9icCWzGzkuwhHlsGcCak2VqiN/kTj0w4pJi+mH1buCaB\nRd5UkLpIgjvFkbLhfxwYwVbDRrO913UttuUzctXBZ9QhcdiGTOMuApq1zJnS\nVZZv+wOhyL+TvTZbcVzDxbMcjW9dRQUiV1jdINIpvA6tiIrbJgBdI7wvuS1+\nJNyp4nbq7ypEFmFNSfL3Tbpi2dPUEnLhQ9dzrfmzfXXx8XyK217EiJk3zeTz\nFqnMKhwH4LnckYCiY9ycstP2dWl34KjIwNpShknp7TNOYuWckFSZ+1qKlFqR\ntgEf\r\n=FoSL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPc4hxF5wAJJkgFvgrQyrZ/nBJBYY/Z1m2SNqn4m4clwIgM40OP8NBrmaE63Hbsd4AFAumEoIR1X73B08GNVA/92A="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-d12d9e7.0_1566107019088_0.5740584324586782"},"_hasShrinkwrap":false},"0.5.11-8d6db36.0":{"name":"graphql-toolkit","version":"0.5.11-8d6db36.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.17","@types/lodash":"4.14.137","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"8d6db368e96990931a8d8add87c8c0d1f514d181","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-8d6db36.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-IsoND+9za1j8hbkqOVSMoQF7y7IF9JHJflOw6rw5SSpi9Q76bWpx9cexzEqmvpXdZeu28vJtcwAjF+obafsqxg==","shasum":"e5a8e29ad045cfbac412529c5c4275d78064b1e8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-8d6db36.0.tgz","fileCount":258,"unpackedSize":398774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWWhoCRA9TVsSAnZWagAAUO0P/2U/hSQGG7wcJA31mA3P\n87nTws1pqIBbPIW96AJRZxH+neHG55vzwkgr/UoUzEJ0lydgkRPdutWF7E1J\nZwny7vLS91jf9x7xFwpK/BAaw4AXKj/jwaCWBAH65DgKRpX8yKkCMV+jgVP6\nT/x6lvmS+xyF2PjMKV/gaKx840nomZN1alUXPILrZNpHTGkawsyq3pbWdgHL\n8j2FwPaqJwIZTxF1aiCywtYOKlMiZBCR+Gs2Q+z5cS+nCJlj33bL3lmlSSwc\naTgT9zCyevQMPYuWWriZP1HVBthxPKA2spIQzhY+YAcN6GmT8+rCln+BxU9y\nXNpiZRiHC2rZKfWKERPyAaT5JrdDUrnbKpKcXXnYdX3u7iCOnLDzE2hrnzyk\nRtnwD+mj5lMyUwmyOnwMKaN1NqGqk+rdupBBQ90qfzEkdlevOSFADGzlUTcs\ngHxEUzbrM2saU7oCmhLa8KEpGDqpQ8DhmQ5M0LUsbXzDCTjECV8Eqlbmdvfb\n49b/JyCUYVUoNZQPhhQ+TEVur/+JXA6GIl/SxiCOfuYsh6BHXDeWwxrDIuNQ\nR2zEISSWLXfNorb7D2WHXkyNPziMVMFScu8PnpOgljZoygW0FrmgHqiWj+Ue\nBywfFGjlQGRMjEzKaemSiHjIXJU66nTnhuxqI90jTnCRNj0x8aTVp5K5gmUE\n5cHD\r\n=tIlt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6tRUAAQRphBh9ZNlOHH0zz7UbSw2j0elSXljIayINEwIgeyVixQhT/He5ena5I2iZxgMuzzrTT9QFiSPp0PePr1g="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-8d6db36.0_1566140519422_0.010807927073652523"},"_hasShrinkwrap":false},"0.5.11-203c28e.0":{"name":"graphql-toolkit","version":"0.5.11-203c28e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"203c28ed390331cb0229e45abb6f28eb54988ccf","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-203c28e.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+tkfPzystybskscyBjwJ5o1DEOZeaqsGxTFurDugmWrYOh60ONFHnk3eIsTGVc+j3ijQGpNXox747TtWaOtxtg==","shasum":"00a1d40a2bdf34033efde17ea4658c70882d1fc7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-203c28e.0.tgz","fileCount":258,"unpackedSize":398779,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdWt+DCRA9TVsSAnZWagAAoSMP/05LwRkrulmkZT4ZwCQ4\nze+yga3ztC2VtXXlcFn1aUx9VTicWvh/zRpgDPhCWcA3nkESxHaSBuEFAgdd\nvwl3ia8zp9/Yu/B908jvTX50fxZ2hFssoe36gaBxI6Gz6/HMK6ML4cWXZMZS\nZFLihlEi48b7pxJXsQgm25QYki8dJoDW3quwbI9rjPhI+iKsm7qCoQsV0Dnh\nJFCiQ4seJJCX7OucUdnbVeuqQ39JBNMLhoKtauzwdTZkLluNTpyy+b5BkOf3\nT7WztqptS5T71but2PGBDl8TlyKDjn5a8tfbrf6f0scXL+ns/TjJ6XFiVKR2\nUMFLFWU8reTfWiij4v62ttCKPPHLXLZiXLpt6Yv+mrhnr1+y5dJnXeMwqk9T\nD91bch8401csBGEbCvpjNcMkRAmDV2va+zzv3FOgJZUtLfFb+37hYHO9lmj2\nQnzObbRALCu7SV6fEesABV4zWkR/RZchRGOosWxuGK3EycqP3zDEHbOyPLBk\nIGDolXnBBkmMEnrDh1qjD1DSlpSJT9acUeJAXFSIeWCx2BPVDcOODpot3BaK\nPqSBJDe1t2ORhlPrAazlAIYOCnsMbsecJrFZQ0SgVL4H7VJTK270rCRyMidv\ny5ZZPak4Va9JC13p94VQpHm3w1jP6LMTy7y7OgKqCjc0yGC18cpskMvuCfjE\nKysW\r\n=r6Hd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXnrYv2Aj05e4TTnoDCu+KVx/RoeGsNsZCkSMPw8VaywIgDGwBI5RAulbkr+tP9EaNX9PX+Ut6Jp+m2QmPoPKrcug="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-203c28e.0_1566236547236_0.49867818609124237"},"_hasShrinkwrap":false},"0.5.11-fff94de.0":{"name":"graphql-toolkit","version":"0.5.11-fff94de.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.15","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"fff94de941b1c25ff9395c4b1064fe831a1cf02e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-fff94de.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-f/x9vuF06gVyAGhGub03plb2pLmtGW2EKUIijLQrl3Y3UnJrQeXGRcn50CvVwukH2Vzb1uiQ71sF9FM/QBH8iA==","shasum":"d887ada3f5ce7c25aff6990454caacec2900645d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-fff94de.0.tgz","fileCount":258,"unpackedSize":398792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdW3YTCRA9TVsSAnZWagAAgfIP/i+ddt+UL4Lt/miOX7vu\nwU+Dj1FNfsVoHTWFU1KliqFBdi+i1z6eovq2ZvifSo6YSY/hY/dq1tQ4TgB/\nlVeziV+g4iHqkz88zDbXoLj7ttv/Zdf8/0Sg/FbYySjaBk0Qti/46/j6jtZQ\nI+aVJoeuIj5tFC8xwppyBNl+NjP2pbnb+s8AwPhv1Uom5GPDXPbqweQK8oTu\njor35ckJd3lBUB5irmXO1ddrZ3toLPZ2UqveFF8rZTDbZokWHai+Px07XjqG\nNbOMuQOGmZRduaiP1aV6IUzSt1GZO6NJlTvW98ooV9nvyvmPPwoUn1AeehOs\nE1+EOkNLd3xiOdmzo0LnFtTIMJZHTuhpWxlembMdXEKJz8Yy0Z3Td1Px0nil\nqL0D3VTVUSMYkK+qMhLv2GFHOAFckr7YJbYIrE05b8PD/0CX7AWs6kYmKQx2\nbVRLtbx/vW1ETMnxuLr+oDsRvttbURJIyVF3//QdtM3bARkuNDGS1u0EQH5z\nn/qpEVJ3856cA7K4I/stByEJ3X5jancE1KEQvVoYFmSPBTo/WJbKawgEQ88f\nMyPS6y+zuDEBL0IyynS4gKKZQj2ymW0csDK1d/q7zobsWwM0uB3LacQRgPV6\nTCodsm4BpKpC6aQKP/+TKSHz/4O9HN8d61+jHFULPqj+gbBaWU3CzpMDXoMS\nqkXc\r\n=PLua\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH232MB7Rd6kb7IpZwrbS4qAexzH8fhzfa+C1m93gGBOAiEArWij9vbCGTPYRH/WZTHp4DW1wBMo5V8Ga8jYUeKREV0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-fff94de.0_1566275091022_0.29665433363140803"},"_hasShrinkwrap":false},"0.5.11-79f15bf.0":{"name":"graphql-toolkit","version":"0.5.11-79f15bf.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"79f15bf3ee6b81f7ab2edb92759ffaa453d3af55","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-79f15bf.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-ltu2a+llaDVf57Sj6mdiNjsVudcahgn91cbLE8cnk0PpMuAS9NOfpxefvf6KbspU6yNvxlCYO5UHgEh2MBq0cg==","shasum":"b6fa68a3f1843172f9b384c19f258ba5ee88d834","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-79f15bf.0.tgz","fileCount":258,"unpackedSize":398774,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXD1HCRA9TVsSAnZWagAAHtYP+wdbdVCGiYdB1ocaRlMv\nLeCSNFI1hvBSBns3qtKwd6GscmmqzVLqSYzmV0hrSzVu+9QW9JXLWxK6yhl6\ngui9FzekC0P/qkRtt1ZbwkRuJl0gwxk3AJyWuHCtC/peHmCuc3W1vHWKE5SS\nfSMmjqBfFgkpHsDLh/9QtNPpRXX2AdtJKJzDCQUXz3B7EXIv4YnEoh8cFDZy\nGV9fe86CXou+PSNg2UWJSkBtm3MhCnf25lkcVsfWkitW3bhF87Bj7gQGZCDO\nlAcMqT7GeWljkfkPZjJH1vHXe/ruwlELzLY8u37Hat2snGxGXSGHj+6f5wjF\nHaLpOil2bHyNkSaNb+9KlNG9NHfGpob9LMpkN3F1MVNU4YuzkPziry3bqLq2\n8kpVslKh9l4LnGg90DUMbtNcHmpEYaciur7ElJ3pMoaWL8dDSI+j+lqPuC5h\nYC5v8QcmH6lGy6D7IOtVOgNHWhH+EvCjIiKWm3/5ftVcjRuBaRMwq2fxgS1d\nY4vNGGAf6NoGkTehBD2M8bDu7odCSi64MNogz0bcOM8aqPKnIK8MycFLArY0\no8QDp0erccqJzif6nRJdGUivQYqoW8HJ9gorWmPbnFhUY/7UXkumOJnqAlmg\nmRZrV4kDAIHv7IItTfaoGbkRn3IMGO+aZX+YFPb5tmbXTxvMSUiox0G94Blf\n+v/m\r\n=WDhz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIANazHUaXRf7LuhRh96e4/yoS9bUJS/LeOYblfFp37EVAiEAthGxHl5O4NlJ1TFAGyBPJBZ7XCFVqNpUoQfMLmngquc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-79f15bf.0_1566326086951_0.2975721528503794"},"_hasShrinkwrap":false},"0.5.11-c56f98e.0":{"name":"graphql-toolkit","version":"0.5.11-c56f98e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"c56f98eeefd3284679309d1f91a640de97912593","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-c56f98e.0","_nodeVersion":"12.8.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-40xdzlqbZmXmUNtQk8EMKDn1vUglf4uv2/ItOmiPC/+N+4oztec86MNW4d3QmzNPVw1XXiUHeJuNOxUsoPQMaQ==","shasum":"ace76a1376382a052c3d09c48af4e72947f5f59b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-c56f98e.0.tgz","fileCount":258,"unpackedSize":398785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXJr0CRA9TVsSAnZWagAA19AQAIB2qlDAxBi7mDDlh1ID\njqLILoX7np9s96ZsCdUMaz0BHFNEkRsoe3UhblE/i5LY6YcOJJLkV7++ZU5s\nTolSkaaKJBSsq9cXvG2W8izxDIc7NmbR3yOdnecp0mtYFsx7P+Heo8M1Y+TH\nYl2tP5H0cyYE6k0uq9ejxo+68gzG6cwDRDZuA97w1HrPovQ8xi+vIPeoERhM\nAJSMuCDtT7u8unD3xcTGjEskc/fLbSrGoEgLMintEvZSLXLZr2InZkaHEC3A\nM9BU9yRczvm/R4DANwAej8xsfG/18c9ybPr5wy+mezeWuv+sSSievwjYbNt6\nyIDa0xnC29cvSXaYA9bze5ou9SzB6hZBYiSxuDup+efoN5PS1pCLeqSVGwA1\nfyPQhRpCV4R/rzd3jxJYdo3fKn9Pv/Qb1vEcmesqSE2NQAfYz2pyHrdjvylc\naUyvefa1iekDrZgDIkBUrWjbx19iL1HtJjeL5+e1tDtND0X9yxRdOS0ZLgwA\n/McJhY/CHO0ibZZz9wEWYXD+JzyXRoS9Zq37t5D42CJb8rXDytzpx2j7eDB+\nCGuTNNyn6Sfv3u/LxEsY6bcF13xnlY9Tn2m05R3o8JMln7dJLxzKOM7ta+n4\nBkt+WnwYEnQi0qA6vgCDDAwiqCHliXKFLMKQE3THD3c/5CFdpMarOHRcjCF1\n6wdD\r\n=+u/a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIErbcSF42Kb7PlcHfo0ye+2Z5711Lwu3wuYSO2P17x8IAiEAiIapDxMP7RqaSaDEujhzp8BYCF0zGmkWPFMQLA52WgU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-c56f98e.0_1566350067942_0.6971324129787926"},"_hasShrinkwrap":false},"0.5.11-5f91f84.0":{"name":"graphql-toolkit","version":"0.5.11-5f91f84.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"5f91f849d43543edb7e4a2ea9e6f9c464fad6cca","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-5f91f84.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-+Orruyq7ujBowU2b7TPib0AGH8uXEJg22+FRAyCCFgHrz53l2B1EbGLOcrht1mA+g5d+UYA3KgiakYnOJ/v3DQ==","shasum":"1b488cd9ed3c9172e59914fdef0613bd8b61269d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-5f91f84.0.tgz","fileCount":258,"unpackedSize":398772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXeYqCRA9TVsSAnZWagAA0r8P/Ah6N9h9wLybrzoETVAg\nDpFNhlv7fksAWyhViUVGFOzF0VdYxIkj70+vmzyZ7q/YQubkxKI2p8KdZuuC\nyEXrFIFGCUXc7D0uFQTuBKgvxcyZT9JPwdrUu9OKPzIzY+6zeAyYGsDk7ybi\nFREzFOy2KmHo4q6w46qW5CTb8ucTtEjSZVnj6j5PNyPelpOM4A/xUdCGQFr7\nYbXdliSLlDVtSiG50wl5OVDogZ3u4zlXNQR9JK1YaCZJGnt6PthY0DyIsOmg\nAPYEb+LrFyax3Yt+ZvmTYCOWYGwmWlzfoPpOnRY4opzu3BnV4yAT3nBO877J\nPLVjdsmfTx/cYr/XOJE7Cx5HzR9rw3lOI5j1EB5FvNJYFq9/SK8NrJ/T58KX\nir/0VjfMOP6Bm4DkSEwfUD/cGa8JJssdAex2GS8nD+vM7G+VH1UiorTEAsu6\n0aw6iWKyQV7awrKum9twABLlmqjw23JBxs/ows2nu9+JZrOgfaiVbkCPmzUo\nv/qGoC1yR5dJnWMFXD63W4GSnz4f3nE0iyUFtbeU2+x3mQsIFP5K2siVHjdq\ngF56GCnv9F35E7l+0VzzJwANQmvlxQE64Qa5VOCatEtvxFlJ2qtNdeOfxre2\nF+chnK2hTy/zAmQCkd/3iIDA1c3CL7O37+UiOoLuvXEVskrVZ/zwiTzH4gjI\n4/h7\r\n=i3jo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH2QkRm/WfawNOB0hEV72O6lNDptFb/a/182zITSdz3GAiEAqnN4ImHhVWBFEdpBrhIqqWdR39gYk7vJDNt44w6Ephs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-5f91f84.0_1566434857753_0.7690576389954367"},"_hasShrinkwrap":false},"0.5.11-90a34cf.0":{"name":"graphql-toolkit","version":"0.5.11-90a34cf.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"90a34cf2d3820092ad9063f9c5b1bd4af945ccc6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-90a34cf.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-/e0tFl90tB1t/+AWUGoKEvuDXUVmPyF/RC3nrNnEUKddKj/i592PlNeErlZRyaPi3ViJ1ayE+84E+SbgNkXbaQ==","shasum":"aa969a8deb84beb603d7a0d38103752def270089","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-90a34cf.0.tgz","fileCount":258,"unpackedSize":398747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXhYKCRA9TVsSAnZWagAAK3gQAKE03nry4pdZIjh5gKV9\nczX37gwg/6UrMgHs344uv82N5+sRE5JO5klmDTiaNOTO3EerFHJefMQgMd0I\nBMcY8yhfpGNMRPAkJoFsw62onZIjQyv+qFYsfk8e/BSBtF7KjcIue1Pq6XaP\nHNvH8/hsIuYog+gbftQmTc732W6eFfH/IGAmVf7MzJIDhwlP8nL2vvQDzt+B\nkKAXjrJJPe9nWyAufCg9m6WSQTLl8QOhe+cARlH/6Zq3NUISJf8x0Y8ipC1G\njoaNzblfcuOzMWVxNXw0ivjInNGGlsDUystdxkU2ot209A9KvVTUEEMoSYQM\nJigKjT5RNtVUNfCKDgZy1OQXDVxo57RRWW3DQbf2toZy+epZS5+Fmq3mlwIB\nevWYOlZ7wZ8o8BHldGZ8LIPCfHBtfsXmRyhqDq9UVgg3TOTEGJD5xcXqvo8W\nO8SjT+69XEXJy9jefL5cecDeczbZUiA3y+FaBXbEj9mOQvEc0Rz+AWz4mL0N\nziabFbUYvis2Q009+suhOf4PfWMNjyZJuBfVdI37hwSFRrzCezwHNFuZ3xh+\nm30t0ZUoVPPHMVh/gt69vbtUc3Q4V1qUC9if9uu/IA06g3q0vrqj8ik98enh\nlKOxGH8ZWK3S9F52AhHiAg0fi1UfltskKyQ6hyfx1UsYxhrM11R0hSgl3rSM\nVke6\r\n=Kc1B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHhoLapbDc/fUUnzsz6rMLCcp9Z7tGqMzcqPExUOYkiCAiEA0+THsXGBURkbHfiCsYfvIcVCSPwSBPRL3Dy5PbynZ/4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-90a34cf.0_1566447113685_0.16153930857709375"},"_hasShrinkwrap":false},"0.5.11-0210bb5.0":{"name":"graphql-toolkit","version":"0.5.11-0210bb5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.0","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"0210bb5d0c5eeb3af662639d538a77ff59da494a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-0210bb5.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-TQR9rcVMx40V6yICbBYdiCFRO1JDAPDyXKKXmv2WDD5HqX2oobHsDKXFR9ggsgk0HIVnOwRyGzUtsBoaglwVsg==","shasum":"e77812a97f752b839d55795e712e1418c370b719","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-0210bb5.0.tgz","fileCount":258,"unpackedSize":398804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXoXVCRA9TVsSAnZWagAASPYQAJsFXNPn2sUs0WgqGVgY\nuGvcDXUo23UCZMjOBvl24HQWKU9Sj8SEliT1mB0+VguQtRAWd7XCAT+Ozmqk\nymfS9+jzXoN3IOJcPrN3eUlYnObOAdHHccAM/d/C6ZcvPPjJDJlPtoDwvIUQ\naAc73VEsZgJ7sFPF85fq8u57BvbIc/326X51Zk7IEQdis/M49W55QRzSd9kh\n2Ly7Ez2k1k3M3n7eeqCl3ypQR5EIuUOEwyxbCLF7ON3maavgUrNC45jHFrlp\neYJHhO2wSk9IBYvjygLkxrsWOnumldnuQrZkJ8J9A/q4LMdOmabO7O6tk9Zv\nioAPbbV0wdzj0Tr0TB/lxbF8ChSDhM4C2joRzVD8drO450ahkfewqFVZg3+W\nwF7CyQs8C8tH/87X95WhVlsTEsezCPJcNtCptQUEhQj2DpbJNk2HFce3QL7S\ns0XzxFCQoeqSkAsp+YiwsPImRJ/mSgxhSVYj8qDvkqbKVfzvd+omd5P04r0F\nb7NpaIjTu5m6Bd0lpO8tRC1ytgUgMVWUIEyE0jnUN2QC+tidIZWB8+G2dchE\nWMjiPTUxqYjpeOEMt0galnorvASgLbYtzFgeK3eJFC4wU6NPMX+by0yaJYh5\n5vNPWfdH3dvk8Vh6TIEtpGc3FiPePp8W3jYzzqmyZdDM2fkRuaM/76hIsZNy\nusmd\r\n=pOXJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwKzgfavmr/YjVEwJczyovEdj+O2MkAp1qqypkTNL6GAiAcofwZnaSunRMcNFmO1JnUgp2dasshYsUU/SZcdnRIcQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-0210bb5.0_1566475732432_0.5017005827186523"},"_hasShrinkwrap":false},"0.5.11-194e19a.0":{"name":"graphql-toolkit","version":"0.5.11-194e19a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.4.2","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"194e19a897122c7838395e28cebb3e25ede7beba","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-194e19a.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-fl300VNuedVjjU4WcgF9ApRAYEGuTna692RWo2S4fxjhVIxhdsRObU+FtyausOnxZ5ZVbN6UQbS9W7RGfgdvoQ==","shasum":"bd0c5ba77d44f71d4ad67a63dd61c67562af3b3e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-194e19a.0.tgz","fileCount":258,"unpackedSize":398806,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXo2ZCRA9TVsSAnZWagAAMswP/0CK9T1n98GWJQJSpgfE\nBC9YYqHc5ZazKkSFiX5qN8Po0TPGtVEddJj/U7xFaDKb9Dnm5iuhTeWsmuC5\nH6j1iokj4IvXufDLGdB6XkDftomSEv1yp9CkAqoH/uqlgJAl/dZnHaPwoVPg\nKm3nF7JmPW/hF/zc12YZTW0iWRw1hx1lZGWnWCKAHqhWm9t6TEjzhoYuzZKt\nS8vx7WdidP9rYPtzVO2+u7VyAjqeX6xw03bo8ffTIV/sH2QoorSTBdtc1Xnp\n4iwUfV7Sw5/pDleCu4CSyB5PJNWP0GyKUxkyYKers6pjY+t4QDdAhGYgznp9\nXk5WHvDgi5jWq1NTdvlXiz5K/MqRybb7I9qOa+qW3raGps5ysih4jTwS+EZX\nD3mU1b0SEbaLVC1UfHeK2J7lJ3uyRZN8mXiG4gEnwgrRz1GEP8MtiIwPx0ql\nhjzBD/T4b5TJ2cTayzL5MHLH9u3P7OQ3QNS5K8VLTqQqpnr6eAmEtEcRDn9i\naa9yeYFBK7Fbj4lg1OMQ76Xj42gWnhCQDJ2+fIVW3BppKqCWydp1mGwSCsRs\nqv7srKwN4ktP1KvVEImsC0L+bNZZ5SC+YG9/QDK5oKjel1lMKG3bAHLwInLu\nE6jTx3ybnSH/xhd89V7jZJE8v3/BZwD7LPCIcmjJAn3iX7iX1t+c0cRsXmqA\nxGcP\r\n=DnRr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB+lPZEg3CQAV/DxmqBd14A2Zzpegx2RvdJkZhaEQcAxAiBh5x1ko4YudzXTGdAHRGGoaxVk5xY2y1oYZiW3cW3j9g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-194e19a.0_1566477720864_0.7958131260724732"},"_hasShrinkwrap":false},"0.5.11-3183b04.0":{"name":"graphql-toolkit","version":"0.5.11-3183b04.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.0","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"3183b041aae1e92f5528b08f292c3bb84a6feb56","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-3183b04.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-EmbzTZmeh6ybAHUt+7QIcir78596FsawceHfjKP63zSQwkGpw+oPGClid/he8N7mvGCjm5O0JIgloJ+fw+jsDg==","shasum":"d85cfbd937fab2b368c45a48e0805b7b8608918b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-3183b04.0.tgz","fileCount":258,"unpackedSize":398801,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXo2tCRA9TVsSAnZWagAArtAP/je60PvT8YyMoFACQcDR\noMJd8ISXGBDdNM6ygWx7rfPsmcAiuznYz7iN2jXdK96+jsgbckuwlz1USnv7\nt8Av292EGsMRgl3jaCUbGoHj4rMSo2nioKtMCSgsWaZuTztylNLbJE20Cf3X\ng2i1quJaBNgy3GilEQTVcOropasJMmBWAZaj/hToNiZnVPtujAyqIhufqv5X\nfCpaoifXTV90yv5Nfv7RJO9PvZyAFsVgN0mXludCHDfEJYoOibKz12UwOT94\nbTMPv9eyKKFSXIFxmgTb0yUKNYVI/N0403K0cMZqH1xMoc0cRYDFNP5J7BOV\njInpyhNv8RGE4MTndm9GWbn4xVCGkhUsRwPmfISfntKJcI5wbTS+f14DMxYb\n4pRs37sjsoI8h5AmPexj+rNo1BEqNrPw5oLF17l7aamXdP9rHiHHPa/LtunK\nxAGpTnbFr8oW/DlZDw4Jn5ILvRvRTDkJb0/Y8hSg2yIotYortJNHv1TylzAg\njd+rRywLuJ1N5w2OUJFmG84KqbOqT5XfziP7nRTlqe54faC77AfgLtvxHPvo\nE/2LWrTlTdBiqhDeCcG3NWEW419Cgijd6gTYvhpOliWLDyXkXSemvc/Q4HRY\n3bjV7ljKKUsU7vT7EHYf8PhTiRWhLoOWaJJyllT2euoRb8E+tOUSVaXglIWV\n1Ppa\r\n=87hl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC09nDC2SWzUx+PE5ekgPxZ5K6Anm6mAuJdOMvuQqHdQwIgVivFnmG+y60dp9LlPEpLbbQdcjbj0+h4cncv4trag80="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-3183b04.0_1566477740577_0.5463123645976804"},"_hasShrinkwrap":false},"0.5.11-90efa33.0":{"name":"graphql-toolkit","version":"0.5.11-90efa33.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.0","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"90efa33e1cd0fbf5434608441ec774ea4be632b5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-90efa33.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-zIBE/bBQJTQJIn5n41bQNsz5NN2/EBJtvKP2LavD4IxeT6SJcvixh/2LOe1wkOOpipNI3aIeMI0Ljek9/rasfw==","shasum":"8d2f2760e62fc5d0807d465549967ee3e89bad67","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-90efa33.0.tgz","fileCount":258,"unpackedSize":398736,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXo3bCRA9TVsSAnZWagAAYR4QAJHooiyW0jpBXp75djeG\nhspI43+HQSVm1kzO33LLWS0YciA2svcIE6QlXMBiTSJNwbLiOEWOLCOyZkLU\nuscEZeMxVVzs2dtw5Ye2rnx/2uKd7evoEiuyghrFFzKQU9FYTafbcajolfMx\njGj9jnRPG+n8K1rQyvoFvDhLsAGZd5FJ8xV2sMDDWFKGz4nJEdMLns5HfKwO\ndyNeOBJmwnxUlq/OVEGqW3F9x9ux6nenux2UjjpSX040ON8Zf6OLNKw2TxpJ\nNnbkKDb2DJhfnEMATUFFUfD10tMY9JMtaUjsIoh3Ue4AhUqaw/KI28G7gJB7\nfsvxtyw+1ogpjH4xPH5GdNVEg2ZxuNLx15YitPmi8mYYwfQlpHL94aGIZnMI\na/VS6trkXtgWf96TmdIZg7Q0qRk6eHIg1TRY51c44xOkLcttzBTtXSBIaVZB\nPTU3BS2cM3s0oB84NXgH5i74j9XdIWON/jwyVdB1oePmvl6VMzAIwVB73nCJ\nws4IrLRqRzHw7CBvxCNyO10Y0J861OYYu7bmfofrMolVs+z0Ucn2dvnXOWl8\n2V/kaacS1wo3nrAUshbuPbEmKIjWiZBBQR08OQLCno8zBDZGmBuQgYBdldIZ\nvHvdd+Ur9oItRbqbZJXYBXp3CQ91Zr3zFsA91CMz2fu0fpjVd0JKliNT6E0y\nAlFo\r\n=cqAR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFXXsbS5GUV74Ew4hwdw8E/+DQ6oeEfd5cFbAZ5eIIBLAiB34YTYXVkIAGr5xE2l8RV8NRl0HxNhXcZftN84IS6ecg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-90efa33.0_1566477787097_0.2919244871220179"},"_hasShrinkwrap":false},"0.5.11-d259518.0":{"name":"graphql-toolkit","version":"0.5.11-d259518.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.1","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d259518bfae22572eb2a97bfee32954821d57a97","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-d259518.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-TZD0ZKA3Z1lCb0rYBboPABzuXWEzf0HDa1JFpdBEr5r6sKPDmmftXTjYuDOzWkl4qhnE1R4IqqA1QCm+Dd0Ruw==","shasum":"55935272502df91f60a5ecadf2f36a81b2267f75","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-d259518.0.tgz","fileCount":258,"unpackedSize":398786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYBRzCRA9TVsSAnZWagAAk2wP/2SFXTHGjw5zS5H8udpU\n6vAwhMCLoufqAIFgEwLLS2+hhwlwyxu5VyY7BJfFt8o9HullhY+7SvFWuJmI\nLCrVN5Cpgl/1b1dOb+Xsfqc/T6Sfp8HX/ADmec4qLw4aqXaSH5muiqzEazRg\nVa8B6M1K17OiEhK9BIdF9OMLpkta5teeBLF9y/iAr1U0FOOP3unpet+dFBga\nnwF/gF+5kGscXSaigm6RVgXXR+RJ9CK4ccTeosm85YbN4u+rNrbPlA8+rSPb\nQ4xmoo2yvXrfiW3Bzg7cSo78lnkA3mGqzP5xF6GIsx4Yl6UjUnf/4dqdsPEZ\nbSG7q9ZACE8gLDbMw9/U0N76+3elXzckfxdgXIJMCoNNCujkdYTW/G0/ADnM\nJikCfYRI98mr9ZdAweNs8ryf1Gepc2JS5At5sp4/Voil7L35oCnIUwg68Rpn\nR9zMKfyefS57mjfOvst8yeAnGRo1wFJPB4ELwaepb7EBVi6ufugVLctBWJis\ndXMFgTvL3onhTTePbVRW6vpnFvO49yEeC7KBB+TZVkKGFe+NxTi/tgRY0fwW\nXlmjA9AIjwR2/9Sg5LLJpCM3TSyent2ztVvzr2DKWBOLyAVGGs6YCp2qDPaP\n/SqnFJ0jJ81B8fLobpMO/mgitQyQI43X6R5t5CJLHntbTDOeMMFMm2UR67nk\n8iYY\r\n=P1NS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXaBlAGJMmuTKtQ9EQ/k/+wPGV5VDwIiJIRIFjHB/7nwIhAJVhLREhIZSnu1ESBdGGnhYOUkAThO/g6jh/EouXfGxC"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-d259518.0_1566577779112_0.5372007230488847"},"_hasShrinkwrap":false},"0.5.11-b46c43c.0":{"name":"graphql-toolkit","version":"0.5.11-b46c43c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"b46c43c0f2efe1999346c347380607148a9a934d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-b46c43c.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-Cursm+u173GGO/tG37eab+RkXT0VSCNFATFbmuSXsDqaGFbaupBvLtbp21N8rnn6ViudK/0YpAgLFPyMmaLiJg==","shasum":"91b56d87419e1dea0bcdd74a1c2760b0cc089010","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-b46c43c.0.tgz","fileCount":258,"unpackedSize":398791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYIkACRA9TVsSAnZWagAAFSYP/A5Yvs5P5ywgWYUtmF2u\nlSLruCDH1y/ZuTv1wDgvRWsm9KM8eMKfcqyYhGB1XSRDZIU/xQ/+jXI7YBcY\nXfdwsjMRbRgUNp/9/NrI+Sc3O3YwxH74a+YXFs/m2iM5XQFVlieyfcF5Gj67\nNGmONPgHuRrRZPRHqM5tBbAJgxUpKVggthP4LWlot5Q9ste30cjLSGE/awQ9\nFNDNHv8Rjd3Ly/o20ztpyymyaV5UJ10hML3qdFyH5quzu+5j5Y1Do8DgC0PA\niUQCTJAHXfwjIFO2c3bpRuLBWnx0F7Yvcxuj38f+sldwFkDdzlR7hWZbYTtV\nikZBDKmXKVFWk+Nh4UiLsv+IvXXOy1xXSqjZ4jDOxIMrQYesfz7p8URGZVcq\n6Ux8GPUbvnOo9FhKtzbJUPmHMntwp1sBXrKENt3tRYPcvfx6shrqZUn3oDio\nQKUYSXjcln0HTCbi4VVdKiSIf1ex9lU4rJ0RnikiYLYJw0xVeay9guCCLysY\nLo0bfusMa+E0I/NBf0gfjP+kbluN4sgeIZxZY5CQQg5jNcrAQAYuA7RmRhcl\nucGvVywWgtbmeHVpOu4kjbyp0jSoNBfDwYr9bN1YKpU5qEAo4wZFkCnsV6kK\nnll2nTLm723ImoyHlPMxacIAVrW4qoV0CbV1jGxxXZmsE01zvuLTNdEpAOCY\ndEGP\r\n=OTHH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJQSXntT+bLgW2BJ0626LA09ANBxsF6ElL0Bj6YbPa4QIgA4PtSM/yKh5a6p8u3UdGlM0CutRdSj8K2vDm7JExFF4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-b46c43c.0_1566607615557_0.5291673693914598"},"_hasShrinkwrap":false},"0.5.11-3bd010c.0":{"name":"graphql-toolkit","version":"0.5.11-3bd010c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"7.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"3bd010c6e49982eb2166de624d0be17a6c3f4d4a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-3bd010c.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-jGV/w3icTPUH2hT8XYl/Vxv9V/xmurmj7CV4JBWVoPJ/zz6DrwkyzqZ/0ZphN9bJxp2n1SdhDswBQHC8to+BJA==","shasum":"f3dc8d97443b118062a379bf937de47640d228a8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-3bd010c.0.tgz","fileCount":258,"unpackedSize":398816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYKy7CRA9TVsSAnZWagAAt3gP/0oUWNIf8cYtT+Wm0ia3\nF6XGXKvZjBv6f+bGekcbJVbr3n2D+kEKKsB4Yv59rQSPAWeX3A8qHuv+7/Zf\nmnVRvbAL/2UqTsPcGSjzsw9G7T1QE1WqDD76XKBtAiIFZBYgJ/1vO1vE1ZIL\n3//wwdLExm+6HtLYerNvg3SGgYCS+vGDNx1kP6Qaqy3sW25m0aruKC1Iio4E\nAw4clcg7eM43XAkrwsb0WYCq57z5KMS+E/car0Uu5rhvgZlHDz0v4xEGi8M3\nfQyfTCNNczzDXNwTv4uOSfy+4EeHQoRP14Udz6PbMtnQfobVGXTGN5Q1tEPQ\nyj0Vts71qbyeW7s339xvS8R9frIs4Rs2FYtrykc6sm/fgDARca/aHccfn+eP\nUmkHdVAd32rRJHucqAsx4FZmSVYq0e6V2SV/OYdvxJXxeGH/vvPjMC6Woelb\nwmsyC9AbIz4H9RCckQPX6xHdUY/xw5IwqaOtoSIFPESQ+iJGXgw8+wJ1MvqS\nA+XIeO3HWZehIo6sCytJYU4jcTvsryCzw/cNUwo1HT00p1GSsgLb3E6AWZO7\nZeQuSuLzl+mgEGmtBR/YoIs954FjVPC9hlcm1Rf9/fFfshf34QfUrhHHFNHa\nG6Gl0KqR5yhzHICNKI46k0vP+QQPCwvyMCinfiKigLCeZkysNjHL6YLck9e4\n4Qb0\r\n=Kr9k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIECXkl7YexgYdeGdS+ji6Sb/FTe2P5uu+bFQs8Njf8juAiEA9ijvnep9UwJSEh+iWmK2Wd0ZoI+yQlR6yR5ZaBuWBx0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-3bd010c.0_1566616763227_0.23934625918004593"},"_hasShrinkwrap":false},"0.5.11-1b8a67d.0":{"name":"graphql-toolkit","version":"0.5.11-1b8a67d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"1b8a67db2866b1fe70926747b3b6ab3a87bc1721","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-1b8a67d.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-QlJluyCg6wGb+T4z5o3q4/fiNewa22iUJfAAlp/q8PXTxzK+9kzmHhd+bSQbEcOju9rsunuwjq70eHeIhURSKg==","shasum":"47018fc5f174213e527033fd53832145e27896c2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-1b8a67d.0.tgz","fileCount":258,"unpackedSize":398775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZBqsCRA9TVsSAnZWagAAQwIP/03xH7KqSMDYmNXwpkNU\ne71PSVbCvUTJUkDNmU0FRNBARqfLy4c1F7/qnBIxuwLdfsM7ASmb8oplvz1q\nnpGSwgsClr2Hoa7xuulOcbTf+UvJ/4QbU98REJAy7ejxHO1femP+hfZa7PuY\npcJSTULLqvG9K0SWo05nG3imtt+ly25fmEo6h3A6k8fewDnGYwhY5eT/Push\nbTbTaS3FvsoG386ireI7xxZTeZKUBs8gu2Vbm3ewGyMosV6P5y7u3gk3TA+k\nAvMyZD/885ajsHaKBC9fLYu21HX3o7lxDeTQCE68PPRONSQXEL/l+ntF/+xE\nzLb0DoXWB3gt9ejp/O/sgr94E1jJj2yL7Zr014LJqSlDigjRwzxg4NZlNdVl\n/Rd/aaZJV+0GaSd2j1MkXBksaV0pvKROixlQQjXWk636lP6q8dyU1XcmtdDJ\n4qlMnafLvO0DD953OgiQBpV9fa51H2lqPNYZoC2haXHx6J7YvpjMh6UOyHi1\nQhiGcGJcdrErwEqCle+6m4qKZnYUVMWoNzU9c5RIAd85CyMzJvWuxwDFMHFl\naGOWoSR75S9nPZKSrkiJhoEtC/1iLsRrOZCovnHHpQO2NKFtsWckgCBxrtAO\nIov6W8TpS7jn6tKWYAJ0NzAijq6x4yO+9i7/sLLgCJMWnBYp4eutQUMxDMF1\ndhsh\r\n=CAIh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHoRi0hJr+Tqt2MM1aJEKHX+kW+a+kVmPFei/zOSdUOQIgVqv0MUQij7yodE6Onbnauos2gakPqNkgXF5Csk7s238="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-1b8a67d.0_1566841515436_0.40130482737289097"},"_hasShrinkwrap":false},"0.5.11-5a44df0.0":{"name":"graphql-toolkit","version":"0.5.11-5a44df0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"5a44df0a2d56767399ac42a396f77ad5f1fdfc95","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-5a44df0.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-/XmOPQPorhfvF4pxoeDy90YfMY89Bm2zCUv+bTveTcojfkIiCFpMgnbi4lE6F4rDi9SpnaEsEbslskX/hOPncg==","shasum":"0476a1c44c08027331d2cc74deefa1b5a608b107","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-5a44df0.0.tgz","fileCount":258,"unpackedSize":398777,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZHVQCRA9TVsSAnZWagAALmkQAJXOgPaUe0AKyOV+TP7s\nCf5OL2yA397O/wOzxkTz0dzifyEbUviDrnNJ9FyPpLaOIKwpvKkX2CE4BVxa\noUIfCcdUqP2+vKmGkgJaLhBXHToGmGlCzIIz6B39ivUFjvu+8L1d3r5qYdH1\nZDyAOaZg6QVywNC8jqKhBeBf3EcJ+jUGxQybCGW2c+JDAAmocKJ9H097O2t5\nLNalPrjEsyCCmW6v8BA6kptD8m4Bt9+knGxnXi8GgqQ9eJ0EXqj2hWd2QJiH\n8o1RDZzu9lcMx6qHVvKhBsKHDMqBSW59zQjeqFXQxE0T1KStRI1cJd6h+TQh\np4PAYgoGMsV5zre7e/aALg1acGsfrMSWx9nSZh05ZLKi7YOCv1CBi3iNO7SC\nSWqph204j3o3tMrO/gIWBgrOjvzRgcS71od08sv8P0EsSk/NV3Hk7/WQD5KN\nsAPt/NGhwhE9vN2FOuoeaD/3TcR274TBvmg6ldzyjMnfmtaGYiE6jEWTrebl\n+4BVstFjHfvkQoFmE6fKhf54TxvxPf323honpzLqBggpr6Q/9DR4lCMfTAOL\nSBeZPNO3g159B+dhE6+sCaZCoo3tq0iNwQQlWOvX7SuuQLtoIHiMJl2jV4yE\n1RqG8Bexzk1kbxqgDbda2iekI1a1X4PK+p6Oucwyzk3chyRopfoNJMOozXsr\nwCY9\r\n=cTS5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBh4P7I59MCCXOjwe4XZ8c1nfcEKelsFinKzy4nFx+EoAiBk1FoVVB9RwYcV3tFCjLg2q+SV6jLsE6DYonwiRuxU7g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-5a44df0.0_1566864719701_0.0018616066254804053"},"_hasShrinkwrap":false},"0.5.11-7dbec4a.0":{"name":"graphql-toolkit","version":"0.5.11-7dbec4a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"7dbec4aadc4758e69bd982eea6b27b6bef130a9d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-7dbec4a.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-RPj1fbamajQZ24BbQySZO/I2iGNH7bNyZVsIEYYzqi4/cHNeg4L976AB10J0gvZxh+Ngog9/ON9ZwatYG0Qkcg==","shasum":"6488c9f61a400d51fcfe20553dd3c6ea695cf291","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-7dbec4a.0.tgz","fileCount":258,"unpackedSize":398807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZSGJCRA9TVsSAnZWagAAOW0QAJpf/BgtN15vCcsSVZAM\ngznc37FTeAtqhfTd/rZ08DchOxFwTBcdi8CjbWAHb5H3C+4iAQhx7Gl/U+Ht\nGF56Bk44GoUGxse+4uSmHeeU7QeKK3YUofk/8TXxTA85pPx/0w1ac875FZZc\nxHoC8UPGzx6HZ5halpx55UREpFBfmSuMudQs1fSx6ZkolQz5yzGbXREcQqU+\npFFN71gQNBz/xw8RABfCxmxsOH9X2a930nCiEa8rmab3BdqiQIemt9X3ubli\nSt9rMVLIsXqJOms2fwenFitz8QIG+6i7ue5wdxptGBVut9uS7tDlny4vXfrP\n3ChFsZdt5ZfeIHfJQWEboTg+YajXagMq9CilW0KOxAZNAvIYnSPCP5WLOHXe\ne/gDGpZGEXyCiHNCkieDrFMsAGJzeVejepaA0Qo3IUf15XTbpqlxATMxwNjJ\nuyr183E/IvqSOfTmokTqQorai2VjdHtihm46mbNyMUnyT7xGAjuB7I9HsNHe\nMr8rtu82WXqbGynd/krDewQw0DQemToPZ8cyoGdPdLcz1PBi/frja41NcPj/\nAYvd8whNuSuOixz8PccSEGomCOXXLyYQCNz5/8kXeesxgyFEkbs8D1qlGa84\nGxbd+JM56pwb8Uz9I/D4bQ9klY+VAgxCHY5cuykmGcWBmmUj0PaDvFxkJlOB\nRgzq\r\n=BzDA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHS3XIP59LT9OpdU/8NE9sGCQBdFfY5n/vygQyLln2qTAiEA/3tofHZs5oiZPmVkJIgH0urxWrRcI7dol1svWUz9/M0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-7dbec4a.0_1566908808652_0.7053688764039743"},"_hasShrinkwrap":false},"0.5.11-54a34d9.0":{"name":"graphql-toolkit","version":"0.5.11-54a34d9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.137","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"54a34d9abea17c8cf0eeaa69985dbb40737eab94","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-54a34d9.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-r2WWduH82gR9GadqumV1uajttEmLPuzT4yewFx+pVNWF/NspvAzoIcdwGhOsGv+LkqeRJSC6dSomOCTp5tBUcA==","shasum":"c51445a65788dee77fb958152c9b5e06ecfbf844","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-54a34d9.0.tgz","fileCount":258,"unpackedSize":398800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZSOMCRA9TVsSAnZWagAASB4QAIv322EuV7M9K0OHgBZL\nxn+17ltbozUtOvuF28ncSeM8SQGYj2zPJ2eVuLIODW988dbjSFwTUv1Cldvk\n9W2geGTWzAvMM7a0aoaWXmGV5/g8edXh1V9Nir/dvoGPF8m5Yv4/LD5pBF7u\nmgof854EZcacV/KHToMyKGIXZJrlRTWB2WUr5Mxj0LyB6fXMcmR7dtoPohqQ\nQodM07A8UIBy8DH6TT9sdiDPP+5mU6t41m5HhVWYWk4Dm2IjxzwM6MifRLU0\nafK2seIMeqzXUJusEeFHfqjmQMCz14ZoeHcTrIlEVcLCsgGSXWBzLwtXEUpj\nWppLP5K/9JOH7su9Eb+K8IKBRZsvOJeUDc9FgrQ2/pgdq2O8jRAGI56ltBXF\n3dJMQVZ2rzsywASxzlQflCbepQZqZ1MkkI28nbVft93iTq+eAav4FDmYv5p2\nWWXGKFbIcwse5lViVzG/X6T5ZUSFD/Sl4A/7JgIkO8aWVADRn8WTkpt1AcaC\nVD30QJp0uDIuFmA/htsVGqBHME+/YxH1dRFwPzJqQ8JUZDkm9VaOPIBVPEU2\nk8pXaSsHo47PIyP3zoV+qiAnEBdgC5r9af2Mdy7wlGTvPhRm0vy5GOXtGp5K\n60YCtj6ghCQ9ioENXZF9+HrrGn7m3F5krXuQ73unKtQQ0vp6H7UwI0jn4yZp\nqwxg\r\n=0pvN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICaWibFJR6iOZ0JbqCiyrrnqh9Jd2OMVXJiPqUmsovAaAiEApwPVM5m01tGcbP6SCxc4lSQcQGUdUP1AaU11QBX2ytA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-54a34d9.0_1566909323341_0.7839660055159925"},"_hasShrinkwrap":false},"0.5.11-495408b.0":{"name":"graphql-toolkit","version":"0.5.11-495408b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"495408bd0ad1856c5a5ab11cee1e3bd872ca96c5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-495408b.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-3IWtOc8QXpoa/3PwTzI+kBPl6tG0D+hRGd3EsfFeoUMMGB4ydiLe6DkIpscA1bZJNf+xusUBL2ssFnJl9T9BuQ==","shasum":"8d7881829dd9d59f1dcd7fccc6f7c0973f829360","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-495408b.0.tgz","fileCount":258,"unpackedSize":398807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZXTpCRA9TVsSAnZWagAA3bEP/3Coimf+71xpZ9dYDeBB\n12uiYCE9BEMl/G5C6SWan9jGCZnRfd6G1B6/JIDYlFCzTDUk/B3pJBy87n+z\n2wleMjAD25nPTeE0Xbd+mhLYrK723HXVclld29fAh7LZINFXSbLYxBxJdV1J\n2G5t2WZlsMsSys0fnOCBs9oelfa/t3f1fvd/5vc+lXMhpUOthXXEnhq19ts6\nHC2pGThFT3sqKC/LbZO74pM9Z0VsiTbSPp1SOm9/tPB5CgJvpMGfzfL9wH3u\n4x3CihWc3GDo1ZUn9moYPU0dwdqiL3oqijP18KLHCEv/2vqLM64i8MNfE06y\n8YsiwcfA54LkaJis7DJ7zQbq3y9/vuuChDs8oi7Ob0y1yVfqV5cBMS5wv5hV\niwj7TI0mXj89P3PFNvINUOuwQirBCjhtwadDL/xZZd1/pbKRc1nI+S/0rqNO\nA1TlDfWejpaOrcfjZqocaCMkGFJXqs/vHXSugXPlJFkvkn4/FtsVGR9hOqm0\ng+yCidJYh63hEP9CbFHGIqQoBfiI2DMWsaFZ9jCrjPdxXsXD1utqNnhZgOki\nwDFgqGlP+5zT4adOpeViCA1RsVVESM5mWDFKbT9HkhAUhS9qqc30neQTkApR\ndY4dnbMEAXcOEQCEKDlOqJD21NGVLkB7rf/OHDuJISQBCF+3Lojf3dhmc7S5\nbVbd\r\n=09Uy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA6aYyKGmG2JXhSLVZ1p1h+jKYrMc4jog51KHAAM4qMEAiEAk7ohsOfKo/ImVnGz+ufn9pXV1Pt8DGl8jG4DBWzuLqk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-495408b.0_1566930152757_0.19734119076892687"},"_hasShrinkwrap":false},"0.5.11-593c359.0":{"name":"graphql-toolkit","version":"0.5.11-593c359.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"593c3591b4320be2d950c41b908d26459d32416d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-593c359.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-aGxktVLxUbF8Q54Ey0BqDt00nRbhqpTNAy1zAoIeQOpC31oAMr/e3hYe6NzIm49shmat1UWgtYtLVh5P65GLlQ==","shasum":"fc615e46635882ef215ec12f754e61233cf211f0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-593c359.0.tgz","fileCount":258,"unpackedSize":398752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ0gRCRA9TVsSAnZWagAA/pcP/3EsG9dCvWUxvmgJmYGC\npjYIkYpc3HObjDJcRutqyBwLHUe+fQQbPTuFV9jjv1uWHgMktf0YZ0FRrfqt\nEW8oTf/+aNXkIFNmMYc+UEvgscc2ad2MGw234pRcAp/j+t+1iKiYQhzn+xCc\ne5ukbhN97AKw6jUxd/8ybripl+h33dy0BprWvOeIYlHcilg5+p03Vn70W2yB\nIg8w3Qz3QVf7sU6Gxu1SaBIeOE82pt2osWGA92CbfHCwXUPVHgLyW2VZ4ABY\nhiO/wGVAKGBgJWM/4p2/sNaox4ugC5gKRiEY3enySVqIN3CAtWDoWcJGZBwo\nNyhGBczDxKYvpG7eK6HwCdI5LmK7rsf2yQ+Bl9JvpAQMHbFOpyDEklTNpK5F\nEff0aJESx9nuSs4oyhV9VkADshgk0H2Q0iNZU/PpEJ0vmWHw+2HGewf9OmuJ\nJqgwhXbVybaLBYMPIizAGkeBHWEj5y8y8dhYU59WdbL/KkATYfcJ6zJD6itc\nt81VCikMTg7xcIAHL/byZ2p4X4XGq8upTrMHq3zNEuYj2Gc0l62m5bLGzAer\npd6e4MpJfdmbbkw7yrNr6iGanaxTQjuly5r6Pcqy4NZqo2HOSp8u8T2N7H8c\np5R5Ap3NMlGRu4+EQL+icV2XpKWJssMcYCjG2dZRcCc0j9TIgjhQ+u+8zWiv\n+p+m\r\n=97gO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDE6+e65VLrYLev4OdYwgkiuxL/UokQ79UHWlbPPRUE2AiA/TujuUW8zzsfiHeCEwzgrKm/MdIHtj3pSH4zQ63WqiQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-593c359.0_1567049745221_0.8812436122588927"},"_hasShrinkwrap":false},"0.5.11-8e1c104.0":{"name":"graphql-toolkit","version":"0.5.11-8e1c104.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"8e1c1049d7492099454f8f8a9dd707b2d4a11c90","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-8e1c104.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-haRd7zMba58csRL+Za/POGZo7wCaI6pqHDPu6S27yttsElnUibB9zmELFPhL79GyNbssZb9PJDOCb5UDMaHWBg==","shasum":"e261ffd7fb21d5b71de1945761518d05d5ea37fd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-8e1c104.0.tgz","fileCount":258,"unpackedSize":398814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ0hzCRA9TVsSAnZWagAAqsgP/iC7weZ6lgQPtBWjY9Tz\nCv0UCi/30MYVGvmVs1HoUTI2C/6YAamAPQyZdb0VygdgUY/CfJhUTCTZ3v2W\n+Q4Ha7JNuLqfkWKFMWLGdZTj87LueWUJsPzuTXdI3m+EEI/cRM/O/d0u6AeY\nxFfaw4pR6I0zDr+P93NXznl7WvMn7J2/6sLJwwlaCOLjFmRz3jGuQ1i7M5eE\nbXWbWHqHs5A9QxoZJkay0N3o1AedoRsKCRnwPFkYiWT4ZKHwOkxKqDOUY4eU\nSKLSnVaYumuAQJSRsQo87YWcEfR2LQMIG2K6JQSHYT/3DvzM/8LvYzMMc5ap\nc06U0orH1wnDjyFQNVr4EIW2oIdiRGzBh27OAvP2ISX75GnwBe6PB8BxnnDP\nnmFA7pRs/OpTaZb/BZXgEqeisVH99LI6gQyvt6sE7CdTBRbP1Y8h/1jgdBrp\nJUlDDrKys5uabsFKqC958WcyxDyjlrwPdD9eG0+mz2ngL5eL6o5US8S5r8U4\nh5Csi9XZssGeXuchZ4hGySQ0OTXJWb0mVX9VRVRevh7U9sapQBPT9P+sZXfk\n01DyDS4avHb77R9pKQHSOXv2RtdHl5OM3u7Hdv0xXFvrI/owLNhIaIlSZI3o\nkRzN/sNQzIw45mmvMzwLyb+xWIKPBwTXDvTHQlFrSacotbUxnMtsE8leWfWH\n5lPw\r\n=c6he\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6prAeMVjlyRpKTqq0Pcp4KKdJ1aj3uHlfgcO2UqDY3QIhAPOgiEYZq5lxmmkmhMiQ9USopsT0TQdxCkhO8p9TD+Hs"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-8e1c104.0_1567049842998_0.5449807338076005"},"_hasShrinkwrap":false},"0.5.11-c18d6b5.0":{"name":"graphql-toolkit","version":"0.5.11-c18d6b5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"c18d6b57907f2099494b21a9244e24dd1e8b9788","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-c18d6b5.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-PnUwdoCSX8Xm7qIOI384OaiBQFRWKPTc/m6IDjmqcKPzYLIH20T/xBDuDOZ+1jfjEkOe7hA9q82aWYPEk9uwPA==","shasum":"d6b57129948ef1ad2f38adc304e0cc7e9d784224","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-c18d6b5.0.tgz","fileCount":258,"unpackedSize":398796,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ0imCRA9TVsSAnZWagAAYiUP/i1yapCc22+ziBQG55sW\nX2NBUWMpwY1to9u3uS0135catBGU86grHa0OH/SyURS4YVSkJgp36fVbtbKT\nrGJvd0sHrBxfsixE4SqU4GEuEu4EIIyJyHtOZzKn9DYaqZJx1nhtO9q20m9D\noaQYJqlAAJYapU7hKkuFZkHxF0P9SJVM0YY1yOWVQAmd6p/EXz4guKnbqopk\nWNWkM/Q5pViA6VqajBLemAv2BZmx6LNGpxWpNidyx0UhL5TuHxU5oVWJ7PbC\nkYfuYIMPYIuIbzvB0btafZaIV3drGoymeZ07wxMM60ZGSJqgC3/j7UjiYAlq\n0BnwDNigg9J31X5dqFOGABG6lGti6RFmKs57X50FDkueJKcqqSeNMmYwSWYT\nKHxp7oocQCZM9R/g1BXXu9eeHxOFmdYOtN5eAUUaUA0ULfB4Qt2eVMvzbY9n\nYUsHl1FTaA/UAQsfgbPbtSinQCtbsDHovsRXr6LjwcxmStfkZ0seC0O8+9p8\nqfgQGHoX9W6ry/X1N1TFeMUflAsUGVJkn6RtfakfTNKlLuV8uGzUcmRiEBqw\noIk6gs/NU1mfgLBOchWIcMvEhFMBm5atsOyfOIQqWQa8MwghK6fBXP2/2aPm\nQIslTgBO4iEGYTWGa59iXjspcT08+lxiTllQ1aWSzsv6TUsVGkPwLCLbhu1/\nCgxD\r\n=/xIs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkkeWk1KfPEetGG3za12zkjLjUUewkQ3fsRA56clerzwIgX1N10lewRqfvXEOLWcIekKAaI8W9C7fZSxr0bDt37Qs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-c18d6b5.0_1567049893876_0.8064334968138056"},"_hasShrinkwrap":false},"0.5.11-730c537.0":{"name":"graphql-toolkit","version":"0.5.11-730c537.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"730c537ef97c3f4e0bf552f13395d911f0e28522","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-730c537.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-09T6Mh+B9x/XRXrShfA2qgA7WMITr01qDSZWwjLVHXe+pxJ3cb/lflIV7FmE4yJjF65rRZkWgpb9YjK5r52pCw==","shasum":"ff8c0392a77b7661a758588d43373212f426dd82","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-730c537.0.tgz","fileCount":258,"unpackedSize":398788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ0jbCRA9TVsSAnZWagAA8McP/1iwqo/pnL/FZ02ZmD7S\nBRclTP6F2iQRwE/U4zQOPnu2Ec/ERltl7M80h4J9i+xcS5hvprEqU+WbvqNZ\nZllPjkEkISHn4SxAGvPWriplIe59gK8dBLQk8lM7cxlZSd0MOKVdyYqpgYdl\nRM0JTHJu882UmZpWXicSgoFe1VqDMvB7hntap0Jo4mFtR4jDfktS13btGPEo\nSDwPtzpwrSOXNoZo7/RbbiNAz6R7YuIGHdmOMUnVIIiPhWaizK7V6xSKuzN1\nbw9g/OcIRQ/dE517KJz/L60Ko9DqkLTNjg2enOsg1ILbff0Bp6gZGSKVMd6n\nortb5xQSgkiYr5kee6k/oxOgJ20vVJyInNdPl1bQgqYmcq+2xLhj/kNFomAB\nFcWsrqE2gP7ByqG4nCNY7nvr4n/lRDcqznlr6E2B6CgX2zOS+oN7H+kuS4NX\nC196aWTk7UTkRv29laR2BZe1B1pWUJLTEmPJAgylZqvyMFdy+3dB2SPDjwrJ\ncgOiABuRoWE1SzcBEmGFkmGFIMI8QFSet5w02Bymcq0DCZ34RoA9mPFZ6Ivr\nIMUZAtl0/0mivXKvDeGUHnlqk30c8LQpQJDG7Vfu/rIl14/NRKFrHXoSg2q/\nnX8CO+++YyZRQkSm3Cts19cJV0FMqzD54J7dA0ySHCTnru+F5gX2Q6Bxfxt/\nwpdj\r\n=exWH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAl9siwPc44IccZWfJ0eFXmNUnCeE4tJbuToTC1EzsEGAiEA3N9gUdOQN4mRb+XbnGtAgWuzhI2ZwFPycXnu++lVJuA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-730c537.0_1567049946618_0.24749976908014593"},"_hasShrinkwrap":false},"0.5.11-5b97e8d.0":{"name":"graphql-toolkit","version":"0.5.11-5b97e8d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"5b97e8dd4a3f049eb22b74b59240f4dee28124a2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-5b97e8d.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-I1pmslA2gf0bVbslBN9CWmRAzOL+nlQM6XaoavFiDBMsv9mlEPn8T43gS3fkVuIRRoBA5VoQC00jxvjSDv6oIA==","shasum":"17930b53047cb4815bb645667f147885c911ac43","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-5b97e8d.0.tgz","fileCount":258,"unpackedSize":398810,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ64ICRA9TVsSAnZWagAAjYEP/1bpIc6e/sOQVMIqRxH4\n1NRNEh6H0GchpAaPrDqhgsYvLoKfgtKELKKLfihQ8qRB8GerLv/MqcWNrcxe\nEY8UB10owwRUKvxSTkKLisFmziw1D5HQQmJiUKIn1ek5nliP7GT83XtrmC/y\nxMlR3/lMHh145YizGiTfl3fiDXplDfeAvWpTwhMofxGaBehskLF3rzffAAsF\nPQGD6WoKyvYKyJeUqdhC9MK6MT38h82BfBo9r4kNHGbqnFo+I+Mm8bJnak8H\nH/zao7CXL6KA40Vv+dGiH0aq27Zpiv9OR7AjWcFQ3/s0ZOvMdDuGQA5IyoVa\njpPmr/RDrfES3UVk3dOAAaVp5SVxV5N16d3ZIuN7bjsj3XovlTQISH3DYhQU\nZvMYv0euLwk/eV0RB05nVpKS0/u7ohLlJ//a9k2TYm85FaJY4aKXdqi0Bil5\na9Nu9S/LYU2pBTGFed9XyfweQ+7wrsTTB7r8RFImk2oeOkApdvVC/7kxNUPx\n0L2cn4iWjg3/uRkl5/6XoQ68eAXFuZifhYYI/142h9j8UDrViXFoXDQSwP1B\nJIE8TM4EWeKunHCuTUE+kUQyLcQRqFBxLXdg4I0loH4W+cjrOePvHOGjVPz5\nqw9IASCJflFu1Y7oOudJ1AEO6tUHxcfkpz8Wki+45p8qCRu2/pAzep2ZX+EW\nZA4C\r\n=hVYb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICJJWLnquzr+7wVZUshZWjZv1cOwoXpWjGXPARupXpQtAiAdK7RVX3zu4YQn0LKkuI1sNfgBOryMotkdni4l8ZYt8Q=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-5b97e8d.0_1567075847654_0.32245820240320433"},"_hasShrinkwrap":false},"0.5.11-5ccbdcd.0":{"name":"graphql-toolkit","version":"0.5.11-5ccbdcd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"5ccbdcd51f6790dbf55f81bc18aca89cef5fbc53","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-5ccbdcd.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-f9MWoiJlTZEIY1HIqHKkbHQgXLu1LaH2M3HpYMb2i3DebbTYwpNkgcOtdkFxJ/rCTSAmRAylhzfFjHgdyOiuEw==","shasum":"73086b231930f4816c4f593fd3dfffe8f55a3810","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-5ccbdcd.0.tgz","fileCount":258,"unpackedSize":398788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ8mHCRA9TVsSAnZWagAAd6EP/2OadmetBNoDofRM0Wer\nxubi4cH/LOwCtafPq2uzCBS4OMRmfBhAOrL4KFC7lieRBajtDzXnfkOM8ZB0\ndTJxdbLyqz2qhR/sr4+pTqAmyF76tOi4WtXzxxEjT5jQJ11b1DgaNQ24Ib4l\nDgeG5OEKtg5XuKQmDdVGbfhFOsvNHUnKEbd8xK8twimXcET5RDcddKQzVZcM\nwtGnKc9T2ccmcF3HJj6B98/sKSK/CDfyfS2K1SDIDnaJqIWlnoNLr6HHGN1z\ndPpSfMe5Coh44JCcNNTN2ysFeEoFiuPhUTBZ9Sq5dLP/2QTef8aJNKqgKhFF\ngQnASOCiK/FxSe8ya5Kz9eUvgqszhxi442IA2PpUtn/REVGIpJc9xH9pcBug\nAYt5sUSI648/CmBOEi/lw113E5Gj+5VpgPKtBsSJDccusC1pwC7YaGnAtd80\n9Ot5xelHP68S7gxh+fEU6sjj5sGO6tbrQdmAIXRsU5MwJKgZZaS1CgsqebAX\n810jWgqy9xJRNKoAAI5x81EkH3EpZSrpD4CpLahrVR1zs01ZkapmQMnV6hOQ\n5CSl9p5suPV08ElpmrhQtZgHP/joIOZDuxsDKivais62zuY08UwWRjrtWOeI\n0D3aBdgsHX+puxhHJee96qwrCamPCPkFvXKwoj+J07S72LjvPoomiRQMovml\nS3oG\r\n=MwAr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTxFPxV08aV/Mwbqu3wYUlnMQtiulKfaKqMBhAhHkUugIgZovXSfJaPssX70ECK9dsXWPv5WrpVzIq3PTD+SkDmqc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-5ccbdcd.0_1567082886840_0.1681411811155724"},"_hasShrinkwrap":false},"0.5.11-02d4f6b.0":{"name":"graphql-toolkit","version":"0.5.11-02d4f6b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"02d4f6bf2330a1572b3ed400046585bbe1d8cdaf","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-02d4f6b.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-RX7HDAl0OPpWfiYjeorwArUGIi7ENqEVu4K3H7ZqBCd07VXxsxXmJtt89/5QAiJTYlLzRqQensXJpkXFZdQNcw==","shasum":"40041614fd77ab4e66e63e5b8e6ef3d207b411f4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-02d4f6b.0.tgz","fileCount":258,"unpackedSize":398822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZ8onCRA9TVsSAnZWagAAgnMP/iil/44JutGLOdrM3JWR\noLs/BPWmKt32Fem4X8qwBLLDgH01fByXYghEQjRpR/SR+jrTcI1pe2wtlq7M\n3ws037UaQ34nGtJ/b4EBsVqP/Ea6R4wHvn8R9k0bS38Ha5usRz04i/1O/nPU\nsWflSxmf7Y+3r/xyF8wHNxyGBfmyRp6c081u6enxoA77IczDNaDoeoF5sXWv\nlrpF5bFHc9iiIqpFViXMeUjo/w12PgyTgOsMRxK2ahy7uofhntP4pNV1qYM9\niCcaIi0BRauPsJ3HyHcf8n0ltYukFwU00YaBQh+e0EVlWIePj/TODTiE0I5E\nglLhaFETJdxcKUFOx6G9WPOdcTHu4CwTkGk+2BurVx8rJ28iNljQeQiGhYQO\njGLzTBE0uSKxRc4Pk35l5R35DMPWBvAEnvp9ymtooJFJb5SkQjOFvNIe5Eiu\nlbN/FnVe7Kae6OVMbvWt3hLPfN9HbRZ++9BzC6/fCUFhj3hH/O8+Z/6F6eOe\nIDhPzcHWgdiQKveKGwCwCocE9bGDgzUm/6VNhxfU/BS3Yiowu+wgWcNuGcWr\nrzrYDU7ZyzqTXy2mfMakjk6kjilhQ8I8MNd21xFLlw3FiWWrBZdG0U9paEAG\n53TZQb48ajUcV7xWkBnp2Xm7C5ow5RaLNo4GURDFGsfYdHiBk86bQ5NY5iak\nDhJ6\r\n=KNHE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCz6sIhtSINyornejyuu0TY5bgit5fnrreaq0ajh7xZjwIgOtUeAPVX+NQ0dApjhkJyKNHtIHrsQ9wJ46XmctR7Zb4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-02d4f6b.0_1567083047188_0.1590120002580826"},"_hasShrinkwrap":false},"0.5.11-04f8bf1.0":{"name":"graphql-toolkit","version":"0.5.11-04f8bf1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"04f8bf14ca7049bda222837f7cbd610eb130a715","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-04f8bf1.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-16WGzBkXzbYR98sFHiygRHHDUzzd7CW0nO9jCCf+OeS8BeqLNFPJpMKlAe/9mZKpLHx7Vl+FqRfUj2+gA6lt1Q==","shasum":"8639842c39c06447b0b16dedd259c952f0e747d4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-04f8bf1.0.tgz","fileCount":258,"unpackedSize":398794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaHLTCRA9TVsSAnZWagAA1XgP/1Ktmoj5KCey2CUxPbyH\nnhEXBN2kYqFKAn0R7eCjDniQYIimze2HQd9Pit4mG/yreDrq6FQrlPIYnDfV\nd2ekP1aZg8KyiKf7yFFvDp4LZ3whufTYEhta8vFlQffeV0OE88rBqzDOnnEK\nwWtS/rZQMUJChHTDibcrgESTlXS+GhL8YQLx3vKnrvltj1LXvlqHZcbmz1I9\nmuBiiAPSeAXW3UY65+JY04ynflsh+vHTmqJqtR6dgcDKOZW9fCaLCb6OkKvb\npKSbvY/7pdzJ97MLzZpxVW1EkWFegOSfXckw7jU9XuKNjykakv01K9oAE2mS\nQir+CtsLlIvLRLSSz0LjZ+lSNBDvXlFB5wf2EA2CVZGjOK7+LIwGTougTUrS\n9YlH6C4zfS1e69ktkpw2OnlOtVBLwz/J2WwLb6VxHX2/mPZ36bYDm2g+7vFr\nq6eaGIdzNGNmgb+WNFKQgNKtvk/9uxIk5mC7PXhMnojFbgQ6ErP//w74XTZa\nvGmxYECqKH357dureJ0j6iCyBxDn1PYbymNQvlQs18R9kdqQTxh25R+NQBGa\njVlEVCbbgLBqKooCwCAqqxTzyDqHJJ+ZR83mbi7Ujd6Vp3CRMse6SUCGK1jq\n2KYuaumHlciiFcTVwdiFS1O2GbK0SA4Xk7y61dVWnZ6r9h//NhKCoGgCN+BJ\nFFsV\r\n=PLNc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUgv9EWicttOeTVHdOho+4N7s+Im+7kwDcF6fnSrpTzQIhAP+/xGSsUZl1cH8i9CqtA6Wt98btA6Ga7KW4dJ/YEf9Z"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-04f8bf1.0_1567126226456_0.12935528603296165"},"_hasShrinkwrap":false},"0.5.11-12dc93d.0":{"name":"graphql-toolkit","version":"0.5.11-12dc93d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"12dc93dd3116dd832e3912bfe690d812e8556886","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-12dc93d.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-KycYMBibaB/RAAZxDiIStHyfiRxrslwnntkexD6LwuXwX52wJwG6E+oO5y5lpaTRLcDtcSz5Ionit3L5HadFhw==","shasum":"83285312902593633ccbb93c6a937c6aaba7b212","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-12dc93d.0.tgz","fileCount":258,"unpackedSize":398756,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaIZlCRA9TVsSAnZWagAArhwP/1neGAvMBVmcWYe91CTN\nprliZJxtDfjJ5hB5QA5eZty6hmmsioEYJdi8Sj3eqwEsl8AcVVj7T5ibN8s0\nnVZylg9b1Zuc5CBatQURjTWZ89SwHBS7qWOJt2uTVdkf/rEpNteJFPX+cmpP\nxgvnx6NP1dDOvS8lctAG3nIbuLEX0fe8NNpDVzEUTS5LA6J5/9Hh7BHB7xQw\nc81aO0iDkekGawjOHBFsOnsZliAqRGVTrp82X0cXdvyOBMuAKaOavKxx9UfA\n/Hfcs1kYY/4gk5Jo21LxDDUIm9HSel3Od9PCAzWgWAH8hCluvsCbQlPUmLDy\nHQfBCp3vj3CC9YXIBLzip8yEZKfyw/Udo9Eu+3pD7VFCEXvMji/jhqcgRdVW\naBNTGEXRmfJaqx/o+p+6dyiLpfK8G+62J8WZHJXYhDnFUUaCW3s//MxuV0V4\nR+tFPNYrkxEK0Zi321RZECVvOrUqJbGmb3rQ9lTO99ylEVL7/mR7TByFL1vZ\nlb/e1NSHa+8f/01vow8E+yLwvl8KfNua21tQ3j3YChbSoRpL0vTe/4+4YtkS\nwXcIyggMmb2qq1R8OGWc5ZEmXTsSopqYF7RpxcOHn7NYxrQW9I4mmND3YAxU\nGvQTc44U2/EAw/rNb8M92IsAMa7ctTzderDYbkWcZuyvYda0jbmracLaRBT2\n9/ld\r\n=y6PZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGLunCjlZnIVv8CnYg2rETc5jvA/SK+FeVoiMzSKvaUoAiABUoQwuODZMDR6mF4O9yO7n7IlkbwGbrIgmbJUXsa4IQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-12dc93d.0_1567131237159_0.6240012313599603"},"_hasShrinkwrap":false},"0.5.11-0d5fb9f.0":{"name":"graphql-toolkit","version":"0.5.11-0d5fb9f.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"0d5fb9f5af5b12d2f02cf5aa59037064b411da4d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-0d5fb9f.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-EYs6Z2INDoN8RWiE2xRaG6z4KqFZsUqExpIQvAdEQlhabwXoVNSJ6sL8rVegLey6/SsQ/e2M9H6kqwWKrPBdvg==","shasum":"7dcbaf3e9f91c0a943bd08a5b427c40ec336bd17","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-0d5fb9f.0.tgz","fileCount":258,"unpackedSize":398807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaLR9CRA9TVsSAnZWagAAChgP+wQoLGvdKZfw/BPEPkAX\ngPylUEb/wqVJd0xvgwFC88xFozLdDpTXMV5l4TCwzVDeK6RnWw+9x6dooTej\nMUDt7fOaPkyq20n8M89lMMM0n6tvp6Rt4KdW7pnUsYpYGbFqZAGShe/Idnqx\njDWjXsSeEHNVdchl90e7mwdo2xO1MbEROwhj8CQ+TQQr5zI9KYfwq1fGP1El\nA/NG2l7Qs6YdRoK2j+2GCrzgzv34DGW0Dryl9Pn1h0Rja00cKTI0hWjXP3p0\n+kXZn3wRzV4NvChpaejXfgFqdJeLdAUF5MWEwkOB1c1yOoqtpWlw0Lq9/D4w\n5AB11o53Hxs5FiM293oIzBPNHvWcM6vloaST9CoUNzPOJsEOSvd2q1BZ0SJv\nISbR+UuTP562vgp/cXU3AIgf0u16xwdnrcnLKIk0IlT/glJ8lfOEtyXlpcuO\n/KzTzmJK5VXDvs+WMM6rmjUCRRmkw21+q1nZVx/XrX1D/buhJuBtWae/8xpy\nqZSMhnBKzFyoSwuftNu8N78fKLmFNXtvVWxqjiEltQIXvU8Z14Y5h+9/Bgon\nwyqfaxNS7fbVaMRqmmlsfX1oxumzBQA+1H9jbsvgHtc5vSANEYN04NBzxJH+\nOhYwehXGYoN8TrxnBQvVn3KD/aZXQvrM4Llhc/0La1SlpugIALnlDzrLvMW3\n+EHW\r\n=vNR6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtceNpnJ5oGZ12/FxIF7x+V8CEQHBZENjW98oloabRlAIhAN0Jhp96I6OlpYumeDxr5xmqME9wXcNSmTGlvMZtYjCk"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-0d5fb9f.0_1567143037090_0.5974283086467818"},"_hasShrinkwrap":false},"0.5.11-9ce07f8.0":{"name":"graphql-toolkit","version":"0.5.11-9ce07f8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9ce07f87ea373945fb6de1b4c1e493e914a3d81e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-9ce07f8.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-TuyYaUm1u8dBYWK8PbX3GlZ2p9axDY1RZuDcJ2c9eOyVnw5U/OswejsHsXt0FYYJr07A7QopVV/a8hoYAUPvtA==","shasum":"72f04819c9df3c04d342b559aee6659f5a7952cb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-9ce07f8.0.tgz","fileCount":258,"unpackedSize":398809,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaL7GCRA9TVsSAnZWagAAfTIP/iNweNi7eXyMeHr0XTrQ\ncv7P+q49ojVH69mOPK0hV17mhWe8obMhX/q5KvzCRlMny79Uor11WnZf7mjB\nPqK8TzO4Peuk/C1C8/R0zcQQceMqFiqD7/sTm8vwrMEmgJPEHHt9KN4Kx5Wt\n6oOb2/Djpb83sIGv4QMuagOH0WaiMHHBe0GOv+BIAIDj00a/Qvaj/hSIZ5G5\n8IqrJMc1uvefDCxkMBkSNeIh0E1ScHFAAX27H7QtR2+Ar3a9+YQks5XO6O7m\ne1F7XvXFZKbQzZRMqvJrHrxiXdFyJ5BBKhATp0gcKjha20gQEVS5NIKxsFAw\ngL5CCZORs1bDQrBPGDiArKmKV8EXksNfNJknUv15MNgN+x6fr2jfgPoiiuld\n18KJwTDV51LM/amfo4ejZSQ1MrdezaNDHijKmfAGf4YzOt6FbnfrlsjDAJyV\nIHmdT33OOmIqruXm4NlH3rQe+60ZyttNH/xAP/x2dcu3I9pFkvYEidsI5SMB\n3LMsuUMk8sxT7DYDg7Y4TvIBxDSXg7ELDvUJZf3N7HFwMhdwIk6opL8UZ1VR\nwYo0z2EpT+vGthfHgyYQfmuz2/fPYBfXeBwTOW3IB5qCDvCsjHMPdobKpaA2\n7DR405xIVqgRJfRDh+mxp3RNLR62b+55LcwTsdPQN++VQwhcLx6gfGPDFc0t\nTBXD\r\n=4hgs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErWKFGQNOP60GV6ZUyB7MiogRwj1Cc+Irzn2Uq6xW/IAiBOOPhRuTj6rNv7C5HMb9lePhFtuJBlrjzTeR/KOZDmng=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-9ce07f8.0_1567145670105_0.2709465604815844"},"_hasShrinkwrap":false},"0.5.11-5241638.0":{"name":"graphql-toolkit","version":"0.5.11-5241638.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"52416384f2c5b84edaaf68c4ed23045e88197ff6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-5241638.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-sR2NDME7v/jXBFE/lZAXYOvoQEuowLCZYpjscEslcLKmF9l38aXTYCF517E106fsI/I6H2qDCG6p6eM4XwFhqQ==","shasum":"10c00fcf6331f587279d34a10472a8ec63877590","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-5241638.0.tgz","fileCount":258,"unpackedSize":398821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaL7iCRA9TVsSAnZWagAA38EP/ib0DuN/VCMK8MfkTu+j\nxdNUdINXB3iKGZ4HptGulWPlgtcuQ7sutSrmUmX+HIzmQyL4cIIwXASlsjWm\nYnI5PA717tu7UnLV/vrJAjQc3yRgVS+JsqtYk/GuE1LMtoaxJL67kIsabJUO\n2t8gesi4cTexNCXKcO/jmcfSwDOtvlp109H5CeT0vx0+s1VLLE4IbgXqpDW1\nvyKJn//TGxZnmL9ws9+KfGNY6eWwi3B2CW2aRCSQYehPJUzKF0gBFdjWJpJ2\nvNEWKOgT6W/jwL9SgTTW/6OXxFo7/Rk6TPoKtxSuqlIxs+EQqfNFdq5NVOZn\n1v9lhVVMPL1/p/zMVdR6pF0btNU4lFIDzKM+xvMqfqFM5vy7JvYrckZo/eEw\n+YluH2fpjTSFhBHKSzaG1pENJ4c9+jv0XN8TQEyGjDeaVEhfYVKNZp2GRnFO\ndcann/s77PWXCJJR35pIydCxh4Z9ZNQujPgy8ete4aSJcuJSFAiwhvvP8JMz\n5vGTG0uzbec/lptbh4Kd9sJRyus3Zdool9OuvDG4Ipo4SRyjQKvY4yfAKB4X\nEmF0eP8zoSDYIcp3ic0v3CXzGmTwWt36oYCtl3QDyD0RgEPZVnGpFI79iezS\nHLYM8Px41+l0CDcTyJDf5pjvYfoxidHjOpF3tcjnInrV5y/D3W/CEZN+kKl8\ny/65\r\n=KN/R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFUptlBDRTTpQPY6ZIuxNTKcuonun+3El4SF8slMgC25AiA4fPvwgmkqCg1cFTmZjaJip7FhwXXHp9LJl4rHKUmhGA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-5241638.0_1567145697294_0.368297118137318"},"_hasShrinkwrap":false},"0.5.11-7d5b56b.0":{"name":"graphql-toolkit","version":"0.5.11-7d5b56b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"7d5b56bfa1e02a0375cc248cbd8c7374e38e4264","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-7d5b56b.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-lvC827Ho5BMX9sm3k535JxhRxmJ4RIbyStSVF4HYDuhK1jNYDyoN1SLWBAzwWBTn4oNgrTICzNX9xwXaht1i2Q==","shasum":"7cd2337c9926c154efe9cf01623d1ce63a6faf2e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-7d5b56b.0.tgz","fileCount":258,"unpackedSize":399695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaiPdCRA9TVsSAnZWagAAmcwP/iU/8CxltJNtC8k38q+0\na9Daf+hN2YP7cBP5kpga4aUpAy7uP0z7rtU5jPa+GnAlONsF7ejkhIycOemG\nS5L5zqmw1tOM9qdbKIpERrSG3TvhbbV+rvwtEf9ua6PfwbWgtqBwcaK7d+wq\nzT2Cv313vs0SsYGHJrLwHi+3L9DT4FfDlcgrn7j3fqrL9a8w0J4fA3xAIB3E\nHxL9TEKMDu3Fd/x7eHC+WA5UUWaIfRraSuuk7D2ug4YH7IhvlP7yE7hkOddD\nEiOVVrMvijU7PCV9RKTWcX7TZHVvIebODtvqhYD+wQqxMj38oIaJWpJ24bwM\nZPH2jy7JWNb+jsQooUdibiTN2T3+rLcT5hWHFZ9kUrQD/lVL4j8x0ls4u7ln\nyjt/YYqJTOdiMSuVwiE9AEQGp2fHCQUO7fYprZK4v5O2ktmSPgnjMicGCnfe\nFcWAp2/yBi1cgQLNdKTGwaKqARkaYhIAlLX+WuFKbcLARi8FIqeSMEJCrSV0\nsB1/9QwMQM210X66uq31ETWFk5giTWgxV46KdHmmSYJTVhbNQhrM0cCbqQHF\n/AK9MIInFzPMOCTvW7hozgkV2geHXSz6lFuMyWz6DdFA0NWbi/4umjRqo3Sl\nASlP0e1MwtWmE09s8EZGq1+Ch96g9rs/lamjNRbrJ6loaU79DcA5Po7j2rop\nR3TB\r\n=vize\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8FRBEOKl6wF2u09AdEktFoAI7G7g6EEtVLak7TQDwDgIgSfbcnK3FlBaT8CvzEjwsiafBL/AVZQRRMQBGt8hw9GQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-7d5b56b.0_1567237085157_0.9090685742937459"},"_hasShrinkwrap":false},"0.5.11-257b84c.0":{"name":"graphql-toolkit","version":"0.5.11-257b84c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"257b84c598116db3d8f5698fa5f63ff41eaaff65","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-257b84c.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-CFZesUbVZa5xAhDeEoLkWuWUByzgjWFgpLhVzMcB0zhKHFSlz0tK1arfKNvJVIOJZNaD65S2k4alg2YAGDBqaw==","shasum":"2e465e44316b3253c270f5ebf1746e38ad552289","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-257b84c.0.tgz","fileCount":258,"unpackedSize":400057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaiUmCRA9TVsSAnZWagAA3e4QAKQGRASw/goyvDJYtfzY\n39k8fWemem2tPhRbx0OHumzhcX8c+bCv6oFSt4jvFeLmio8ZEqS9emTq4fpt\nzFg/3MDXXLWeebGfYqnVNWnsg84+9FFMTo2NIlqHqveDEj7gJu4XNXXHE3xI\nAO7OjOCuLZDAmK082LaGALSJP42GklKE7x59t5TmCiIyS2aDuNYDaNwBV8Cs\nZh+KJL9XDk8JjTL7CHJVasbFK9GuXC+KtsJKbXijlUI9RYxNGnkFDvEIBPWQ\naxDgZuMDzvlqIxJgy5JS/Perq2TrF3NEhLOwHQM0r9gvib721hBXhRHNEPs4\nuQ9p9kPdqDuhBleFE5h5eazfBXFPB97/srSAUxpU4fiHMOy7EsdYJ/3V4y09\nxmMoHrCY/U/2ocNvX5e709Fms5752jtUOpHiuSjuYi3WuAEfNfL/w84QdfdJ\n+ZNA4zZPR5hOAptLVb+vkmUdnhRcTow44R3vL+ueGCvVQ1iUb2OlSfhXIVJT\nxj8mcueJMmtdU/6o2eMWDPTFJES+7kW3zIb3R01rTqzW+gd89zbD8T9ewOy/\nbJfzKHf/xXiWkiwf/nGrnW0EZhaPt2CrLANfvIoZZI4sbaUqZcw4LQyLLmO7\nObbHBt1vBPHMz1EteJrRQmjbXHtNDMkrI912o+s7W9R961b5q1qySPwUrqKW\nixFk\r\n=DWC3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHH16GaEN5USaqZ1qzRA1yOcaDnF2iqr7OIZ4B70XW16AiBdRnU7Y0ol9xS/vmMuE3istsKFYHkrZn3NYibULGiFaA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-257b84c.0_1567237414023_0.8501371518545224"},"_hasShrinkwrap":false},"0.5.11":{"name":"graphql-toolkit","version":"0.5.11","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"33c35589121baa372cef919e46348d063bbda2ba","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-CKYzzqcAUbG3mzeQ1+KDqggQMj1lcleanhU4h8EH9bKV2+IyY+vMXQcuxBuLF4BgxYeX04LQnPUfGi9F+lo0qw==","shasum":"f9adf1ecc4df455802d0cc223acbd35556f7d78e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11.tgz","fileCount":265,"unpackedSize":411425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdai9sCRA9TVsSAnZWagAAcnAP/04SbmISQfXySsYd+NiP\nY/p1CdU7g9+xK4lUQGK8pg+nbmFIgJnUATbZLHHSlS9T2D93uknPEGz1iwZ8\nHnBmfo6ijWz5jBozzAcShZ8iBNX96HDXuXC847GSMXQ6rvwEOEgLsZIwrCEo\n8Pf0PnsuZt2tRS6cu6FMhr5dyQCoL/sONiDkrKUN9kwnWZAX08Pbc8kd4iVU\nogsVAHexshu2cMfQXH49FMEipkHSYm0Ifr6pR4KHf8RUO6PK1k0EDAZH2yMH\nnravvlplk8BKYBHQgAaiP2XcQkGhGVddDyzxvST4OtUyea8squBPUWXi9elT\nulpo26q29NKaFgLKMv+ASlRnP5JeTXMQHOKMCPiW9UGKjM3IHydZ6KWHZ870\n+0zytwzhe+1NyE0SCR/vtxxQgmv/aqhYvkpjaCnYzaTN4KIrKoeUwaIllVmJ\nmili0kO6DvIOlfb9hRrmgCYn3YGeNBqzC66DItcqzgiOU4uLl75gX+Jgl1Do\nag80oRs+KQploV7gvgV5Kd+21iwdRfnukTFLu5ZXsKRzlQQPTTBc68CYJRUh\nM9mp2LpPdTK+lShCXH2f+DYr3GFxahRf/2gI2NjmGM6nf6xJtPxvyUPGOq0Q\n16zdVdh4DpGaCtEy/RDcYWjVgzrcr6Kf9AyqS5MpmFHUDaL+qgMamouGxief\nFxMU\r\n=9W5W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpzmQnMEphifANDHNLA1ztM3+xaWyawsXzMhqZ4NuSHgIhAMSp2l+DWZa3sZ6Qr2kyBYxGUduA4b9rQy44An+AbemC"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11_1567240044051_0.3174692295157062"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.11-fcefd36.0":{"name":"graphql-toolkit","version":"0.5.11-fcefd36.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"fcefd36fbc30997da3034f92be5cac259685676e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-fcefd36.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-PNF1CncEfRHLvN3fD66UYTo/3o3JyHPdCyB3qlk11c88i8l9kyzvjUZULX2705hVR8cs7SvrLvAlxOrhdB8guQ==","shasum":"048009c2b17e8fe102c00d231bb69e11c89da92e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-fcefd36.0.tgz","fileCount":258,"unpackedSize":403703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdai9/CRA9TVsSAnZWagAAKEoP/3/y3Yx80jbNp20vY57p\n5lWb+2s59zNzOCvdBWZzzBjDlstUvIkM5Rx4cmJDHv2qfJ0tfQpgs2pcgx0Y\ncBy05dVTJV8lHkVdf/zO9GPlnsEot0eiXjFL8bVgP7gdJeJjzVIEb7PgwvR1\nGWihuhM5Yb+9EXmpGesSjSAhcYEkxQvnR0SH++SlYOGfTc6YhnWO+CWFB67Y\nBFqJGJPp9lfdA03oqdNnx3FUm27KRGG2rmsf1NFWpaS56QeKQFowKBhNuxzu\nIBWX37IG6tH+91OYcKNc4fBfl8QKvsBbt7ckbUznxhCur65Z41H6loql9v5k\nkLr71AidV0WGp4CoU3OM0y8EPuZG1ERYl5GtvgPkFqUOaRu/DaDBCTlmkDQU\n5O2kplXr2/Wemp/7gYUlY6x8Bo5EVrrcX5F5zEopA9L/sk3xdE1BTNQzNJGr\nAK6uyuHZ+CL8CRDb7T7WwIvnru2h++3biBkiJHecMgrjf80G5jCWZ/e4JIy3\n5l2RqW3MyO2X2tNfeIEsZ5KW50i56EuHLY+9Fz7Qz5KEjakDtyojM71yZqN9\nsVFmB7pNvdNNQUg0bZkcPHScfBRLNBKT7I0sp8OaRqTcSXVgwI0eiyWzeron\njZAJB4vdAX2Bw4Ya5c5Siem1IalRZ0Ze+0f5a2pT35WzR88b5MlDXzvN84xd\nA+RX\r\n=m/b+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbUviXMMmIa4J8TW7G176mFJA+On4wJrN+/IoD/XAsogIhAPcxI7jSmLpBv9NE/wrzw8twzZ4qimldwftnIofpColt"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-fcefd36.0_1567240063035_0.6706201544490966"},"_hasShrinkwrap":false},"0.5.12-33c3558.0":{"name":"graphql-toolkit","version":"0.5.12-33c3558.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"33c35589121baa372cef919e46348d063bbda2ba","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-33c3558.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-oQcrowog4C0PsOnv4RvNs0XOW5jOJRW91Eu2lR3UEi4x57ccZtWgpmOdWh8wuJIIqg3wbjZFU/s8dQFzSNb3xw==","shasum":"8eb37042f6c8847cd72593cbdb23a1558c614462","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-33c3558.0.tgz","fileCount":258,"unpackedSize":403695,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdai+hCRA9TVsSAnZWagAAwCwP/2mx7IOETWamiWT6itX4\nbtbbPIe7s9OBySY5mW9fRskSumU/slS3roUDzKQtWPZGewXpTyCuCKnBqnOU\nAJRaao56eGitYiOKbcJ1CVTjkJT9iWlJXs1gh/aMm5LVJBf0+YVKYyl7Be83\ngN9Nw2bNjcHK5+Oi6lKjXyhYpAbOmSNEYGaeggx9suw9/1k93l3Qvi7NRz5B\nNGGbBlwXmxdMIaOwfky7u3zKjzPsofrCFzGtGJcDmRIrx+l4fUkdTvrVaywe\ngO4dRSIQY7s88NQYcjVhgQlxkeiw3H9dYKj+FM4KFOZk4StlcfyRDWWVc+sK\nycPMKwTsskoZUnzjXpeZS2VGcHgEtYHKWqSvNNca7rtGqvp4fXHgFRNdOKqd\nURrOkIR6H92mg+B2Ycrq4Any5CTU3cnPV7/bBoi9qJWFdVWMBWOCkx/tXvU+\n4W2+Fcm/GU1RALbMEDvQR7ZnpFuDpm4HyB1PjNn5aBS4duVmpuT0PIEELJqv\n1f85gg2Ju9XzEzjI+aV0Z3Sfs3+cM0TJ9mCZHJRmVFcj9BMBtBb75V46LHow\npbY1vmNu0TJuT2irmiC8R5tHazRiTwuBQnscpGMI8xz7i9LWB2v5u4EPNwHe\nkHAu0rH3hj8SPQ/UCGD+XcP6PFLt6jGKrzJke6ZBo0Jf75tdpMnYgAvbr9qg\nZh7X\r\n=WtnB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDeS5QR/ObLTJcHQS/+d//D+LI2jYn+fetXKL7CEaGgtAiAfoo/hECYSYBcdmflI32O40DGT3aEQsqMoO+GGRyPVVA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-33c3558.0_1567240097311_0.4862272279614184"},"_hasShrinkwrap":false},"0.5.11-f816418.0":{"name":"graphql-toolkit","version":"0.5.11-f816418.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.16","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.3","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.5.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documenta/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"f816418bd44f6e88f271a91dda6721a57cff7be9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.11-f816418.0","_nodeVersion":"12.9.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-cyoZZLdb0P9qXahhS+K/cuHFTGshG+mNW5YwfTDgklHMyK8cSv1hBTpPGDE0adVzBrT5ld6jIaFWa7R+OWV7iQ==","shasum":"a3805a8b832c6343ebf4bae41cbef832c48e6a61","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.11-f816418.0.tgz","fileCount":258,"unpackedSize":398930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbfh2CRA9TVsSAnZWagAAkjEP/iqK5AaR6jVDVADgkhRZ\nQWZIrKRXnth/z3Uc+LL55s5gt0zGofKiwe7B6ivZgyM4oV+g66JAvV56Hi8q\nMPrCUS57D16qQ7MRm7a08XOsLaDBDgtMikA5OL9D/Zd4hLM2rD/PIzG+xYGC\nKJe5F60n9MflRcpxisEByzPc53XVMRm3yEyl4T7fLjj38aH6yTp1xemy1xNq\npjZS3gMFslFZ/0o4DGYL9fjgJZPGzWEJkf+hbPlkdRCBsjBfh8bURbxpiEIO\nJZWjOv0k0x3nzHwIHXZp4R80gyaah5aMG8Jl0M9pA7f4kAvF9LD1vgoLHJER\n7yHDmhMNcgD32oRrnhis/wXDcHajlgOJ5/CcouOfu0nScY45QrlIx8XLJaj1\nnNkjHz5rMmehuYF5sZckqZUIdsRlQ1Xkvs4X90U/x75T8xQcHAV/sGIcvnk3\nECcaz80vVx3g/pacboXl6SQRGqrAaAf2V6Yoipcb8Pr6UVqGlxR74XhmsvQq\nVVzBmwhFQgOz7E6GhpUz93W4A/godVFj9K32L+tqnVdHyELa+dGE+8FDJIS7\nxA4wPaEz5RBXiBi3SU4qNYWM9MUjP6cO/p6e0YVbSlGstolqK4/v0ltPc7I9\nl1QfIk6Mt/o64+DbmwURn3LaGIMUk9Y8TDyTWoNx8JXNrowgabBHKK9VFwdq\nR6Db\r\n=LsLr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG9tOXEuj+vBLm9WEGMwLgoHc2VwrC0NnmRD/QC+W27fAiEAui24FsnZdLakBUwuxwpzzcf2xIMbs4TCX5237K+JeWE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.11-f816418.0_1567488117791_0.4535109209978134"},"_hasShrinkwrap":false},"0.5.12-e05e214.0":{"name":"graphql-toolkit","version":"0.5.12-e05e214.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"e05e2148d69eb95530ffba3b02e92d0d112ce673","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-e05e214.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-p3lK4Qj4E57Jhfp7BYdr9mf7TqPQdVb+a88TgeA6mxvi+KWB0b0OBF9W/QttApV2g3H3Ls0JLaeTT7Ss9ufRCA==","shasum":"028eb9b660b3cb5788cd838874fb2a3a7f1606c1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-e05e214.0.tgz","fileCount":258,"unpackedSize":403836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbfjGCRA9TVsSAnZWagAAIaMP/jfxmDGRnGmJ3wjAqHdD\n2pjmtpMTkwDnO7MWdcnFqGib0ue/itf+yZTES1lnN4meZEbXgQ9pfgG79F3M\ni7afZsrSXwSrFUnga7IiDE1msSJ12xoho2OCv8XkqSkeoOP+jZHSOrd4+rxh\nWB+scKiWCbawgQ4hPcbOpoITwPKU/eMSVcQGTh0elD0aCmeP+YILImFiAlLa\nB3sU/0MJbj/AbR9fgJWzivWdmzbgJX5SkQGrh7tBebU3IhE8stnENsQjn7Md\nC+AJA/f/70rDTpwLmmH4E1p45epCJtCva4mdGkdVW7o5A73jczOnJSWtK/79\ngF6HWffM1M3qIXNHDBetMXwe9cjACdX9YvZJOyuCCsWzm+/HiHk38rWIAYup\nx10b7NhjWZRYDaKwOaK5rj84YU3i09gBTzU+CxcPpCYRAWCyov3rvHG2fu+F\n0FA+IUF+dDOKsL3/1nwKyjhTFUCqPFktGAewmxPlKaNlh8ogyFokKWPd8a8H\n1nYKEZ1/+P1UsnNUQu6LD4iGADKmnsz5qie9+MLVIKJeXoJ1V77s1jjtiXuf\ncqtm+4hCTJzb4Co6sRXRCeCg1ZOUuO7aFr5UuYqV84/m+As91L2DNyHGsZnM\noyxRNZeC4wGuUhuU83vF4RzCn+MWxrHSParJB5NDNCid9YvajYWHTRycuPW3\neqfH\r\n=df3h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDvyY1YkU0odtaUnRoKH5gcfJ1q8kqrkntjetQKqvAKkAiEAihhSwpsM0fVN57rMn9dv9bbWb/UeHQcwLBIgs2GIAZo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-e05e214.0_1567488198131_0.12091241814975917"},"_hasShrinkwrap":false},"0.5.12":{"name":"graphql-toolkit","version":"0.5.12","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git@github.com:dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"licenseText":"MIT License\n\nCopyright (c) 2019 Dotan Simha\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"graphql-toolkit@0.5.12","dist":{"shasum":"2ab4a81ff2e67bd591be5c660f09744024d98617","integrity":"sha512-sYiY6lBBd09uRPSIzEbbBuMLxzFhMBRg688cbaCbqhjEEzKN5mKZr+Chd5jFYPrDv5yKAzeHnujqvIzjs7bO+A==","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12.tgz","fileCount":301,"unpackedSize":411315,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbfjoCRA9TVsSAnZWagAABagP/3AwI0YpEqKbC5taf7Oj\nTs8hI4wbec/ROYXYFDEc59T3R+rGbtbM8pfF7WTnBRH8Mj5/GFKrAX8EzSKt\ndD0HD9dOk8SEFUdb1x3WvwFteQ+Tv0CFda5h0DXtY2PlY+vN7rbtZdd2i225\nyFBV8lS1N1QQctiHhW6gcWL7aY6DKUbl3dsuqNKrR6x6q4qI4Xfw9FOfDWI2\nKKHLhxIRuzwcxjQfTZRTpSasEg3NYbTqs5gpKaiu2C0Qn6GqJMinhX1kVobN\n3PjMWif4h+1K4z4vAoEYuKIFZpIxzPqVX0qR4qbOAQwGMAUVHrjS2tWknKDa\npXPBhizC34PhOM1DDaWVS/AtI4EK2taLPhyBUwh35vSUTxr9Tck8ViMRzUnL\nAIx3SaevIavMMiLYNhnCWP2oOkaPRf7TghYR3c3cwpsGrAlgRelOEIaaIqPZ\nkR0go/Suh+d1E4uwY73+PWffYRkJn6A2tfxEClVfKVQtgTonVgApkRQWnifQ\nZ/792H4x2WRmQ6CVjrMIA4aZKDfGOHV/+OLT1T7zjqUlEOAEZ2v5pRH2qtvc\n8I1rBLvtlAE4VQk01+mxq3wfXPImL1SMGnopTA76a2JSbizUZduiGAPkfTRk\nCK1/G+LfmXGsg1sAWuFivdWjPSGrwOlZc5HuirK5UWyK3E8f8vjNPrL2EBy+\nkDs9\r\n=tcRo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJiaLEOcYjOKkLgRnkVBUIU4kFjSghUNQb+Liyfn2+sgIhAMtbvRlyiVEXYlGQVC2UTV02mLi+Giakl7CV2EbuZaMV"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12_1567488231135_0.17883684078076234"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.12-33d3e58.0":{"name":"graphql-toolkit","version":"0.5.12-33d3e58.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"33d3e5826107b6c5bd381fba7c747294676eba38","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-33d3e58.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-iwDmNnAE7Lss0KZKG2EqxfA0MCv/bsaMSRSWsvXDKzceIfpRoVu+ufV1Z9HJDEXu01uS9zMtBCNdTwEecCmIkw==","shasum":"0349ec80b3b7505375b4fb33f22fe09a2a8d6c55","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-33d3e58.0.tgz","fileCount":258,"unpackedSize":403997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcOqICRA9TVsSAnZWagAAdEQQAIS5DeiGbAtIyOV2ngpd\nf/ZZCcwtnl9frhD1c1BkTk9T9z2f3VCbc4u3XtUgxLpzfVYt645LTYXnKAjO\np1JcB5xXYsQOXn3XhyIDDBSxHHy4jhANREXNrbwi4ytK5G/szx6AwxreQ+4O\nQRqsV3qKIalw2E61zRlA56KIfTIqCxK0lCM89U1WUpLlq74YRi5+n9CBaDiW\nkq5kWKo1VshqLIoh8m26V0EYjjOMJRTSEqZmi1vHEOGkuw5aW8bR87oltCLN\nQG11LuQZnRSu/KcYxZgUzGh17c2/OdxreniGqxKFvEdGyuzBcp/MF+JYTJ3U\nt2XMDed5ngSFdGp/81TMFnOhVxTCIc1yCuYz1eO8TaYfY1PNnvk0n2O8vdHi\nk1s4FLb7fIvI2K0I+GJBErjbAhj/zIQxpf+T4Iey4YRDsgcBs4o6oTVck/7n\nGY4xNFpqcZiEjC/rAe4A7E2fHdq+lVZZ2rwfV5dM05DUkHlriY4um7T/+1pX\n3GOgOyqcy4CdnAEqUqbhQAk7X0jsYN/Yp8wbLjOMgxlG/kyq6sBhRQQj6hTu\nTERyMNrjvB7RPCOAoTCHKTVQBhxRGvAoDQyI2fGiErTUh3UrywduL2T+4xYE\ndy6ckx46SFaZgaL3OjrzHj64MzIXSOdooEzpKox469+86zKwFCt84JjE9C94\nANbS\r\n=tbUY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFXxIYoeSJp5IrkfXAGPnRww2MONQLzmCBQpvjXDdwOYAiEA0YmFsTasPgf45qTLjjNBLzb51lvNHtkQk8QbYnFNdzI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-33d3e58.0_1567681159800_0.09174429660070604"},"_hasShrinkwrap":false},"0.5.12-a80120d.0":{"name":"graphql-toolkit","version":"0.5.12-a80120d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"a80120d7145a02607eab438fc6b94f0fba6402da","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-a80120d.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-p+gCN4wMMbWT5UGfjrjxeZZDvrq16bUATtbDaVzyEncKLRbsOQGEwJQq340W7QtL0M7mmlQBKO+VmtlqEA8gkA==","shasum":"e59975dc66fcfbd23d2247c0e0c2b08e13f5a242","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-a80120d.0.tgz","fileCount":258,"unpackedSize":404018,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcOr1CRA9TVsSAnZWagAA9dIP/iTLBN6Rouirs0J+mZLr\n3rlbh2s1kGgWNoXXqFniACsSjkI1AJvg3XMDon7680GQFRorwHPUqAx4Qb8c\natsOqe3WK++DjXoxugM+5Ro78OIAKFt++yOUqCYZjaNtHtbWJVXsQxknd7XC\nGEIqENtUxkLcv+ualfY932e3GUwnL6OkU9wNvxAHXoq0boNzPi7jShzE3aR1\nYTDMI6jaj2hrxn+WltM/zL7qR+k5Kkb/GL4CUAaUHncnpfnpMh4M4pkfYIEI\ndG4SU4hy9UEVjKMubEIK8eoQA4SWJn532AV/XpR2rs7gd62+9KRmYu1kQD/1\ngkjHQdxauH+XegeM27Eeh+TjyjoLUQoXmzhKTNVOz+N3t/dRR1hjFwRSU1Lr\nQ0lrGm5eUPTTVaPo0a20ljwJJd9A5ziTlmalF3E37nkyKbEzWpfWkc/2dUe+\nunX3y14OaFgsmVUgUHUc1f1TolLtD4y3fFwtp6dM34xHOcsnjxKSe3eFo2p/\nEydvx9UcSn4ZPFBvAUQk8rtfz0401aSemTOL38EofNsabq2i1BcBZN5JlI3i\nI3q7wvRNnxIZDX2ST/e8Ul9frUThyKsPbKJdFDnFh2djNGCcWKH+u8HzN1ig\nheg1kVrJibjy5YOacCT8DSlWnjBl3ScDIx6xDZuzcAMLtlfHoxL/HoTb7sW9\n3Lvx\r\n=C/+I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0raibO/qQrKWY/OnoawYV+g4y7+4Mwg3v+CDL9YCJ9QIgcD496wkHxZB9tnmRgDp0Qx6CyInoz6oJvRk3asu2SsI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-a80120d.0_1567681268638_0.09493098952657797"},"_hasShrinkwrap":false},"0.5.12-af9c6c3.0":{"name":"graphql-toolkit","version":"0.5.12-af9c6c3.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"af9c6c39ed358a57a388ec44d9d546546c80b546","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-af9c6c3.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-JbykR8sI9lL8rtdMKOiNN05W0KvwOrr6CuAVJuYvEK8fVwNcZ/WW5yoWCtBrqe2ufrgGvGsZGRo6FRuQccob0A==","shasum":"9a0c3d343c12c30138786aa5c990a5ae1dbe6bc5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-af9c6c3.0.tgz","fileCount":258,"unpackedSize":403975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcUHJCRA9TVsSAnZWagAAIRgP/RqMvhGqRqMsUO9Rltg+\nPSDp3iKwQ/1CQr1lMGlRGIZx6GilsKTfvJxO4m1zcwclmQ0XyaxwCQsZy3Tu\niZGDpJ6bg2yXhqAICcw79vn8c9I30crz7tkiHfBCo3TD3ShRJMDVZRukoy1E\nhuGIxdAFw83WAG6OUOUWhc7grX6nykUhJFRCGT+7v/SAFCrrYnPYZggedeyj\nt3BvGJSCP8E1FSGv/KTFmMD5cM414qZqZUX6aCTQSn2eWaUV2MRw0giDKMw9\nKXLUy4u0tOqo4T6AhfTVf1ETx/d0K1wlA/SW5n5nEQxVwr1cxqwNTYpi2DAb\ngnZETahWBXKSQ0AXEZBPVc12YiH0AcpSrO14zb01Z+FjX8OvjVvQSlo4uV6p\nnfO5D+XFCiE6QDReVd7W3WiwSnT6LO72HHR5NJzz4q87fvg2q1Xqvv3q2/oq\nr1Csmuc05mmEbqRiAG+Z+PZO/eyvFtnKzahvoD69kzmxikM8/QdrBww6a43K\nWZdOmeX5MIn9N8ztpeD7xSX+/GKy4VnDHRYRo5fx8pGvxL4i0eTLEa9WmOz5\nRXAdNVWEtubE7I7kWzT/RLXr4FyjfWk5JBShyHX1I9a6LHDGXXwajK+AqpvM\nc7jzoC5SAIxmDssXlq04S8wx+6Y3xaiZ6ASDLPq2kQgWPiyUMYftYuaMeOA4\na0Xm\r\n=5SNY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCng8+kZ3jJdzavZ2yVOnwb+umkHByEm/W8835WLLMlYAIgGohh1TRh3dt6vws3YQBzQjfgA+MeAWLxTv3z+VOl54g="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-af9c6c3.0_1567703496915_0.8227118265438758"},"_hasShrinkwrap":false},"0.5.12-66cdd8e.0":{"name":"graphql-toolkit","version":"0.5.12-66cdd8e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"66cdd8edf38e51c11ef1ec4ca12779cc287ba738","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-66cdd8e.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-DPjV7VrABH85Z/mimJ46w4M94pRPOpA6LqvHo86RAc4KF2EJqU5cnJ7HAdB58zBuBbj4khdU7frdtH5vbZbffQ==","shasum":"34ae96bc4fa1d18f8a9fb11519238bb799cbc6ba","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-66cdd8e.0.tgz","fileCount":258,"unpackedSize":404014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcW9BCRA9TVsSAnZWagAAjxUQAJzWvQXquMKHTl5sW7/a\n/SjZbQZLyztzxmbDShrezlNjx4gfWH+ZVNTyJF43XgodjjJdKOkSt3wisZdU\nL6db9ARruJbdYyEb1yRjYoDsUIxmvfp0ZB2xBsWZhbF3RCS9YdNbtOcCsZIu\noycSKh352p4X9fvBVvobW5vh12X54ELjZxUAXmY/hbHYlWakfCn3cmIWMoKf\nXAcbPX2j6HzMaYaP99hKBWWlk8HQ5vGQ3KHKd+S4RZ6VomcmQbwN+XyxiBdO\n2t47YYnmfn8RvV6TvSkTwZUIL0KAsFgxv89dLYluUI83brumMG61IPhA6UCE\ngUpf+rEhnnQ709I0UQ6Hxvl5XWS2u8Q2n2qZ7mbCXmOw9A2ZHtDNB8D+HCjo\nQ95oeAczdDh60RqMAT0HDM6VB6BIEpyYwqqq2l7IMMftgHggGHX0WanuPUIC\nIdTCKteljodlQYYQjOfjLPdbEDaaVAFZcHbMp8XJ+37qxgqGNc6PxJRN6QWi\nispPonQ0Xu9okm7WHGnPohT3noNKk0aiRs8YyVkmnb71Ens38bqq6JcqXTts\n0Vug6Clgpj/Ita6oa5U9/l82FgcpxT1xnveijncp/haQKe6n343QC4SoyMWc\nC+66zyqrVpugzB0NOeiWDoSs1hk6eME9YADEgWVxc6+IXBs03QOKC3GR9uWq\nGmEj\r\n=dnd7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBu6h8QBak2vj0h7wFz1/jRdp13WB5ARwz2jYohtyoHAIgIGvgd1jbjiLPdDEeVSaDktSDycurlJ0qFCV55uWgQqI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-66cdd8e.0_1567715136358_0.43205093069054956"},"_hasShrinkwrap":false},"0.5.12-6d3179e.0":{"name":"graphql-toolkit","version":"0.5.12-6d3179e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"6d3179edebb17266c55f46944578cb69c42eb51d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-6d3179e.0","_nodeVersion":"12.9.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-72r0eezJjYk3uZOvDgnmlupgVkIvmfm4UyMf6mbE1zi8PjjpY3Cni+0TcJMAf4YYIxdxeuMkgVuDGPSMVI0rQw==","shasum":"4ba84191aad1b2fbd42d750d727db2eedc23c173","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-6d3179e.0.tgz","fileCount":258,"unpackedSize":404008,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdciCTCRA9TVsSAnZWagAAi/wP/iRMpHey0drUPqGPdJ9Q\ndWr9HzbBQFBA2iwJ+vVdojzGRlLq7oPBsHNF8P/L/kmrX/fVHe6KQ6rr3Jwj\nYH0dR9+0WYEYZlj4e3wdh5yyqBeimMsAGmW4mpi9yXkDoqFoZ0fZCaT0/gNO\nG/LSTSJzoia4HOHudMnlYFDrehq3REuLcyVfhvXIQI6qQbv5wt+CgXP2nijZ\nZnGRSARIqCwPUNi5JbH14ZFoUhSdqZihte+Of/YudODu24C86jVUw7KLW9BG\n/5qB4CtNp7VngsInD0um+NoNK9D3B0xQ7CKCrW3aic3VV/bsgANPJ8ooVp6P\nvbwFo4N2Spl+s0TT+JTg8tZjBhkaytZtup8sFjgJvOncQQz0c/qEBC9h3xas\nqT2JSRc8xOQNVZgKkBJpLabUfey+sQFAl6319VwGmm8XkHjxdR4PkPMNKxT4\nqSDVpJVkevC+Pum9uEPM1VTaAWqidSdyrlVLx3R8RIMvtQy2+q3LACJsfD8g\nrumiVei4CSx+9M9K1sYirNPfXtJy1/jMjOoM2maFRWFHqM3KFgmNeEya1+08\nPCLeCR5NcAlEL5v8/7SrdeCZsJkAJLjCeI7K2u6x/xZ+5AKcet8k2QxBhf5d\noc5jn5+rMPDkahhcZ3UNF0N/q/kE35OrP6pNbA8oJs23mjlgx/JRuioJcXnM\nJha9\r\n=XJV7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNleHoLJsTIhhUJNapHWdDmAIIFpV84ySEygBgOiXI+AIgdaVlwaERPIwiK79rSLfs2068V4GmGT1lmeEAr+vWNEo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-6d3179e.0_1567760530596_0.8392087335861551"},"_hasShrinkwrap":false},"0.5.12-a2ed5b4.0":{"name":"graphql-toolkit","version":"0.5.12-a2ed5b4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"a2ed5b4b47ecef638f2f3f94606e68cf27feb61a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-a2ed5b4.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-51Cc0cDI6/rwwEs2/99hu4W5QVli1+J54GZ9lp0qRnpn6JPXTOF3X50xwkoJcalrdfXtqBfMne8tGkyPS9OIDw==","shasum":"6e4d1a47bad4269c757212fff834380dd3fb7a3f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-a2ed5b4.0.tgz","fileCount":258,"unpackedSize":404025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcv6gCRA9TVsSAnZWagAAZVAP/1el36OyrpXBo/FvlAUm\nBE4MKiG1BhypvO2dgI5y4a720GmKf+ML28BiOOQbjx0nDg9MI2bklXSp2iJB\nCzatCZ7stpL3tTTModYMHMSUcNmWlvZIskqB8b5HB4tSI2H1s3Q1q+7mDHCz\nZ8/+usmpRTtud4ockktfQO+PcouHeBKsIRMtI8k8HZBjLnQSC7ygTp5nwF8G\nf166JzppUmRZgvzV8ZxZ01fScada2BWBJahwOeNIRyOydq1E+aw70fQLlYWl\nhr66UYmufJ6UqNevQwW8AfHDDIBaNdEfaXmDh+8MPSuEi8jetn3kuX1OlN1V\nRYCCK367xDPzZZFJqSwZJsq5zwUVJYRvkgHzAVZtF5cT/NB6Ios3zF3mZd6L\nPdeBC6oqpj41Y8GYl36D2k/FoP2VmhJ/mHoJr251lohEK0m2PHLHFQWNFXqH\nLBAT8MOrzsAzUi2XaFotKa9uPdR63mKBSXWdErXLzEQw0/e5LPdRsc1rm2fc\nU3o0r3OXI9MIxmVQ90W/hkI/9piXK0DGURM1BmuJuNZsj3hi9H9GQpZ6YvPx\nthfIsYrgN1Wp+wiso/bqYoVF8nZxI/zD/4PkytLTHLsqlRjU/CFTNTmac7kG\n2ayUrDdfFinXBqaaFqhsiA3NYaHXSqyXghTIZy9FXPN6TBxC8HJhvp3/+Jev\n9QMf\r\n=glTw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtOR0RjhFCiD4keW0sORTQ8qpeR0l7hmOyuiYW+AagsAiEAlZ0hL8Ebphz2OKmOZBlCQGThPGM44A0LZwNLEf0AUeQ="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-a2ed5b4.0_1567817375584_0.7083553757560599"},"_hasShrinkwrap":false},"0.5.12-ad2459e.0":{"name":"graphql-toolkit","version":"0.5.12-ad2459e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.2","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"ad2459e4cae1a42ada69e93e2ab4bd594d4c5074","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-ad2459e.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-ilv4e6uP1LvDlAEEw3byCKm6jRYMYH0PtTZe8jnZAng6ZGUw44JBmWEmaybMMchwPitF+0PZxookoM5vhKFGTA==","shasum":"d14fa1990a45c64e4a8df8651ef104bc37740305","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-ad2459e.0.tgz","fileCount":258,"unpackedSize":403962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcwCWCRA9TVsSAnZWagAA5Y0P/Az7QU2kqKFRERvW3IYu\n6mJ5uFHn2fL1Snf/+W24W8swJOCp9fXXamSYR0MOL0n4LoXGKCNlyRUQs8eK\nZ8XjTMDNhqwJG5PC27L3tGIGD2qoEKLNUd9ZfcVHnZniwHZvphfwgGt2cnTv\nT1vMR/wxyf24xVlJOI04RNIUllbr8+bKdkyvDL5KOjbPUhatZ/vsaPdsJF/r\nXjTuYh6XZwtDheY20WjUc9c2sTlbISLd7Q1oJjKwVoQR/N6su3ISLngDcSqH\nqM2f4nEgVEOyAiZNRQJGhBd/jnOlI4DjQWPk6H/e54Vz2e2NuJ88npxmAZdV\n8CKiOSMWfse3MG46CtRHcuN8sT/ekkdgl2DwFv8zV6uzRh04tdNrl002QrD2\n7R0OQUUXaTo7dGh6ZTk0EP0+SCJ/CVYfPcsecg3SVf//TVRgjPqO/+692bw0\n9oQMazeHOxmKrR3So/CV66p5vGGNttHUDXDp8CTCFtyBgnfjDgmOysWALVOe\nHTuzeyc+5gYAD4fJ0d7qtee+tbaYkZvWaLQOoFR5f8uobKpcnOXk6K8m4hik\nUtRVa97YueYV99HMser6QS5pba5Uq3x9aivO17LiQSlJ7maPVcNIP3ejr49n\nmOO95QT5rs91ivk4Tx+Dp09wIsxxLMmDz1meSmb+Q+JrB0wXwvGXWfW58vI8\noZXb\r\n=jvAv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEMJLaimfK7ZN0u0ElFipD0LdICoUqilMox7g1dMWbPQIgej0HJviEgMHA6/tEhTM5NPRl8sTkCMM2r2Ks+FqdwzE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-ad2459e.0_1567817877377_0.26573332634260693"},"_hasShrinkwrap":false},"0.5.12-0b8643c.0":{"name":"graphql-toolkit","version":"0.5.12-0b8643c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"0b8643c87f76f5d7d978ec3dd56590afa763b67e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-0b8643c.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-47QAavjRa6VWfd5gG5daaAd7sr+ZWwtq9sYRmhv1j9dIcIayb0U46TnY52qxHIV5mVB3pn1AQwSAKBUAaJYYdQ==","shasum":"2f1bed00cd1566cfeccc3d73c5934cc6f77966b9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-0b8643c.0.tgz","fileCount":258,"unpackedSize":404007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddZ6FCRA9TVsSAnZWagAAZUMP/jSLc0ti3WNiGf0v6Owl\nKrp6Etw+M7VSeKHOI+4yP/esTjY6U80kiqsYAUdRGn65wkT/5mHL/GQSrv39\njQ6K4FtICg5lkEosXw0grMd8fl/V0POtOCqqS9xPasYY1s9Ig31xH0/nIzoX\nBNgTeJyL6oWC1X4otrfq8nJgmNfl6XlfK0OqKRphTVmR77SBf2HR6o+Vscfd\nY2k34SjDDUFbFZVQ/chjiFf9HOlJi9F+LGRMN5ijjKFLcRuG9ELOO3oaVzB1\nwLnUfUPHD3Jn4DQ9zehkKbWMGGzvuOJsYvfF+sMDQ1CtbBD8yYbKEEBX8zdb\nQ3Im9fwLb5Y7aizstD1XAVEKaGiPacqqGqC412ColPwQ2jSRJYUCddwNfX03\n9UvtfGNirZp4kj+jkTlUrRJARFWioxXfHJGDW+A3T1wT2H8wkty1KpLkwVVK\ne3leyCj1Z1Ue2av54MwQpNXwCIwDLYlPoH/3MzWsrqFYvhy+k4Pk3fw6t2LH\nKQoUil4KUXu8SMXqRVhghmRtpT3EgipFAyLI2pQnqCXQmbvF8m2nkKmWYk9z\nOLfU68GFh+MRZhEEWj4j9vDfoHxrA3RhJ3BFKgupAPemhwNkGA8QIEn7kxif\nEy6JLoxouNzAoq5W5lj2+1ADPNxS36CR3zfMPTOVp7jfuoT21if2kKc/S2tq\nRC+m\r\n=p/iZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmRIY7R9OhYsUX5hrHpyUG0c3LA4x9DIuuhjsCRJkXHwIgI4XfiS1UighgUqMiqFzrZqqIAvZlYZdqZbV7SLRtOps="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-0b8643c.0_1567989380601_0.19113138177240652"},"_hasShrinkwrap":false},"0.5.12-51fc38a.0":{"name":"graphql-toolkit","version":"0.5.12-51fc38a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"51fc38aed846e8b3c741a7ad985528700c0bc99e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-51fc38a.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-cvL+iSiaHropoIC8G/gP8/GKxmI3XDFEiY3Xd1+wRHSovGEfXKr3UxsUHrSkzZmWDcwAJN1YpF52sKGmODq4eA==","shasum":"e699c5107558a535176efe63e2cbafb57c04e108","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-51fc38a.0.tgz","fileCount":258,"unpackedSize":404016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddfR+CRA9TVsSAnZWagAATzcP/01GB0TSNNTQqyhUyqPF\nmEfgw5zA7AuuXFfCeqfDC9vlXMUbX+3oGtCG6otRc+cuE9JKl/kmNkAwfNgL\np3sjOsJOUKUVwY+h+bz4qyq6VyxY9FR/sH+NbO+GPHjMnxMuoS8ZjFLFx+DJ\nFTdohEWj3HGUZimpBhqevZ9wYz3oKS+1G2B/rU7UUqS/CYzML8+a7sMkuu17\nVGOcwvtH/tCoHC0iwQde/I4rLEhvki4pzou4/tc3FfYsPxE31YdkjY43X8Pa\n/VBvLXm4H/9YFTKJeoNytF4ietlI7Ej3PXUtTiFYve/63h+D5NSTbL4aJmh5\nHqdmgRZvgWBQHC81mjmZaEyFE5xby7lWpEYC90Ug0vuozsuq+k65qOVJ0372\nKli+SlEu6pflbM/TU7WM3xpyRqgggwp6MtAvAAtKnZ4b1WCHva/+JhDl0EbU\nGoQY8V9ZrizMFMNLzcE7dGrSt8ZISKa0DbmyskMDR6ov1fmIGFyrn8bXTOxU\ngDTOw4d9ql2ECqaJdhaz4V56zQMPdJ36qYSVRi83kGHBB8h35po0A2K8t+2x\ncNMsE8ywMMo+pTI9EunWR8X5WWq7kpQsdl71kVxnI7tDUTIuGF7oErsnb9O6\nM5NXtI/AGnO71Lo3jLMuDGEPpMOsPv1u5B2PiNLOInkx0+Hh615n/vTBrm2B\n4ALI\r\n=L9fn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzP21qsAA6qJGz1ZGs3MAauz9atLuPsklQpahKJnQh0AIgYHkn7SnT7+tIQ1D4QIof9UM6AD0xRSMrimsDUAMXM9U="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-51fc38a.0_1568011390140_0.3904413108657554"},"_hasShrinkwrap":false},"0.5.12-e1f07f6.0":{"name":"graphql-toolkit","version":"0.5.12-e1f07f6.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"e1f07f662c504276ca1f2d7612eef241c144f48d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-e1f07f6.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-u7RaFKH3A0JVfB22T1KlZl5I9BvgBdNivYn9PU3roRBXBtbYWD8C9jl5D2hizfCITlyragQT51eP5vzAM9VcAg==","shasum":"72260861fba80e9fd89a778309e2f72f63538863","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-e1f07f6.0.tgz","fileCount":258,"unpackedSize":404005,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddfSRCRA9TVsSAnZWagAAK/YP/RQJHvePEftk1cwXiHic\nojmZhJ3zE0ZEzLe1ftvjb8kCzWax0J5pJsREJm9182s8mqhiP/RaV8XnaHDp\n+ScgrT2+Mo+akLEJM5vSRglA7+R0RW8KLl7DOqwEFpiARwIcFKc1szXhdXe8\nFpTbcxeokUTER1YgsC9p1kSFlOZRBSAdY3nTtZmod0XC16ipbBDZA/skW78i\nowr38uRWbaK6uSdizC3LChatz2h9F84AlQgQW8t7dU5rP/jR1Ssz72U98uG/\n41l/HAvRGAVp9vWCPcLnOZVQ9fdA+8X6EFAsMux8Fw4ufk3uNZTznbI18voX\n0GdQtPqDJpdtGuWZLJCfGadzoSJKL+kRRUrRzNVnJW6XpegSa3PY+mPGnOzF\n9zTZTjrz6Gx46y5y3ukP+cdDa1RvMMCnWpxqEgucmH+ZL4JU6sSB134+rwvD\nmtYYaD0PMijg3LYp/4gX7Y7e1QoJ3HSJHnWqOD131B2qttVLvJp4F+ZKYW9t\n7QYUC8edZLGLAJQPlW0E8n5HaT/9k8PeS4WvhnNilh08spiA0kaUVLez0lMS\njX4jfUsKru/Ng0Wo+kdws+eMiUK3q++fU3j3/pxs8wXS2Oe5AdRzn6h0ykD+\nGRVJLv6AONYGbVa3lSkinVmAUBBqWvupq1loTq+B0BaF4Hd6CHabk5fYUqXs\nB0lR\r\n=5OJJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB2WVqiN9E/No2cILhKLr8U3eZHuB9rufW6LnrT8CWufAiBd1AjC+qUdRMie+GY5eleUkWuu6wAOeNZD3pXrVhBFsg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-e1f07f6.0_1568011408625_0.6469658773833942"},"_hasShrinkwrap":false},"0.5.12-7346ac5.0":{"name":"graphql-toolkit","version":"0.5.12-7346ac5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"7346ac56d10078b91a1ed8a32836f9c5f6b29943","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-7346ac5.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-/TZYPTMMJ37lSNejJc5iYQ7kQwcj3AHlOCc2NCoYQN81NbLLi8CPNnR6B7DsmZsojeChWhwRTxTCdFweBLrbbQ==","shasum":"9216553a26196c0823f13208b941657c5ea8a95f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-7346ac5.0.tgz","fileCount":258,"unpackedSize":403861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddfUwCRA9TVsSAnZWagAAbYoP/0Uknr3VqXliLHfTBB7K\nrj5J2zIrSb1PqAMnzNGzXU20XMoCyP55CLI+MCioc/+V5BVmlwvtZiGrj3XT\nXI86Vh6gfg17ijxnr7gDX54WxLnQ3ldSnRDpNFppknF4BTB/z84QBqSkm5EX\n9nkhgqQlA3b51wqhVAtNgStUUFXLRnXnkw0JPE9lDwQf+yYPpjI1nZPbPzZZ\nvjXPF+cBhuXm/dJX3F3uQgv6Uw7Ynl0owgzjFxjso9f4tYHv5TeLrSMQqGyD\nyu2+RVz8OPgbGFwVwK2h+JH8WjVxpD72R4eAbXvGtrI4baFiPPTkZL/F6Ldg\nmnM0qprpFGTaSiFn0aG1RyDxPhkI4vGmP0J61dg5DE3Bdea3vUE3e4tLDLAr\n3qFH33sAR+GQxrmSJeg/ai1c33bR5ZjK65jLMbrSHTGb/x6A73OanqrnJd0x\nt0uEbE5FdmMlTtSIPjS7vgRKqeVuVqHrva8xlCTZkB2/PNXba8fIY4R5a8rD\n2+AcbVA6DMGbx4uVHZlpvQ2zLDsinRsYYJQVVx64nYMvkev+UJfSAt1VInEl\nUBlOPj7HKVx/1Z1pAQPtrS4h5L4J7dwAXHP1JPD8Hx6xaDD5z6qeVcJfbPxQ\n1JWAqhEob/j2WaegYexQ3NdHPenRb/GM1W0rcBmaeDxnveifiEpuFz7odJL8\n8vx3\r\n=ImU3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFhGP8HvaF1DEpJ5InnR1xKKu5erHLQszOQHV99w0TIwIgXUpZgDbpH3Mq/dGrS3oxC7bVQmqylyz5RYW32BFQzD4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-7346ac5.0_1568011567568_0.6541979499794708"},"_hasShrinkwrap":false},"0.5.12-5f8c007.0":{"name":"graphql-toolkit","version":"0.5.12-5f8c007.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","prebuild":"yarn clean","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"5f8c007a581f70830fe58926ca460992e903cc2b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-5f8c007.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-VgNpSPMfsXt3Hae4QTzyZmm2qpCfQXQ01q/n9RI7eLTqAatd9KWL8ampV0MEUKCnHc4yPJ81eQDt9Piq4OpWOA==","shasum":"67925494b590e502c1005b98d465524e49f30f15","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-5f8c007.0.tgz","fileCount":258,"unpackedSize":403868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddgSWCRA9TVsSAnZWagAAwY4P/AmHGmzCZ9wlNNRG3xzm\nGB/sSkZDCguDjSwpvODmPkEE9WeWwfZHObUXm61sbRMCzHPLj6aZoe1hCpMU\nDLEnyJ1OCRDZZFPRYHQP4w9oPMTes4ArcJ+TwWQ7L15xPLXvSYCW9kznVgSF\nyl0Btpc8ih023FU2TC1VnBTrn7ZImCWBeNxRxRtcjcUYQWRMhQXtPVZ7RTJt\ndPU4fyjQ89wsPnELNIhWC2lagPnVMH51VvzC2gaYlSEijwqLXkses4s9DWwv\ngBjG+3vfQzo19LrcHCJ2fwIHhvf/H7GGhcYJ6wQzkaDb0W+cBIh3QClajpZZ\n8WV3IrqjVBu2pFevNJx3I+46B6fst+9rFu0VRPBuokY92eLm6DaekmC7ILXM\n1VTZeqkfor3nZigV3K4wnvqFKOEhoUQ6Y1tkgUs6skCj+2z4NOybbWBH8PSa\nsIo/dFrHgJzKwr4pVXYKs2k5DQOZdiaTowyzb9xIbRW+zspwyFU0VIPYQqLG\n/chuO+nkh7sYfRj1V9Cm8z8sJTjbLjQD9iwpVQHRV999stm/tYWYKpEi2KGL\nIM02T0IBbWTmEhaFCXrTBKAqGa+7bl2Bt6V2j9ojo8tXGcfMeC+XXYKJ1A2t\nCsHhdSlF5bTH5qCbJVUN1h/xxrLfAJ63Rq4lYfU5tDzjCmQV+efv5Ij1vda5\n+2XE\r\n=0/PR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8CKMtPriLzG6O7UgbU/hkDxSeaoH0OkVaBe23EcQivAiAKy+bBqxxHvylEBenJtfdoOxQlde5gM6LOaJQ/h0UhXA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-5f8c007.0_1568015509692_0.1865322029796097"},"_hasShrinkwrap":false},"0.5.12-1fb46d0.0":{"name":"graphql-toolkit","version":"0.5.12-1fb46d0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.2"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"1fb46d0ae17d5ef53be78666edea907b63d8e90d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-1fb46d0.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-cbQwDUUhH2adywsymqiHWGEBSeR/WSY9Kt+iuKjKXl2Uoq5bAA/juy2300aadb4D0OKbRytgTTAi5L23anv/+g==","shasum":"b6c393154af5a02ae5b4845bf293d9ea09889f7c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-1fb46d0.0.tgz","fileCount":258,"unpackedSize":403833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddg/mCRA9TVsSAnZWagAAFLYP/0JNisW9uMK7njxaKrY7\nunI4E947TUcL766YeHYYfF81EeXs3CJvhB8NrQZSqGsKXwlY4UcJ3CNFqbdc\n7YKpN1BE5Wo4frh8DK44mCRbPAG35fMkEGmHxQF/biPQfaLXLP0QXX4xcA23\nPk4J6A4QHU0RveERNmNDXmmDE7FsEnBg8tVwlA3RhO/dOmw6PrPj1CFem2xj\ntvaSr8AE2JEo7O7rLdMd+tjB+6WIE0h86buOgoVOnI5K1yiBpexa6qCHE4uL\nvboQ3XgK/Lrn8jNjpHp4WhHkQL1ligB0TeZe8yEU6qYiaZ9XZKGxCYYrvxYT\nP9l7CGTgtOJZ/bSiTAuZAenVq7XKzFynaZ8jsZMRYkaXIvukp9ixPTYgYgpS\nE93qy4bYnEKKuedhB5kzQi4fh9mV0ytUDfL9WNWXoXWf8Od3l84iTyKiU1nc\nJA615qMBAzBRLLvYb9o09R9CSUiZ7E5MM7FC+Wp12qBz21E6zwuCwbIfGv9x\nFP43aJYXvGbxsM+cTC2zuPCr0BZFIRe6b1Et4HjpVI31PwmAQ93rclmxhrPv\n01/hjNKNvmmaX1Gtn1mNac1QCHmc0zzv9G51WQ4ofCmVP+OmVi0NdUu+K/hE\n5vICv+haCZN8XUv8LFE+VUoZg2Uka1kafdCyylH0bhGasQsc7Ck8fKlNoRlm\n5MF5\r\n=7g4X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICz6sK1TCV3DTP6Apxd++62W24oJPb4xpNHyAFyKsa0xAiEA7XCtppDnR/pDOw41KGYBc7NL9O3hjLhfcomeFz8VIts="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-1fb46d0.0_1568018405293_0.18582343462375084"},"_hasShrinkwrap":false},"0.5.12-6f4ffcb.0":{"name":"graphql-toolkit","version":"0.5.12-6f4ffcb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"6f4ffcbe5d124780b518bde426d7d09a9f2d1904","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-6f4ffcb.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-3FMySvUQF4WuubSzeu4YW+bKlxcEND4pnN0c2p9QUjkjcTGrjt5OhYMFcFcXmaTpzFz6IL7clH04b+QnVdQr/g==","shasum":"8b1af4bdf6fe6bb67880df73f737f7af310722c0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-6f4ffcb.0.tgz","fileCount":258,"unpackedSize":403827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeA7+CRA9TVsSAnZWagAA9OkQAIrqQ2N+n2EiS2DdBPga\nXadZrlXURpcazlXkTq7iFrnKIfRnr5vLu9mjIUtfalM7ZJrrjivqSh3f3O2F\nKoqDIbbV64FMTHjyasWfBLiB4R25FbGKWax28MlkD5PkVDv7EXsPA0jmLiTs\ntubJiYby2XeQ666A6HVFkLu0LUQP3tyFnierGMcHcSbejsFU6MwMrYmkMnEX\n1TRhi8XD77ma9mLbSckGmgG6FSb7giZH3kiXoHYMjnVAidJ8VEl2Q6C/mN7R\nq2PTwWEQpHqreOaopJCT1KlvglyN72KlFvY3JrxTsaqaZNKGN2Rqh1N06DdR\ng0szR0bwFYdZNSAVjgDM2dhNj4+zUxGgUz2/o0HBkHIPgkwZhLdDxCooGkG9\nAsmT9Pd7FTrj9GX9s7l5gtdLdBV7vzwvrXEHS6Bre9P3ywrIxBUvhJOOXx0H\n5wHGz7U1ygOKEiJ7cHf2W/VtbkNAlvWKZATpmbpekmDjIdozMGyA/Y6Aa55W\n3LEB81par7mjUgRhJai1b7lan80ub7dCFVovY31sH79dVv3R0sRkzve1BBRx\nc4WQERumZWkWWkFpHY2XDYx5bXTNQCAq7AgfpX1rBKPbWdxRGpE6vowgRCJz\nZrBIZBxO6z0UQFeM4qnoGc35/H38qVNYaQ+mXGD+mTlOyaCWB9xHCCHuQK5j\ntFS9\r\n=I9Bo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9vVZ7Chsv7V8PnKE6zU72TnMnjVybyJJ+3pokNbt80QIgOu4AOFsTgby6OiipnErQghAd4jHxtbqZYAgl9PjlTN0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-6f4ffcb.0_1568149245434_0.8368834303128447"},"_hasShrinkwrap":false},"0.5.12-a4da46a.0":{"name":"graphql-toolkit","version":"0.5.12-a4da46a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.17","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"a4da46a7b9192fd1c020da54734ca3d69199b25d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-a4da46a.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-dxAFRmghNvt7c7jWxONZXHkqTaLjU/0cjwkUUJLDj1MzZLlWDMSTpPpBwjtumqWsJjfnx5ZwZoDccTAJhTabWg==","shasum":"9600522b01a603c65d1de808ef0c551c55e6daa5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-a4da46a.0.tgz","fileCount":258,"unpackedSize":403850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeGpbCRA9TVsSAnZWagAAHW8P/R1hvgWsc+rl9VBUB99U\nFs11t4pFENBeJrBugIQ0J+0FHbUZcw+VsnoOcX0uyl58D7HAvDKBqca23KiO\nChKKL7/t7RY9RFLFuL8WrKUmoKTq36anDh1GMtAsMIExtj0qIPt74voEqMNY\nPSb79xNjxq9xI+ucim7lvrRPILzYAWLQG8iaamfMDlIoH+aqBDbDSmW2zw92\niBgssBzF3pKdLhpO1Nqk/qP2Ud64WbGHo5S+cfz7JYwPgfgDFOLv8eumxWmo\nPQvh2Z7iVRywEGbU9u0oF2Rr+nxM1loKeAbaNE+SkngApMowwg7tVMIqlKwk\n1KVjmnmKL3+RUAbkELBk3eD4G1X5KH6/tZXfnyUPJualEvzYHEBL07mXJO3i\nmNHN1KUs7XWRnlqPeNwdhaf0YNpbiQ/aqUUUpIr+IxHHIwTJNz6BSGMFtEDu\nNISg4zveQ5BfbhRj+ne4/4xKyQdofFAUsSKhtTNcPgmjJzIgGDtlpte8/se1\nuXAhbgzm/+PsGm4SKX/HARbJ7Njoye6KEn0Jyms/C2G4xmXsH+/PIkw4pI6Y\nDWKstjRC8rklahqsLYq0Mt553NFRC4cbixGyc3PiVI/12nyNJhBD2HZzqqLn\nvV0zuyc0p653n57b2yaX5RYxwPb5lrAivpq79JNyPoOBmN2K9JswVuREBBYv\ns3LJ\r\n=Q25J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCU4yMgbKf0biBzDZabzw9I0GFJqMdRUPy3ukt4/gfFGQIhAKdrCKBNEhpKTheXHktkhMxTRg8fV2vxaD/RQYa2ub/C"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-a4da46a.0_1568172634611_0.16490660045381644"},"_hasShrinkwrap":false},"0.5.12-4484c00.0":{"name":"graphql-toolkit","version":"0.5.12-4484c00.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"4484c004c044700545440d96f62fc62095eb331d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-4484c00.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-i1x+6xhFelSH2SoxI94N+k7HpPrjff+7QxPhmNfQdOAMY9q/gTgtMsRUQp3N6KpO1EF+WvL0GrALqAJzh0ubuQ==","shasum":"c5932a99b2f5165d6fee7d542b163ff8f5bbb040","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-4484c00.0.tgz","fileCount":258,"unpackedSize":403838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeItPCRA9TVsSAnZWagAAH9IP/3DlEB5kuERoTzyqOWMz\n3ZnBbSOV7KJxUFHBU2zuyKtSoMC5PwlRw9CKTkE8LrOsdF9RKqyxsXbXNBnE\nD4BYahGuyDGgnFxGwYtVXce5jPo7Cvd3tPCJq0p9i0VyJsbH1OzKU1C9fRyU\nRoozfLbF3xZa5t8kzlnnqW0h1dd1XFntkhanKOSKmHQPG81QkuWMzhPWaJHZ\n3YWF5q8UdfXk09uvfe3Mxjg3iVsgRRaQAJASeQdhWqkYPnYxOluOjAb+cBlV\nu3lhAko6K/nHe8+iHe/mpIiyR4I3NxjlMfRUcNvMubZjUH1BKbpDAKR5B2Tg\nbu7X4lbGWRomlh3TYE/Lbho/j8jjlQj7sL4NXobCA4x0VKlFY2JhX/bX/PCo\nX1iyoZGvVd1sybixpODVR2AMcnhjzK427jb1OtfFlhFUHXQaqkb9mrs9ecf6\nFtpH/7BvD4lnsX3AzY2L1fir/4tq9unoNKOkXzJvN30yVyQJ2ZA+oorTSAWV\nicUQJQTtW5vS2v6VBSir+eZn9DXReTNQI76FBXqTnL32T2MB9HmHnptmpy9u\nZUyNgK7M+zsmJm3pMVIZqZh90tvPaxMnh9y2fOOHLvn6RatNMnxDEMNl/b0V\nKcH9axE9j1pju4UnV4xcSVnd1QTj5/NhUjuxv1eOw4oPE7HCwuGAHnN+Nie2\nwqX3\r\n=ImqU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjgLoe4qIAxxTNT6VAcVg6vgdDazgVDczJ9kvjYeGzYAIgZAFFo4s1CDwiyirxmTs6DPTsuyYFm485dII6Erj6A3U="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-4484c00.0_1568181070308_0.5814665811742741"},"_hasShrinkwrap":false},"0.5.12-af2daeb.0":{"name":"graphql-toolkit","version":"0.5.12-af2daeb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"af2daeb92904cf53c83d7a45146dccedde61ab22","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.12-af2daeb.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-segj1ng7a8v+KB76mcLhgCZTlvDbHSU0+prEjIr8MTuT4bBzRer7m6qosHYgaAU6XfDkuXe4i1IXSwPY+cvTxw==","shasum":"5146db4cff920235e4cd483fd210414a13331de9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.12-af2daeb.0.tgz","fileCount":258,"unpackedSize":403839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeVtjCRA9TVsSAnZWagAAvdEP/3VEHAsjoo49P06ub8aW\n9B2EINtV8rRXfeZULymd7hKb+DdXB7MCfshNoApWOSwiNnlcnRmAg3P0iTuz\n/KkyylXWGGmiXHaDwvahc7+WiwhyyLhn/04dEhIm2iESZTRMhfSOIfXLBCy1\nAEjXvdW6AFVFideNPLVNj1L4lG+boxeNQhgFIGEWM7ECFEIiHMHHHDyI6HMB\n0Ti3hxuUSETns73RB4tRnwOuPO/brCMsZ7/7ZlciCT/tmqK49j2zLWk4aSI4\nTW6GdPQR6+8VSGaZ8dZDJVswfGlBzpjkl7z5NlLZ5rZyzob0CUPgddKIXfS/\nlOPHMxd30kZ767dyggnwywBqrPmaZ41dGXRAD2u+Vl7BF7RUg1TDHxz6MSMm\nIfuTQweM6XAFwAqS1NToJ660HroZ3rQE3HRlaDjSDKbb+NYjJMuL8rMJTnuZ\nUPUWmXxICZcmQOxdsekSlqunFDkiY6Yox0AMAkhwqK3KD9ckBzgM38Z2XehW\nCrpk1hPHKo3vt8dPc+FMQYpjL1RnYHBwJG4/L4YJQNheqBkhCbF68ojPMfVd\n1puqOrWIAUn7iSMQf6ei1N5QIvIL7KMi799SItXf1p1XugiM7FzYI7eK/dVU\n/BiJ0QSot+Yw9cVt1WLWrVNZWCt1rHgl2ZXodEHN5HCStiimlRWWouHw5Tgp\njkdk\r\n=J68f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+ruLXDpluoeiq+k4/uE4MBe5akewvfLWWWjfVzaQI+wIhALUcY3RbHCFgtTMfvKqcUnyBf2qZLGd3smPxS3AAHzRE"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.12-af2daeb.0_1568234338935_0.23900365215378816"},"_hasShrinkwrap":false},"0.5.13":{"name":"graphql-toolkit","version":"0.5.13","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"af2daeb92904cf53c83d7a45146dccedde61ab22","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.13","_nodeVersion":"10.16.0","_npmVersion":"6.11.2","dist":{"integrity":"sha512-5L5KEnuvJH1bc49w3lbcGm9YC8M7y0A0gQuNYrXlVWCrefCXMI9DWhx7c7MwyyHEF4Rp9wKP5uiWSyLghKsumg==","shasum":"5c3a5cc5f9bdf18ac1c8ea209a3d51efbe2b9623","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.13.tgz","fileCount":274,"unpackedSize":411353,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeb7CCRA9TVsSAnZWagAAAGwP/RX9vGUHKcNZ5/m5LlCr\nMKyCNdLts4X+U6b0lYv6cqsvrRmpmwjJ3zr5665wa8VO/EIDoAySiMG1Tqc0\ncUb3HiuH2JVD+BiAIBz1s0Al/AKdLpUIuHFbm2pCKVt0tVs5j2ItU+dDTAzO\naMe0IeGU7m7RBFaFv8jNrCjXsjtO/zo4KenEeQNaFd5qgaPiRRpzvvqX77PJ\nqaxjm52Boe85lKdMuqfk/uPp6WkrnvKhduXqH1hbD3N6ApTt7e8D5qDD0cNy\ngUrsIKPoYBCxC9cjpcEG9/7d5ESYFYAxUUamOtjma0HhVoAiRVPH8RKjabi8\nX3vQTxkZY//GgbHwymxT2ERbfKojCDdMClG8NlfFTmnsLY7AcFMqSqvznedG\nEEbKsPpswPcCn2KrYwYOW8YaBU168Qit94Rd3J0e1HG90V0ovrrzHSsbAt01\nkP3ZTy2REFAp0ViN2SLfOh+qsMB9RPDfw4zrQfeicU9sQYNdaN6E/673K9aU\nzlr2FaCBqGjOkFCTGfnxFrCOOxLqxfcJC1+rmjU/7ZxvdZBQjpP2zqO2JwO/\nq+hIvY9mIej7yKknvmaccvBHyxrJBvgSzZ/j0BRQEI0xAPQUEmqFtJcQeQIU\nJ1yyzfb++CyMtoIvPbiR9R2chIHXCCa5Bh+iKoql+x1cHeMoPDodxece6Ei/\nmYCE\r\n=HLTP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiwF/1bcuTkt/JfTpqooT296ioVa7TtgATsH2YaR8bsgIhALroLlEgFdthLSU/CSFEY1WZpZxQe4HsI/pFF8kqYxVH"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.13_1568259777603_0.01718649453537835"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.14-8004e5c.0":{"name":"graphql-toolkit","version":"0.5.14-8004e5c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"8004e5cf2f3c1c9964e2007f3b961efeb61aa417","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-8004e5c.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-JhH61rTJQLaCGAxLzu8bsciYkE7Yiruz2E05XyuCN3pRvO6NpozjtEqSf7erBC9ViGLUw+lis9OHSV046ADuEw==","shasum":"318f3d0b9475b1e7f971cbce1e861fb56c24c0f4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-8004e5c.0.tgz","fileCount":258,"unpackedSize":403866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeb8TCRA9TVsSAnZWagAABTAQAJnx9Wimgm4qnbn/0eMO\nFV6eZQ8dRr0CKC0262I6NcbGH0uRP3mMydtGMB+fhvnJpbecH/oZh420m8Te\nEn3p4O9ADbPg9g5eNUzMAGqnjRdKEqyd6Qngi8fSfV/Pg/yneuUxLQUxXwI+\njprnKGJzxUx8CfgHn9P9WNWhc1i0ez8WyEkMSfpjSLBOVOW6rtGiR3NgN0Q+\nzimf7DJi/H+5B38Q+Vy2iELLjm6CbT89ufHgX6MsiTWfyFRdkAX/td7gTg/C\nXniSAQwiRLDNk7nIggfKBm7T2jVce5R2hQDwVuZxsIgy1tSdd1lcLEGpeBLI\nlw0HCdlW/Grpzt9XEUQ/K9/gVIuW60fz78Pp3kuj5eQbECwsDrFb5c5TEKUc\nW/C2XUY7bWYO1hgktLjcN30N5cxGV4OT/qkSUnMAfIrGfuRgFvMiK0mW2T69\nAaO12xBSzMsEqesZWMzZ/nPVMNCgDnbgbQ8If7BUvJPZpNV/A+rK75G1wZle\nukNc0CQDoqxBTuKGyNO07GPWdMD15dDPXD0Khum3dX/OKZvUOEByIGv/4VFd\nxwuDXx4XtPYVm8Z13QOwl/gDftrxSsaud+ec4BS4uWTwVd6eWd3P/aD89Tzx\ntk10j3h/r4jhzKIW3D+11Ht9w+CIidjG/PRsXsAHiKXgt3oq851jVIkiDMdb\nnK4R\r\n=Kli9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnO+91y5OjKF4imuTonLGo+At8ogxI/CldRiujzRI1nQIhAJPXF3Ga5ilqgUjKpA9m3i/70OH7++yrgGW/BQmQPFP9"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-8004e5c.0_1568259858744_0.42224570787306837"},"_hasShrinkwrap":false},"0.5.14-fdf9346.0":{"name":"graphql-toolkit","version":"0.5.14-fdf9346.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"fdf9346a2e318f99fddc71360584357b6cb61654","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-fdf9346.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-IboPUUAtWRVRYLHOizIFz0hgtzbyolpIy4i/kC7R0wk4m+JemPy31UK9LB2C+V2BxDKtk4+vYVktXVnhIMScrg==","shasum":"0175d0f93465a5c0a4605dd2c01eedddb48db933","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-fdf9346.0.tgz","fileCount":258,"unpackedSize":403867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdepWXCRA9TVsSAnZWagAAb1kQAIxS4On3ldG9FQVdt0kf\napQwZ+ecQDiHa7bgOxBgd7UddIICQyJmErFku/jmd4pa9VEFv1WIrm1HPi2u\nB2/IX+i4MKP8wh6QsBxB6qHInldcd3DeUD6MfYvVg7dl5GQWcA25GqEUsnAh\nhuPZajmRFcna46jBv4WbuchgPiU9kupizb2P1eJT7mZ1GZS3wtxtFtYJFyih\nGb0dpbqfULzPzYh/QLA4og3FxzfdIgWoAMfymaPwo4FnbFuyaTcAsXGnes6x\nnCV5Q0avnM1xKka+GBoIHAE6DiM5xwpax/iKA6La5SDtstPN7TYNmP0xRPr2\n1O1DPdBMbvl7+QRfXlLGm2Jd63XuRYIKklDsN8ztJ71uCMGKCD9fn+HZ4Xmr\nzJKCAHpnyPGXK5P9b7q/0z0VdBQSDrUuxTRd27oT/TZ2jFmUaZcBAD6WL1r1\nvqNkSz8jCLmSJMkPJXq0VIVF6AKSimxlqm0OO0Jj3EcnipUuALA5vD7oOBNq\nEJo3FnSphdPT8Y0PqHnLdzTXsUW8fAauzmmcvGBRrJMaTwVUeRvNWk4aklmG\no1J5yNbIxqxnBzeXEan6AlLokPUo3Pkoy/K9UgsK9G9Eh9U9T29odt5UYd7r\nMdYBRe3HGL6aHNbq9qMDKS2n1OEA+zfEOr9mmhEn7BXrooY2xGY0tj6JOZaa\n1MBB\r\n=Fvbr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDq+x48RuSFiG71GhUX4rQCMx6Mkg8qHFxzFIPP3AYZ8AiEA130h8rgeaGEw40D3mlVUm8CG3Gp7SBK2SyL2lYZXNyI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-fdf9346.0_1568314771624_0.4422900545505888"},"_hasShrinkwrap":false},"0.5.14-f55bc11.0":{"name":"graphql-toolkit","version":"0.5.14-f55bc11.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.0.2","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"f55bc11ae559f988d733c0e6ca5e09580cf03d62","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-f55bc11.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-IaK85IH+cXz7Fg3OEKVHq0K6ktf8dXszhNq1bFi1Z5ryCmKPuusTCPpKCbT51dylrpVRzM++p9gqy/GseH2ybw==","shasum":"8c7686491cea08bf30562430d3f4020281f65c78","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-f55bc11.0.tgz","fileCount":258,"unpackedSize":403862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeqgVCRA9TVsSAnZWagAAemYP/2F3cwHfGfJF/c1Dbu6y\nibYS8diHZ0XVCysr5TNRg61wtdqWf3eCy0Z6FIjAKDKbf2EeePBeaR7iwHiO\nfsf5jYFn6FyklpPB5aKwAt+zn6kk+MvLUC2vSu+DdZgeRaSv8aIZ4SvAHt8A\nUkeF7CEexgQESjEkdG+0tSR1JQIsmcED45SHGw0jNw/OxneFeJdtU2sjQrdN\nbPJX6DhQ/09Y0eF5vEIeUGgf22NDZV5eHCftLFO+P0NwsKeGHsI5RKkBLlIQ\nw+BBRsKNYFv4QpKYrPk/Tia0/y5FrpWHfV32pde5IpyhX5z1F5QYYXjjN7BN\n8BowQxM2i7z7Ll7okhC7KmacbX/88qchkCXIgovvC0SaXx6U4upOjO9QHeyo\nMZuFbI0pstY1lGcugPA4sa8piSTo5A0Zm2FThTPVKqQNE9ZnHWl39PsZN7pJ\nv8kPN90mTY4h4Ctik+bBE5n6YoubvAb5OYClc7mGobKFLU/AMZZquHHFHMBW\nZ3ZB0hzlDaoG/gfPRH9rvkX5+J8VE004ZCORD6iE3nUOVMh5RlOrk0CfODlI\nRKUnEDpKNa4I0Wnph+7z1unMGgYVenRTogz79VjI0XEsBYZwIzUpS1tuMfve\nfNWuX8m84Bac+SAbDeaMEGNZ1MWGlXhV1USbP0MbMlYUoIFjivG2Yf8AXyNp\nGpmd\r\n=mTjv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYhWA0eR4AlULpkwrPLKXTpuncvJ1xu7HUfEPuyAbU1AiEA2dP7fbNB64R+vF6st3WITemvuY73+XKCqzsMC8szxDs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-f55bc11.0_1568319509276_0.9738922051373398"},"_hasShrinkwrap":false},"0.5.14-318c803.0":{"name":"graphql-toolkit","version":"0.5.14-318c803.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"318c803a620d4aa87eabe6a912c0deb959794940","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-318c803.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-7M+zFw93a2ofJBiHjC46JIFZRilJbNa9C1m+Raqsz4iaiuUieL1KDcO31DLQAoNQsBD47xIKHP3UeJvlCGY3Cw==","shasum":"0f9e6c11188cd25ac7e81ea12c8e4d3aaa3cb43d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-318c803.0.tgz","fileCount":258,"unpackedSize":403859,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeqg7CRA9TVsSAnZWagAAn84QAJ8MX17OOi//PfDeW98J\nkRDQNL3BeDsUol8YN8FDyVF3Ah5pgaYBC+Uq4/7pxClK6g+mjDAH1H1Ya+F9\n3cFfOsYgotR15NS5e5sBtye54PO5HMmgZfVmYHQp998kUgS21vM71btilT0S\njhqOrhlj3N3RcqwNnn6mTav6YkkNTB6Hhn/ngXJYEXPVTpPYoUfoUXNC0WbI\nfmPH9bZ+RA7D5wyDISYA0IImnogw0wuU0tHISs3JjBD26EQlk1fiH6BP4YK6\n2IzM4StxXUWkb4righl6fSjJ8p3des2xL36PERmVu8+dhi4c5sPhDTa4Isb3\nLO9iq0Bth4KvfZzSN+hCIEgPEVYcF0pclDbKn1cqGyyBeItR9bd8wcp3YSbS\nym/sz41nvFtTF+lkZdItOv/hHiLX69tuyrYDhkX6JLI6rcSx/KBLdPbOMvaZ\nZmZNLVDQTjn+z/Uzrwjjf7tyBNXBNUKYBMTW9JE2G7YbS4KqkGhkm6g7Iujl\nc8I/VJ94qokZAx7WJQZ2iunils4Yx1DVTgRREfUEi+DrMhEHSyU5XQjM6dCE\nUnvEP4Eg7fmjEvgwWvfpl2mPbbIupNlIFpz5N713mX0SOiVajyE1VyFU9HNh\nmoSjWfxm2IEZqzO3KdIRLn0TH0/pMyvZvl0DkN5t68I1p3C5n+bZLfsIrlRA\nvEhR\r\n=xNKd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBmN66mhYBSmKrPq4BTIXvhVcP4oiXYopoRiFam/SfivAiBV2u1swIf1G/g1rKoJpa8tRzV88tCyFfaCW/qizUxIFw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-318c803.0_1568319546551_0.9145016352916508"},"_hasShrinkwrap":false},"0.5.14-3a82182.0":{"name":"graphql-toolkit","version":"0.5.14-3a82182.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"3a82182fdac9ecfa73667e1fce98851f55b5246d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-3a82182.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-3SpK4EDLAKfUYOmILcUyvl+scsx4+1rIkydDASx8sSk3ivU3E9/Z1HGh9/jz9qfc7wrAeGcviy+2jq3DjCrfHA==","shasum":"e749b1cbc967912c588e9f52368924e52d767234","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-3a82182.0.tgz","fileCount":258,"unpackedSize":403845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdey0jCRA9TVsSAnZWagAAUS8P/1ffFHndAXrAX/KMgTmI\nLLs/fJEos/MF9wMFmwdJJie0Vda4+PdrfvsjzszpOv1upzjzT2hR07vUOudD\nVicbL27H/iJFZvzY1trMcPOpY4zsDoZwtohq6z83ILS60ATHT8G4VDPG7zMb\n8Yg/XBK4Db9Kb6hAcuzczvs+gbDSVycPt4j8wTRJQ1leN9Ji5sn3ocBovk1Q\naLxJSVZf2g0U0rQIEhNC5G5ksoazzL1z1gZ+k5sxURaq2imFvp26T8Gv+3Rg\nDF5lzI26Dkr61K3fGFabbbNPGXHixVoXtm2Y4HkmSqrZZUUAW50NiIwEB69i\n8VzIcrcDVun3lSkDe7M3CWfDkKzjomzsDRo8D7+UIQTU1ekcRf1bWOlmTbC2\nuK8Mdp+ltpRvVDbzffFnmaZ2TN4SoG/Km0ph4p6zXgaTF2VxJleq8v5Vs0KR\nyvQPw1tbhIJdwhmI87iqYctx6blpFefXccmpKHe5tcNw6Evf30sA3VX5gDQM\nBF0sbPKgncLSh2gyH4zD3ibo9XfrRSrizfGoPmXJW+y9I1W62c+/keRMITi4\nI+EAm5zeWElB9RdjNtIRhcgkHTPNJhahnJu/TSCLfTdgzOFp9pqvbaNMYIlT\nA7v602wcBvHFPl89TubOOMidMH8nMFuu8L7DHo0okYW9rkD2n/wfYN8gO6w2\nb7cf\r\n=VYWD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkxiwGy7x/UdV1AokZDhwDw1QXFGzyVuakjkLwBNKYcwIgUvnsVUP4FQQCesKYatNkj/0hOL6Bc1ycigPFNY3IklM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-3a82182.0_1568353570426_0.939242005377892"},"_hasShrinkwrap":false},"0.5.14-d08adf0.0":{"name":"graphql-toolkit","version":"0.5.14-d08adf0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d08adf00709809700ed8705e83c9ca1ecf773ce2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-d08adf0.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-2ris4SIZaO5sNCZWrmpKHPAQkghHlhO8jxraPWjxaPigjT2/nUDyHK60w5Oe1JuB8fbDYRSC27goeoDtbfD3Lg==","shasum":"25893daf9139ede80e107228bbabf626415a0805","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-d08adf0.0.tgz","fileCount":258,"unpackedSize":403841,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde0QWCRA9TVsSAnZWagAAw54QAIHMtGWoumsjZ3GTwasB\nWG+vkfQmC0nQmxMR5PAhmC3G8OyXei9ywheL6RhkxP9amiLY3YYLwZ9kXD9/\nVhi3aHKedsBH+cQGiey3WjZkB8bFEIQlkuNIIZIay63YbsZHuY8OGS45KDGl\neM3ynp71wGryzKAZLCTtKaim0ebHIR0GjLWNf9bVYXmpb79QK8rB/mzuajhQ\npH4jxPSPURPv2VRBWn8eCEbXWxRX/FbIljEUXVOcBp6wggNb2l6KGArI+wMg\nq/pfnCilD8gG3TaDvi79IED5U3ThpW7JfWHMPKUtTb/gLa/OIHoFHId/qVcV\ngOHXcrmvYJmUKKJ2Wb88x1xBjWi9/MN6J9A5sj8/al8UyJxl2g4xO/bUyj9F\nO7iIO4ZHlcrM3h1Y5a3VPIfnFoe/PdQWVJkcRoXPMWwiLM5w9SAoBMmhUa0Y\nXAyU6vZ7V7zboIxpICb4tdFZp/RxPLSwJpHPa8iYjS8KZ6mXBP0SutHwrs3C\nzm6BltTKruxsZ3EgqqGr7TdktTqBznPei4Qt8+kp/Pu8uU/OY0deN2KCWRDe\nF+W8BIrR7PZQFkOkeJCn3yxepc+DzHgMxIKoZF/RIA/PKqQoUXSArY/bLFpB\n0nRNhQ9zG6GAWLHwJ01cDfear+4/kgQKfcaOlg/DoEDzE7PkSBz9zWQpurhM\nSMuK\r\n=bjy+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDprWqdjYvdx/4ZmzZ7DurzpYhGc/hdZ7CiuHAS+NxP0AiAZ9KWw1V+ZeX3b3SKe5TmafRdZOZpiPkg7k9g+mIUnFg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-d08adf0.0_1568359445675_0.46641327461278337"},"_hasShrinkwrap":false},"0.5.14-7f7855a.0":{"name":"graphql-toolkit","version":"0.5.14-7f7855a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"7f7855aeb43d7e42e5d08b93fe0656af05d41e69","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-7f7855a.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-qK3w3M1i2GBQZMS2w11dH+KMeKx9ga19z+Fx68Xp7Bep+Ha3CEWWP1F2J6Lu2VaCJK6lJmDRTkmoJoS70OiN6A==","shasum":"2b52574c606b30901b1a905ca6659cfee4a734b6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-7f7855a.0.tgz","fileCount":258,"unpackedSize":403874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde6o1CRA9TVsSAnZWagAAFjQP/35SjSY2tTfZgU00nsGR\n8niIeEXNJvQcYevVdlzs3Qcq6o90uK5WA9vBeqdc4JugTONO2GadkkV5RhRy\nq5nhi4m3aOyVTFe2GeXU+0wf5VJ7NhksCPsADljAppnG5sSdzp6MjZ6xy2Iq\nKA7n3kjhs8r2HPyEMBgfGCRu90ZFnNzdH8An7g2pY7dRl/KV/2my25tmGEeZ\nRKlL7eIwcrOo7RphwmLMxzu7Eix55YCXL97RihLAVra0jmr1gHP0hHVHPWaQ\n0wOV4H2oZRush46/q7cf2CsfD7H6aqhCYB+9RsPaneDg1CpBDviRWsPGSa2t\nq/edE11RyYLzriOQYz1SMtng6/MST62xZkvQP2JZlkeS63ZuvgiMmG34RW0W\nE0zL62xrJbehJwDtaab1Bhu+KZKNiIhQoGi/EU1bYvhj44xcO32wNF4WpirP\nMtOQhZTtn9SK/XT9VhxRBKlYhH2WB8cRaf1CHVyfhGmVJojvjixzcI0V8g6x\ng/JrBU+gA2491A73oujhrc2WSxQW1o+gfiOPAF9YCWcTWgay0F/unfnjrEIX\naV0OJRzDyxunNLUUN/jO/3Irmyi/qviwhB4rMuaNwXkmxVpeBX+fdFdl+EEd\n07XjpSfOp/79Qxpo1p0AJGD3cC8HRYQmGz3Pj/EiTHJX/+b+CBfWzPKfy95l\nV+dA\r\n=Iaby\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD724oCjkek0iDmj89vnmCcfYuV5J8c+iB73GUgRym4XQIhAJQ1gK7y15pHKSTyoxsOyWBuoxIp2XKO6wcNhIpse/10"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-7f7855a.0_1568385588880_0.4969581200808435"},"_hasShrinkwrap":false},"0.5.14-f9b5744.0":{"name":"graphql-toolkit","version":"0.5.14-f9b5744.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.5","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"# graphql-toolkit\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"f9b574492f71793140f7d3b0a3da1c8cc2e484c0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-f9b5744.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-Uow2oMHonRYGyOOUiDAmvn8ZN8TajDzyKpUlytKXp7WQChg8jCQ0LEg4/5N/WkUcms5YPZ/PxNJC7qC7vufbDA==","shasum":"26b1b35194d4610d29b5c903cc2bfff10302b916","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-f9b5744.0.tgz","fileCount":258,"unpackedSize":403828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde7XmCRA9TVsSAnZWagAAwjcP/3m6iXn2W0XvFklHa9FK\nCwc0WcXYcnpq0i8h2vKmPE6EsDlMe2sierVtNkk2EKNIkCZF/CJCJUwsF2La\neUtUWkumviuLnMizyhEbkVUy1x2UiFUBqAZXD2Fd6KEVLD5Jtxu8IcM9jXoS\nOQR4DEXQhWnpE20G13ckc82r7b4+eBWxhSFSBQ4ZoI+TYrN7/3TRsaQUWT6/\nj8nlVDEprUdxx6l0KSzGLefm5iFlbQNn5kJbylIDIYj7UawvM9IpnZaW9tsr\n2gZzMhz3Vd9iFtMc1yxvpb+jlG0RSh/IVMTDSGLMGY8b8GOBPfbZHxAb9FHQ\nQtS4TDEAQKkVyASXqkyv0vVOQ6bkg/LRP7QcEsEhxShgNgqIol+rvm3WLY6Z\nJmY/D6C8xZQxa1lyrxmpy6pYbOMgGVVj0FuY/8tbAnab+eZTPR2eQCOYnLB9\nUjZ0G/sx0StTfv+nMXHwvSBTjYoBqABggQZurbewm58aU58d0kwnoxkCWduf\n1TanLgDF222+vg/PWbov2nxfVSAnJEaTsrk0oSVe7n35h6EE+j0fcwP3mcmK\nuYAoYXqh/QpQMlRtJ48j3HSiDa3Uy3OE/1eq1u3pf+OePSgM8g9QJeL75YCV\ns+OkB+VB1t0I3+jfQ9q56gQh5m6rR65Hjoj/c2qzcYjZsaJ5qo8jEnZqNo8o\nzFHD\r\n=3ePn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH3PgqIpe8Xt8jEtBcd7TMt/rTiY6kerToqJSn/WDC8xAiADvMNdYF9vee+9BJFvfRDZErbsVCyb4aw35cxu0UM/SQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-f9b5744.0_1568388581288_0.4071556720809433"},"_hasShrinkwrap":false},"0.5.14-f71f9fd.0":{"name":"graphql-toolkit","version":"0.5.14-f71f9fd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.4","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"f71f9fde2cfb2f50dcf91a02f02e05de7e70942c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-f71f9fd.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-DTO/v5itpomZAD+sw8QRmMwK/yZsPaO2ngGCvNvCxwmoGI5fzqiyUoBhZK8vqb2IgRqMChlcyzuPi33chQYsmg==","shasum":"639669740b9cc4ed5457b42c46726eef70c7b8bb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-f71f9fd.0.tgz","fileCount":258,"unpackedSize":403957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde8erCRA9TVsSAnZWagAAD7QQAJyj7qJ0par61Zu2HLAd\nSwrpECrAqEU938KS9McckA5L6zpCr97cEp9Mlk5jsawbX4e6lhKsAmyKAsXo\n363wkGzmD3nmurMJkgXBDXnpbsEqSjOlbKMhp1qhptwu3aFIcPsrarhsB8tL\n9L83E7q4lPoVoOinAnJ9SLcQ853gyYTJ0byq/d+e9RhULsoUg/UAlFpN3+2Q\nNJwMOEdKUzhJHcNnbT1yjp2yHudebR/+2lFtplKoxJpEXWJt2QYFYRO0hssD\ntZhJrReJW48CPMJdnSr0jRcmtEIgUhA/m6hdV6o/NVM7+qSFCaXL95HHKcgv\nQFWbkXiKPBOmYNhoJ6F3agfPB7oEFAjqecCXK9hbi9sq+L22yXalLgIQ+b4H\nvS/Q3xvPO457bxEqVZKGIHxuun2qp5aALUy4HvevWcQxikaA6SIXutiUqIbn\npGMCY0qXh+ULtDE6WcdSMp/rWoDntQw7dvrGpm7VhjMb2v4V5v64Ziz7ZVp8\nVDkyJiulDaaAnNwF3BI2MPnAjRDq+xxZ2AQO7GRDxEJz/U3V/7iKz8jxU0If\nY45qBo0gxzghD6agRYHs9xHPq15XjwketuTGpUL3qe1Af4YTJZfiCC/p33q+\nw1gh3Tc5pVRr9eRKAJjKAtWjFzQbPRpqNIExM4iQ0xmfipttXvKJ62IKIXc8\nIcbj\r\n=OVtj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDRk52dyT4iUxoyBxzac68W1cWpdAzzcQ7QttMzSPja1AiANUMRP79hGQXw7iD/ou0hr+1JOSnuzd6FX/Y99Ay3f8g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-f71f9fd.0_1568393130840_0.2979156349234584"},"_hasShrinkwrap":false},"0.5.14-e45a6aa.0":{"name":"graphql-toolkit","version":"0.5.14-e45a6aa.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.5","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"e45a6aa257e974c4d1b0c815b5ffbe1d05e3b8de","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-e45a6aa.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-pDYRdF76OxUJsY02vIyfawV2Vmsltjum7g7BtzBSXpBBTH0CQofVFD7RlnGsyJsfD+rb6qKa5/R049DyXctrZw==","shasum":"28ba84a8d90232db6fd216fcb444edc4591e5e60","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-e45a6aa.0.tgz","fileCount":258,"unpackedSize":403953,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde8ezCRA9TVsSAnZWagAArhAP/jGChW25jK35sRHUs7J6\n1YznHteukC3bALQleAZtasNfDMHEYcrxmYuDM1dhc6d+LzeHPSwLAFW5MIj4\nptKzkMRh9Fdl9NKuCH/z5KW4JPXSLZ9KYfsyQ0/+aSV50orGLbJ0UpnxtNLN\nPmEwTALLwp+8ppN3h/v45iRs0BNvqJbBtZcpO0u/SNk4ljpCJq50o6o/cvIY\ncWuYgNLcuLHrmVMTt8PD3Hzgmn9AwQWreNYxoSd5AFKAOUwpiKieJc57y/AE\nU8CdEPrpLlFoROXTcNzQK3/4tRXwqdPiptFvGRsUC/AOASFoCL5GUJ6JaR/V\nLh1/wYB+zghNPCwnVAmN6kQLqiM58j56P2GC+qKbBYM7zfnJwk9YujW1EauC\nedluFAA9Dyav/Tp53FftOLwUMg+fFg628FhQjbRJO3bzQaF/DS2NF7BvEAMQ\n7Ryn5KAfYAhHw26SBb/UT8hbSbFZql6vYSsThLVTCgSk5O52Tv1UVrxdBDUx\nZ6uRinXKiu3CTDIu0AkTM1zJAGrd9VoDSofNM3JkbTHsxesURWTlby4QSsOx\nFE3XxuN+1BVUwqxvK5VAf91zEZpdMtq7RubbnhtPv+tQBiRxs061pQ0jANPx\nc9FwXE13YkylyBpCm4AyLd+ldl4WJ03xU3mAIyT/aRT2iVr8TFNVrIkzMN/Q\nzqEH\r\n=kEQu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjPozq5Q/qigjrQnaHcS88GBpdkCcNSg5Ew9zRXbY07AIhAOvIrf2fqAj/f1t09Vumady41X3aCvHiCFupR1xmJkpm"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-e45a6aa.0_1568393138350_0.7513715573271682"},"_hasShrinkwrap":false},"0.5.14-af36b42.0":{"name":"graphql-toolkit","version":"0.5.14-af36b42.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.5","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"af36b42f830270790fc0c950d765a1093f6976c3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-af36b42.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-RyPTFM8tIekKJEh6V7CRjKmmUdUWgNZrGFZfc6Be0PQ7enpE0I3GrPrkl1Uhxm6kwuMH7P1qEIunHe1yTgi4ng==","shasum":"b830dc5e815e18fd66da4a611778d22947778166","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-af36b42.0.tgz","fileCount":258,"unpackedSize":403949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde8fWCRA9TVsSAnZWagAAJE0P+wXuqIDARQJAjdM5bvka\niQk/wGjNM/7TZoE+haBOCAowk9lbBc/LsQq106mlnQxcFsK83uHn9B4R9oSk\nwzyzWKe+r/GXzHhRPNbJCl/v3pIGkhjj55xYy9R0X5NR8W67puU9dHlcPoRL\nYECWn9rzxLTlbzHCaGSWauzXtRdY9ENnjCAQ0wYOQtbzGnPtHQTDgxfl9VJ2\ni3aRbj51SMp6cr5bfiWNRnjb4af7j7PUQxr1eBW6JWjNH90pviT4pUAdcHq2\nwwIbKV8nytxVjB8PLjWHU9Zhc/hnEsdF3WygMInt9B8vKhN5xVAErDcnnT+G\n9Ba3hYZDK5aWwbXmAcAUMLi1bAfO3o85XE2OC2DOJSILb+0FOY9W+Ukn1d/n\nDUJqYwHkAGTE727cvGTtTBPxIjpBgHs5pqWQXrmjNInG2sTqi0yQyJKXTI6A\nLYZa4yTACxRS9pebuoqXx6olrV5SSDwmB+DoSOkSsgqKDfBRd2oUxul9PcfU\nMkxM5RADIjeoYd1wNIFNJ1P2g+LawnkxfA+UmMS8uY+ysNvwS/F+eAlN/oq1\nX3khM+eMWPMgALxU5lMtxDsO7zDAiu+wCWjpWfYMhGJF7sZWWu+x6mxnx5ut\n2xT8XVkYUBA4PfYqr45F/UsFCszdmph4fDQnr6KkASqCiX8YptlWUCjV2J36\nRNLk\r\n=pJtg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZWNurZg3vvMpVTUJCyyeEeWMmkVrWBJqGTypIALtl7AIhANlGyN3ihc02nwW/yi3kt6FJXb83JBWT2GgQvE+9Nle4"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-af36b42.0_1568393174040_0.45818129034812727"},"_hasShrinkwrap":false},"0.5.14-8f86eb0.0":{"name":"graphql-toolkit","version":"0.5.14-8f86eb0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.5","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"8f86eb0f8c4ca51053f853e1acef5789cb61958c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-8f86eb0.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-lGNxfdJsoGJhOPF9ohjmnKYw4mYBPK7reCPPhqIps664cXzTYlOl5JUk/c2jkndgLqyspdTTlTes6NzHIneVuA==","shasum":"360beda8e346ae284f4bca5c4a7f2e43a63f8438","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-8f86eb0.0.tgz","fileCount":258,"unpackedSize":403997,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJde8fuCRA9TVsSAnZWagAAH4gP+gL9HUWcxauWl0TiB5sN\nmvqeSssO8mpCEv2VuVV0kIXiPySO60KYm4GbkuPBOaYwS4Xax4+CKnpqeyrg\nkUJ2CtrdH9lxx8sc4mZr9+gOKz5+aDdjsbPLTr394+LBx1NjFZJmSFdbDBax\nspYvXnrX/pTMv1QLgyLC4TEH8jH0+L3Qar9CLovW+eLQAfoGIxK1eGKoe7mF\nXGb96BJBMl7TNEy213R2rXGz3oIFs4NlYGpl10xLpbnu3RhRVtIdsTo2Qjcl\nz/5miDqrK6Mj4puO7KuelrUjEDyzlfe42byz8CD44xoI+R1LRz4QOlqBE6kU\naTBlseEc3F6xbLtp/c34Cn/+IqqTcstjm5mH/3oUdRU1F384VK34C9ngsn7P\nvLWaZhzsPiZwwIxx0UuEA+4TYhoNTw+SiYghLgGeELd5anyHHwlpUy8wC/bb\nmIzUHN21tv7udjpl4/J/i5J1LRm/Snfsz53vWa9xp0apsjDPi5Wjh8wrjSsq\nvHr5ZsPS+EG783KKfFIRNkGZos7uOnzMT3qwaC/qkZJX2sJoLgEK79c5S3Ow\noaGjgCKtwko+YHwE9fD9DgrZVgs2O8iE5OCuk7YKYfryp/Ix+LoGlB5TUOR1\n+ulII/DhxwPGyETKLCSf4KXBkDQIBxA8wmZy/4SG3qMQQ1qxBDhcXh/Mvamj\nMV5N\r\n=j13k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDcDhJ0K/x/634Wdpg85qBvQr9UKN3OJvk04gQgKxiRiAiEAwXvT3X9asz1m5fYYR4W3cwq/UVC6zM3IuU4Uhia7tEo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-8f86eb0.0_1568393197309_0.7040514987818669"},"_hasShrinkwrap":false},"0.5.14-94638dd.0":{"name":"graphql-toolkit","version":"0.5.14-94638dd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.6","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"94638dd478ac57ddf831eb6e8409f825b7bebc59","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-94638dd.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-UB5T8+w5hbK08KKDQhA3GnjMELhj5DB8T61iXdPzqUWA8fVsVZJ6fg+tk5fYkqthAqCrWg68E+3mlkTXrv4gBA==","shasum":"e33375aae6c6d4186d35a957d0957919ae7366b9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-94638dd.0.tgz","fileCount":258,"unpackedSize":403961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdfmz9CRA9TVsSAnZWagAAhloP/iCjkz8/04aBStA4A8J2\nG/s/CcYRMBFi/IIq5LNZY6lV/JmkwOLcYdIicAcXI14twd66dOppsvnY0T9C\nkQzortauSFux0SjBiJz2/NIS+AD5NuDf89F6j9NPG89rXWCoAz9/yHiWhFqZ\nWbPSZRNGaGZxaFZiXAtoAZlAsO+nZH2uzVB2AmMixndyJXrcf0wa6h5JOHft\nyiBLEm7ZOebxQEuqmoNJNeToB50z4aQBZLrTZ3SDIC8bT/V108B6HtY0k35Z\nPoMTauT0vCTsY0RKpPxiS0EdGkqLSlQczWAGZLrYZ1WZ2Tr7dqtERYFXxTDc\n9IjvWPWVan1QCgkq+/9Hz6J4ytes4S+X2MnH685GOtOVhu8X0r1m2EQmWvQp\nUR/5rAGo2Bk/YGRjWKlPjFQ4deko5YXvaXj4agf3hiE/kA4cz/3DjJTJLGhD\nLVJP53fYytU3UkK6R7b58VghhtZYiHUSuq0bqpbCVw+k5Fk63d29mmzAaAxd\nbbxhDyzdYE9e5uyy7YyOqp1Iyi7PE5PbBB/aX9VS+oOANdx7acHRZEy+Mpvy\nzt7MHtyfpDXFfpIkSXAjWr2jzicxpLKhyVjCeQOMUEHmtYyyFkdA/oE8AcK8\n8hAxgqY3Jl7JpR096qlGszBwy1N7pi2O1qnU8tmjvyRSvOs0cQE+l9RMVWhR\nELo9\r\n=zgZG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGI1mFkymVFL2cO+5csG7Oj1j332szpfvQASGR7fyo6LAiEAn+/Gse22sKk1DbLLz0VlUHB3x8FpbN2ncH3uqMrBa48="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-94638dd.0_1568566525315_0.06296604072987066"},"_hasShrinkwrap":false},"0.5.14-0aef278.0":{"name":"graphql-toolkit","version":"0.5.14-0aef278.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.6","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"0aef2783306480dd85711beac5ba3711a6643bb1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-0aef278.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-SLd8iiECVUOCgbioWsKRXP4gm42P/FHrVSQnBOTLWhRdjMGXGZP3ZBWVK2BTCTJUPkRZrjK3EKgEsv9mjz2vqg==","shasum":"885a72150e7b93c8fd4ba687a9862e25373a7c99","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-0aef278.0.tgz","fileCount":258,"unpackedSize":403965,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgIj6CRA9TVsSAnZWagAA5NUP+QE9f0QvBnQfttNBDOnG\nWIbq4d8KNn2VEY2aDNUodV3TntK+bNM2GSMjIfuUslo3fUImX9UdodLY8qtw\nhyL/3Ny4DDT2L0vj4IjkfD/Tdk6N+Ui1WxbUILnQOXMYo4Kvd/fRocms1Vyy\nYoEwZMST0gAwf4F2lf6wpspUYqECRsjgs/2z1umZiCqHbe2Y363nRFWI+O0p\n5xO9aYum68pOGCCJPiWJoDTViJr3DOv+4G4MKpTGOiaS56pYQJrNJtcSB4lh\nvUO9agva+dQ00vXG6RT2sm67r/qHjJgQhvobfFnIE/4XrdFpFI99O1X/xFd8\nRSv6tYzkA9s0GrGL92Fe76gvl8aqH199+l4RQBL8HYUxkNrozLk1se+mxUFr\nA4R9ou0AzUn3C5TPSf+OboB/zncwjCvhXVcVaDp4JNiyyLK9fjG8wSAVZ85c\nRVCU3K4DY1RPJET934Z4U0HNVYnv16srRTNt8V8ZPqHKtPF5j6bDtOk0gqQ4\nqHIzvmxKOsFt7s9GW1Yiw+GEp70MyM2BUX19atAxu/U4ZZCLmGw6k8B2wvGN\n4eWAqENdNqHQk4NoinmwwyPL5swC7Xp8t6r9f7brFcjZVF2VL8wicxNHO2Xs\njCCbk8BZQEK3JZqlNwIJF8CnzfhOvIVkUIrwNvv4KItZlRKhu4KJ1Um8n2Sn\nkRLp\r\n=mSj/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgJj9KeLWxzoTpx5mTwcM060QOwDARLE3NRjRBl+QPnwIgFQjPzYpRkUheGuy5vhUJtdsmGRFyTYlaGadjI5eeGfo="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-0aef278.0_1568704761322_0.17657588151402237"},"_hasShrinkwrap":false},"0.5.14-3265929.0":{"name":"graphql-toolkit","version":"0.5.14-3265929.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.6","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"3265929ad074937fda94ec2c2dee9b4f9422d6ea","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14-3265929.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-GU9Jkx9xxLe0YeHm27mUU8lmdENPDYgxsU7gq8bkHEsbApCX0L1lWkun7Yi62bmtocVQOUZ0pgMYbX7hhi2cww==","shasum":"c277f288ed9357261f77f535995acc93a902b405","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14-3265929.0.tgz","fileCount":258,"unpackedSize":404003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgIrdCRA9TVsSAnZWagAA1oAP/j+CkEV08Ufrn0U7wzsF\nyen3vA6/mfb830J4PMya3u0y7DHmgUvaAMHHBGOdHtFzJo3LBBee2XBJKgcF\nNoNGk2suRHsA0A+LG0da6jvUq+wIQiiBIYvKXWiWbJu6cKtTrX90nhiBBXBV\nk9Xqj3Rxm+uK/L7m1q4xG+XkHuivWmzJtG79faQtkeEWvKtJgSWq4ATBxkcy\ncMJp7a7d5OcctIDLtnEN3mI3aGhNNL9lOMphJQsCsNosCC8sFhjbi90xEb9P\ntU8OJwAWjBd7dHTkntQQ0FYtlTSxJKP/RvmES8KhDUNR6bUrbJLmLQvsEA30\nJU/SsBYuNlaoFEf9mOePcl5k6rLV0vZZlm//BtrQJKezV58nBUk11QPhQhm7\n4R7WKt9k4FuC04KcWU83EfIZEoRpzZgQvUSY1dtHNMzfzV6UPQxYMUdwtVDB\nC+2DZOFDOg9e389GlE4uicWr/IL38kHn+LtCKSQgPijXA1Z2EoiPNaagiUfQ\nDdfDOX4AIeG17F2QHMTkKrR+vCPRsXB6LF6A9C6eSugFLyzJ5BH3l+uCrmE2\nybvpqZZrmEL9NcQjEdtMkgUa03s9OHk2VlRqqq8CmwdcnuxKc/d25Yyr47bK\np/yE2rKBiEhRS66CaHtDlFpaotcWk8oTbKhOgvVQQzjlcDj8uJXoIvFXhb9s\nrv3V\r\n=2IAM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHIro6N4wV3XwfvvJ1/jR5lk1Mehe63y0w85YKeAzeA6AiA4IzyvMVri7td106B2mfbL0/GtGklHGBQVKwue0Vtn4g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14-3265929.0_1568705245085_0.5855688237494123"},"_hasShrinkwrap":false},"0.5.14":{"name":"graphql-toolkit","version":"0.5.14","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.6","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"909cde5845759ac9562aa068bac60c0fc5e463fc","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.14","_nodeVersion":"10.16.0","_npmVersion":"6.11.2","dist":{"integrity":"sha512-/dPwbUMQd/5SeSs/MxKoN8hJfjORLDKw87c5oXt9Uk+n9t/84uQ/Z18nvynmW9oIP1Bx5PNNeqkFTHopmCW8+A==","shasum":"f44ab03fbe934fefad98e986258ace7dfedc69a9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.14.tgz","fileCount":274,"unpackedSize":411566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgvaACRA9TVsSAnZWagAAsyUP/3ld/+TgffzW1xpMnDBC\n2XncCfOWN7K3MQlCuEp1uPTNSsCn9ON1G12IYz7Ookae5IdbukMei3Jp+8ix\nzKFHR1JhYdBhKPlYO+agOhFOdeA+kVRtBXDW1G4VVduvNMoELihPdI6i5iWA\nwVPbVGD/16ueNxfS3dPD2XCtNaeZ350aFFS2d2x2KUIz5srOVPziUfOkxCaN\nn2uV54lmPsWJA+vKHZB4S9wKpSogIOcWRkLvwvIOEjoXK3y2vILB+y/yLXof\nptb8Cb+1lOAD79DSbscyLDxXcfGV1W3Wc3D0N38YBrMAjBdgYAixhxsWymtP\n7sNbjGEvA2AfWK+DJkfyXD/kfEwQTud1d5rwZrGi0hl3ulzQmuwCyE5dh2vn\ngBa5DMlUlcBd1/11v8M1XSc8XFeqbnedUkCG0q43i1pNp9S8VXmOzLFOtfRa\nTwqpwiApC/lHQ8Nqiv0xhoaom3FbV03HiovN+0aKqgqnE7cveNVJzz3pgGNs\npdse6RugbH55Efcy+BuezB/tuCi9Pv9FFkuIs2Iq1rjmlbAWyciTCqweDW9p\n3XWfljvKhMGmQjCkGBWvoxVqjXbX1glsUV1ITpIya3QBytlWR4vvwUhYPERs\nU/7BsN/zRp1Qq/UGZ2wsmeXGeAWwzMiXtr8+lNOBs3BcezbhLMEWgHR6OANk\nV6S6\r\n=w6uk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDeMiqVbqFmdTwe7Ay+eo3FiPYSG6hP8vDQbHW01YXilAiBRmdK/xskT+DOxVOVBR2TdgiGNxaZpcq/2PWhDQ9Rqmg=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.14_1568863872151_0.5572147655155646"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.15-f310343.0":{"name":"graphql-toolkit","version":"0.5.15-f310343.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.6","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"f310343ae8476a66131327e5070d354c3e00beee","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.15-f310343.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-EVrGA+mwAqiz3cDxDY+MuXSViXJ4zzVLUsv05O+3VroThbGwNUZfSsHOEka50udusJ0nLZELOM6s0fKJF8OMDA==","shasum":"7834a61710c99298e70467c39dc13b95a2a3c2b6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.15-f310343.0.tgz","fileCount":258,"unpackedSize":404081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdgvbhCRA9TVsSAnZWagAAiD4P/2YqiOLEP/NKlSE7IBc0\nDnV8Pm3880r8RDhmhvuRSjWuJoHMmKTfy9IvAduIrq3Ji4oECjLsI8JxTFFJ\nU1hly4jjwjQSEwHlGQzcxcxHpii1AgvRSlvXU83zsk/2mlpz7sOUFIjVSNiY\nTSNYZq6GjELeXm0QBx1N86Ao8cLiliQvhO2fjiku79V0AaiaKVBm0EucKI2w\nij1SrdUcQWFvaLL/7l9FEbSqZRFGE5+dtbdaGI8OcyQ4U+Bg8W0Y/6l6cb7/\nwWzr5FufmIQm1N10LCJMwcIqSz09UC+DAxsg2MqupCek53Ajbc9Sk+Xo7FXW\ntKBqGX/WSSozoJVU3SI5D1jrmnEXkQs/wiPBSJChsQppvy3CAzQilI9iFGEQ\nAuIeQA65H6Z+Ydd/yR/wBhYdEZdaqid0N6ILhdubbCTfaZlZvYQqFlLeEp3t\nO6Kch9+It+AM4OxsMTjr6jUImr4lldTvqCxUn/Uh5mLBYzuF5Pt6ewVj6oSs\n6PO+jziWjVUnJFMjinUI5iPjHB092ua3JA0TumaqdoluN4wUcC3viDDOLoKF\n7osXVUMSdwz5WBHCuq1fT35gPA0Oq7k9YIkJd+MxHYUODk5AI0jTu8arnfq0\nAZcEnMu+MLKW7KcBNS6ofarnsshYXbUlGNcUGz+svCQlgqMDxgD2jJ8489bJ\n8VLS\r\n=9jIZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHEqZw+1KmDcX55xpqTvxkdEsDDcTm+agn4R8Qnu8Ep5AiA2pCvi2nLJc/k41TrQ3jaDrHQMRviwgcW85S3LlKwQUA=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.15-f310343.0_1568863968893_0.2166094046094742"},"_hasShrinkwrap":false},"0.5.15-40396bd.0":{"name":"graphql-toolkit","version":"0.5.15-40396bd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"40396bd5addd09a4b075f8292c30fcd38dcd815c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.15-40396bd.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-65ufDqoBWk2EM2CfBxMvlwS1kMTLDokUC6eVyYrFua/94gMZKdpkdnd0Yb4MhPM07RlhIoFJFDi7F7iP+6Pw5A==","shasum":"85cb29e66f2a878e1612de5dce61bf2c72b6c5c7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.15-40396bd.0.tgz","fileCount":258,"unpackedSize":404050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhUJqCRA9TVsSAnZWagAA1PIQAJYyH1IG14YOIrMiPI4v\n7la1wc3+wf37jLivU9PARQsfVHH0CsDZ5X0N8qoYEhEowtq2NRMaflg7JJc+\nMBV9vB1iUS+eCYXW8CVpM+3aXvFA25ThoT6z8MxakTUXWDuCk3aRFSYt6Jfs\nV9b4hMYLu+L3LJkq4zkBRM8qgWfp8v9t/Ve4SYmSQ850UmF/NJftupMDt7Sp\nLmTc7lGCVO9/5cywYlT+99IxAeUgpIY+C8YLYoD7zFtD++cMhKj2+epRDNuy\n2y6kHaMW7TPwm+JaNIYbH9NbOGi7RRq+TC4brD2RZpfojrfW2YMxPQOFFdwe\nuXC1ali0jo9TyA70K6YkDxFcmTXDqI4gxSnH8rxQWWCQLEPv2mLRFnbwL1iB\nAQTMWodCyl+XPRn2d0C4LZ7eLvH+RHKkbgytVPrMEoNTP3+M7MOpu7tvBVXu\nGlESlzboo+APg2o94UMKV8id/nnPqpgDAq/LheHOighwtO7l7S3FaMQuwP3p\nwJipyiHvQ4S+0thoAPWEX6TMvGL76VaFUNrO+hkaq7gciAqnptgF6dJ4gR05\nyUjWo2E3iFVFXl77kN59yaTpATciYYw9Zi8k5wXbDThJvtJaVrdBycJ8sb2d\nt3x9WhvSpp5bROICJKl/fqqeg9rHY89P3Go0bQ9WcBXSrG3H4NtXO3yALqhq\nvPkx\r\n=oZLT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTHFKbSlg1VMy+va9vTmHffkD5KzhSGJdCSXNiC+eHQAiEA81UognC4oNI4p4vM/U0auhlvCZAyLjwqu7+clRz/vaE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.15-40396bd.0_1569014377939_0.19323893493151867"},"_hasShrinkwrap":false},"0.5.15-c6ca39e.0":{"name":"graphql-toolkit","version":"0.5.15-c6ca39e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.6","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"c6ca39e922fcc613e383f7bc6202ea7e7675128f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.15-c6ca39e.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-+pfnEMTNsNnf3MIHLsdZV4XkKoF5MjL80t11fYOnDnBFNCyTBFKBd+URy40wPeicQTTSoTSHY6JyvzCYQgws9A==","shasum":"97c265fbde482dcf2511e888dec82dba7739a757","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.15-c6ca39e.0.tgz","fileCount":258,"unpackedSize":404016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdh5W7CRA9TVsSAnZWagAABDQP/2c1wWVe42tHrW7aX5Ta\n/ssMiOvr9cN3/vjOPUvUHI+ZE2EdmoYh7NsaRBYpSqPshlt+2jT2BCTspJgl\n62FkYHIgUuSIqW+ij+Yr6cUklvTolhg4TMcLj5qbpocJot1FVwe+Ub6FS0TG\nN9jrF+aEfg4TahDSv9qvdPAj0qeQLbG5ly8cnO2v1uSRRi5FQZdpiVWWR8+M\nvgrRfNNZ5xGX9uq8mc5tE8E04dFQMyMeVyuzxGe4Lsld4ziAtK7AFTglqaGc\nFN1x3EiksHrt8egl7CLIGwoDZdn+TDvqd/Px2se1VPLHXfc+x9gmVly7ojSt\naC1YfRbBp1vt4zWmWLolb5Xug00ccKuzpChHROiNGUNxNaiK37tRnwOEx6Ka\nv+t9Ymgfk2CHta587BBj6pvmiCjkaPQXXRy4yP/Nhk7kUwzw7UW2AC6AZJzS\nCsaMhicqAV+lzzV7sIy8Umu43s53KLmsEB3mhY/X/yWbEdstWAsiTcFZZ7m7\nmxB6nKOUQwNDn1GnzyKf4uUTacnGXOz8XOganvYQmJ29V+AjZYQrMHaEo/SD\nyr+7CUkmG1oynCUul9wdev+IdI4bClunLQMwWw2oP+hEniYoo99Qr/wCeJaY\n+Ag8h8xpVhTm4ZHoBbuHimPDGNshgNMIQVppgqzM5482XPXlIBhklZPqdX8t\n/kGV\r\n=q7B9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgXClgjvnd11Gi7aAzsqkeTyBQShoKDn30UVFycUefxAiAX07uzV370uFvkg8bjnoDTeSqilMEl0J+edolHGoWUaQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.15-c6ca39e.0_1569166778854_0.13859106789276665"},"_hasShrinkwrap":false},"0.5.15-d57bb2e.0":{"name":"graphql-toolkit","version":"0.5.15-d57bb2e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d57bb2e928e2e85a43781d8f633a7ecad6aade27","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.15-d57bb2e.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-GLkJcaqAM/Cb6wis/oVFdlryBD1CKEi9a+51ek2W4zfIVCn51yw/FcI7dawxR5rvUOfDG/OWJtEyDJkcSFr6dA==","shasum":"9bee975457fa063de65d0e5c0b9ef326d221fc42","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.15-d57bb2e.0.tgz","fileCount":258,"unpackedSize":404055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdh5XhCRA9TVsSAnZWagAA8ZAP/3onW3GRoCokPRSMw8Ms\n6HTrR6oOB6SnqiJ2ObmK+mFNo21R/Dd8AIdarZVi9kNK0FaW/KSvi8ZB/CK/\n4yaRN/ggShlk+BZf4Rv8/wxhN2mjUOGozoa34CXswmKDQnfeNn+OR5I3yhTQ\nR2HPkR7A8Bd1zhKi5Hp41x+1I3DtpLfy58SzIQL5JnPNt+Kz3w0wH9mwwEou\nkHOyc1eu0vv0plhN2i0Od1heUQH+ARxid7lWsQFV7MlbGqp+o/+JBYtP7img\nlTt34bVG0PmaUYtxAMolMCOwIcnDzrNJStrxb64spXvG4e5h8E8CZZj02d0y\nwSaWrLuabNtQGR9okx2+Lg8XgpGJi2xwVbccbXbCjPPWiX7s9LkcS2CwFvSm\n/I8H7dv1itNpA5cubwgFfwKawSL375lr3EGwBbwg956iXOiJbneckKXfkXg+\nmXsHQm6rfKCGTME7YmNqKJAFMPkgWRX9k+9wV/zVBW9cbyJDCyIsXlDfZbS/\nxJjxqtlnvjhQ8BktgEN7UgFBrDh3LG/DvFguZmuim0veI9qj8LrV7MZIV5R5\ngtWSLdJhX46b+ijfPEqucaFNJwbvUl4sgPtqQk3V3lZISD04xOSRtcSH11i3\nQFZ3fgF006QX3vNzJgvdJOXTsCgHur1PAksCN0yXM0dAMockOVtItq9P/9yN\nJutz\r\n=NL7y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDordUHtVUqYhbWFeZFjU0+i2uAjh8F+bca0EbqucJ9VAIhAOyfN41VCoAbatJxTIbz3Ks1SDzxAhVZmf06m3RBrkHi"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.15-d57bb2e.0_1569166816430_0.7343434516854233"},"_hasShrinkwrap":false},"0.5.15-2fdd2aa.0":{"name":"graphql-toolkit","version":"0.5.15-2fdd2aa.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"2fdd2aae9abada9e2b1542ca49dc7f64e5a4159e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.15-2fdd2aa.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-AslOyYpjMnavhQ9yHhayhH3tXK0AeeDbzxXzbNlv3zCUtNJZdfFm8f3c2paCv0P+WQVhQ7aYdzag+AK227gzKQ==","shasum":"d5bac5dbed50af37870f3d7f2cb8ce3bec8eda4b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.15-2fdd2aa.0.tgz","fileCount":258,"unpackedSize":404040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdh5XzCRA9TVsSAnZWagAAgVkP/1qwDMRlISCuro1SnGPw\nOZKQnpOvfdKoc5FKkjyO22fy1kcZCnVx/F+SrMRulhWPtVCn0NXjk0VLTE8l\nvxC5MhuKE/9n5eVMDgfw+TA8SfAg5Kj3SSNBupuyCGkorjCzxlBFF9O27zxO\nTm6HLCg+0+sH+gVBzGHOAZvMefJ72k5bkzhtNCRTJhHIZs4f2AOp9NA7qTOJ\nzDJ6cB40nUREUTM5JQV/K5jvOOJ9YIiSWGIFKWOx9xy76dplLcvudX/wixEW\nqs/xl+JwqbHpRzs4xaU1CfAjGI9Lh0NDYcjlnDgkIFABJqAvk++KdfWLFF53\nULvlqo/Fuy6RKuDe0xP1yCwqyR8+o6FPfootV81lPVg/X22gNo72XCcohNTz\nfxQwhnbB7u4jh+dOGnJ2T0VX7RmsGzpuTAcVC/fMDeUA6uwyhHwprL4Hh1yP\ny6fmNATLAiyigTPVe8WdhkZuiS1aXpInhOL2cScJGGu/bua74SGTvc0aTxX5\nnHYk+F/0SSm/GIujcKtqfV3pyxmRT0uWVVUvNn+qVmC3vjIInSS4vvuYavRX\nZBIzw0NpBrgI/7dduUpkhtHUHXF4pEts84h3SaY+uvZ36BUmShpiaMW+Htlx\nuY+/c0awlnukj4E04gE7+yTwf/AAVYY4V+U2IKj+GgWAb6zqN5Ilpl0eawgU\noSUu\r\n=xg2S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9FflVwcgbsjkVmUcE8JOFuZ5XHD5I4nwD0DfgmrhlNgIhALLCBJqT2B3UaDBEFFARQ2sj/uSjj/t/eaCxTxq3ukY8"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.15-2fdd2aa.0_1569166834158_0.1992900034370335"},"_hasShrinkwrap":false},"0.5.15":{"name":"graphql-toolkit","version":"0.5.15","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"2fdd2aae9abada9e2b1542ca49dc7f64e5a4159e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.15","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-6+onKCKE9dleg57Eh+uP+ZlPNYXh5FgMLu7qr/MPiTS4ZuCvBh16nFJ6GlOKCWqTFD/chY8zapOqnPCMe4cASg==","shasum":"71730c9345a77069494e29285826d2d2f5c89de8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.15.tgz","fileCount":265,"unpackedSize":411727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdh5ZMCRA9TVsSAnZWagAAjMoP/R89QEsJTwmSuHaahmvz\nnrxyAGmx2G6ozv95HsilAK0gAtfBsoWdNF6obbXIFmPzBpqVj221PgLahj3x\nBr1wRVfTMjZSmyVxfVaM2Pmd4baBWFQsoQwbvd4mbzQGhJR14jeCyZfcyAdH\nIHC8+4ujjNl9LhCfbzB2WAfQUQ2+tr6D++vuY0qk8AGT4Fvb+Qawp7CDOjMc\nSRwt40sfvJYF0tcRUmsPr9xVkwwqxUst7fBrLZWfayhozg1s9Md451J/v91/\nduvgr3aeg0CTmmfYHZji6C7fWvioUjZWXRdWW1eaiuihV+EsKSGoprh3gxSu\n3x67Ljf16kbP+14CjIy1JoNqkhdBq9xswdWGDZD4ErRWqtDXC8iVUr6/Tohu\ntn68clSF/K78MQ34C5IBYXYOWQHavtLhxA3dSb5TgrPFPTOXLO/fqxyQkDEq\nSMXY4Fu6JIMzDGRxwlqMp/vKUyZYCV4tLjMlDAIyDU6KVASySECaCMYvjkLQ\nsAdmnbesmLgyl5Nq+DZ/ny5OwmPbSSnl2XEBXF9FEmXEaCXbJ4J4zFLlK/O+\nLTBxbfujqzQjaqahIZ/XIN3fqz/CgnTsnBO+gyz0yL9Ue80vFZ7fRazg680f\ng56QzuFXFrLK/bLCMEDIlXBgYvlU6P3r9Lqo4lZUXuk9caN+sVJ32GDuFjwX\nHqOT\r\n=MQUQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICZPHF85F2DdDzLLmA+BHOl6RXLZQqd+YH+GI7Efaps1AiA+c1Z1j5vP6tIlUfen7ugzf2t418l3FVNa/DPo8M16/g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.15_1569166924027_0.7603774791383591"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.16-b055da6.0":{"name":"graphql-toolkit","version":"0.5.16-b055da6.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"b055da6faa33d044b76324318b4b7e101b56db5c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-b055da6.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-uQM1Gw6uc+fZrUI2pT+ozGh9WEYC4Wh99rkkPNlHeMJV8r19nz45Kdv8FK59pbx7LdCEgdnEstBLyaYl2Pw/wg==","shasum":"31c1abea9aeba8aa4d4fd648218390122b641fd0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-b055da6.0.tgz","fileCount":258,"unpackedSize":404038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdh5aWCRA9TVsSAnZWagAAUCwP/RnFHcSlu6BF4baLu5RN\nDD0EnjbRa6xHLWFZ0ByRtmt06k+jeroUg48qlb50dzttbBNr3QlIVYTvyoHH\n54txY6pb1QSZQ05GtEAmTvOiweC2rYYKYyizRzDTmuqGBtK2Y/X++7m72dVd\nt0Uaw7ptU9wcWgsHeP0kwutL6q6olIJwQPTF22FmA6u/301JVck2n08inqNh\nNgFW3maSbRLh5d6/9pkPmY3C6pTEfjN3t6q7u5AflevXTq4nUJ0ZG3IXjGue\n3a519TW8AiiNnBM3jFuOw4rExmvlkK/7uv6f2iv0csY0VxZ/Vze6cmJTkAGQ\n/NfWo02oi436ojXLQnK8LbBTfmFbSrWMq1pgPlW18bWH6p6K2XQk60PTJKfc\nSLVyqrmkDQ271MGJEGSyBNlxyZ3r5n9d6VmzjEoIltHhb0aBYHeAgGeVVmlj\neg62y0LHe1E0qQkZXl1hWcelw57dRomq0zNArpOpKUmxrioORApzBxVn/eJQ\nCMVUW+3Mdz4/QFf92ABeBIU6tSQr8NO67xsMtwnOP5ciHjFb1apqeV5swaca\n0hZQ9b5cWX7D6kg6QKx9UeiNO8jn+UaqbZOdKNft8ZAeUgRQNRlv97qbj4pZ\nmgB8WDrLQZa0WqGNfW+XHsv6PbFrWZK5F9sCWF3Zun/2/DwcSHyBShmonYsI\ni2XU\r\n=gKpD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjmZyUqYNIX2dl/1Udtx3YaVAtPXPNOk8yrENbCPMkxAIgRzcGGqAFsLHYL3LRXZapIIln0qL9uSE/Yyh/CDVkTG8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-b055da6.0_1569166997383_0.8918597049769095"},"_hasShrinkwrap":false},"0.5.16-3b2e9f8.0":{"name":"graphql-toolkit","version":"0.5.16-3b2e9f8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.139","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"3b2e9f8f56d93f08709e75726645a0551ea39ea5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-3b2e9f8.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-sSCNdLHz8L34MHE9If5xdq2kDRCBkRLtTUNs89axcNf+qzz+N/6OdtkhVvaNloQeT7VYzr2x0qv+WjOy6YVtSg==","shasum":"24f7e3ed867a93b126daacbd78ea66e3475b59ae","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-3b2e9f8.0.tgz","fileCount":258,"unpackedSize":404073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiQyXCRA9TVsSAnZWagAAFvAP/A2nbT2/wEKE9vGTAR4t\n9k5FeqRav2BhG7UmFtpU8S9WrdoAUS9qqHUOJzOBRHSdo9kSqAktZryJkgdn\nshWMVGlcegaVEsj8EdjoGSO1LATUx3bwV1jRP++9AZr+i5braLhLmp/gPg7B\nIAE+PC/q6jP4gB0SNm8z1OBdnpmadCcDMqM1W9uLDN0fuqwc8EICVYrWVgmK\n+Fm0o1o+aG2yW0veO/gspIJp/F6gmibIwrToHwLvZ/Xf902im/DTSSY0TddG\n3/3gv9V5hq9018fCUQx2Y0jEXbc1xQ4fLZfkyOCRv7Z/HXlsZYViH5fCUIqG\nMmq2WxFNIIHIYvw4Vr2OD7Xv1hNzm0j8Dz75QdrbS8LdSweY4/Akeb+GV/6b\nUSk4zaVg+YkfiT7zhzbqYDtMaPuiOad+36/D3IRtOU8uZJOObmIBVAgzw5gs\nOgJh5x+OaKKI/3npOZpxv2sCLAZB3jFnD4xr7rp1+1ZD9BiLYxXUyJfQnQkm\n6QPRijw1nEcg4ggRLqLT+INtNYtoonu7kh9TunU7AUtRn5asmgBFZSYdW5zn\nGk8ArFnE3WnjLm8yRKGJSuQc4cgJcwiTIurrQsD5ySHy6aHxB9u2YON044aD\nVJOduiiCausvM2E8hl0yTA8C1URqzM4765VtyuV9C9g1C6vB8iUbZ6YT0LKV\nMoWu\r\n=O/Xs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeHZQczZlJSW1hBetWSVYA+NHBKTp+DTtbJkW1lOB8dAiEA+uNxvjST86GXHGPApgDJcfKHBr5RwtOo9rdMfS+wEK0="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-3b2e9f8.0_1569262742396_0.05139679344122494"},"_hasShrinkwrap":false},"0.5.16-d95643e.0":{"name":"graphql-toolkit","version":"0.5.16-d95643e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.139","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d95643e00d5c857f2e5096b2bce8a66cd2eb87a5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-d95643e.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-aUdInCrqyJfS32y6+Rua43On2vLd3V7Z3nl3/rUETZ6JSLuAXTOTWLcbP1wm1KzYKyBHOq/p7V7DpbAt9UwQwA==","shasum":"8d31386de573934dbc82fb744eebe5f1b2c98cd3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-d95643e.0.tgz","fileCount":258,"unpackedSize":404071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiVOsCRA9TVsSAnZWagAAxf4P/R3GxsKLNZ4SIFW5tYMc\njau5KUGSHBBD1R25Lv6ExkSKFJh4rW6hcy4y+EkehyFAi+Osezt7kkEqXi/E\n1I4VKJSilWgLzCHT5wzzt8eXsINxVihTV8Pkrhveadx5rs0H425VJWW18xIp\nkEaG7y3wA1wzIrZOjYGQRGWSZ1mN9Dhwjdo33g0K20I15fS4FGGxxbyqa/w5\nmyXsshEMU4xcT0c2MiApwgejkeoKvsz1Rda55LLtP0B0aVDMGUF3rnWdTNH5\n4vcMvIo/1xzGLI9P9kVkjHq6J4+ElKawodr2NZypkJnI+tcC/J4UZJCtJ2iC\nKF+b7pb5iw3ouigZhdoTjwBO+I+Ny+qj8ECqbG/xlDTpq7VHfvuu267YPGrE\n96RhM6qygIOb/foPh3BfJJ1q6QzefQcOLtW2gJU3wsrY92JGQ9pn//CPs+EQ\nBRhVfDwsZLIdkMu1aZtjnusCd9x2n3pQ5bRrpeTbe0Rbbpy9n25OXHdmStyH\nuhAQsjed2vq5ooLq17P5Xmwpm1HvvzMQ2ztcPk6S7Z60Fvy4ZcdFBJNSoVaR\nU+gVXPfLJA9Q+2H+rQEj5IwpxYadwd0P0CpSRcIsvbIFaSGo+jAduIMduO4W\n6jMl4jTgtTUYPCT4JfZmomALGhbSA88mhHu+6y5Rg9jwrH+E5zsRImAcAxP/\naJ6R\r\n=75FY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCImGmZpCH/YZl9ul8QaICahq/9P8oGAeDtiWtmfKnJJgIgWdySxfmSgizVAC5fEzBC+tUAqDl8z0mmtG1AP4lNJ+w="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-d95643e.0_1569280939375_0.49878575528496705"},"_hasShrinkwrap":false},"0.5.16-025ab94.0":{"name":"graphql-toolkit","version":"0.5.16-025ab94.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.139","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"025ab94b721dc91ce76523ac40428f1a82516207","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-025ab94.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-zD290oO5pbVlu1hulFnY8udH6J5l0qyPaizmhffOLU7ramdpAQUAIgvjmCnTXw+5bA5kXxQn6I7DVxT7q6g+eA==","shasum":"ff827523a73b705f65cc6ecaf92d5a7cc1512d35","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-025ab94.0.tgz","fileCount":258,"unpackedSize":404041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdijraCRA9TVsSAnZWagAA1i0P/iNv+Szk1AJOtisj3iHx\nJqZ20npNg2loSDftcZ2ldDTT8XnOtz/o3BiKMoCAIQRUasmHofrjDE++1/V/\n+YxY70NmmCHuUj4AsOAc+g1qTC+kGXZc9VB0WTOSnVJKXPPm+CniBHUWcWHm\nv9WhdinGLiDHKCIZtFP1cd0t5IqQhY8PXe6SsXSMomD1QuhkMwVllhrcuAZ2\nBBiUPB/T1k9AxT5s83eb41YmsTgQ3gecclMsbMDXp+r7oAssTpQfObejwadD\n2gia+z6iPGfKU7ElgTNsY6OOMgKS38Kf0X7hMRfVb/iC9zdE6dVoHbG9Ov9j\n9o4rDgKmptK+wz4iMy+SLuG0a7ikkJJDnjq3bd6bh0bRXyCaXku9TowbkP7t\nNvq68PerfFbh8Is6Li4Hs8MO4Rc/8+Ib3Lh465JtAw8gVWymUWq06XePNfB6\nf+pIuJ62t4MnsfKs8gUvCirCgj5Y2VwvrE1eTv4KeoDkkF0QkUTe52J9wCtu\nOtp+qtWOUf4CuGpDamwk+I4+Udmn48uJyjYi9eDoK5kszWju8kO9VPxxAxk7\nx6vxACb+cMa5a+IH8o7VQV6Ebzg2hikyfqbxk3puGvYfg5I36kPTK/F1zr0J\nCRofVrSivgWO4jlZR0q+rQ/uboqwKPCJaK7ILa2fFKfSBz2wonDdEWFutVx0\ncC/W\r\n=iNjU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGE7znbJkzvBoVHeZMKmBttlJhMLMmQ9ifEmsdtCjohHAiBOoxRm8+P3rSEjhR9ycfjvSvM+Y00XIyCo3BIhOXcQ+g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-025ab94.0_1569340122276_0.5106933094574235"},"_hasShrinkwrap":false},"0.5.16-9df99a4.0":{"name":"graphql-toolkit","version":"0.5.16-9df99a4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.139","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9df99a4e1e3c202711b4b83c0ba71ea2ffe11079","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-9df99a4.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-ZdcQYv3EovEK4iHDYFLFfinPpBhoqb6ExM8rSEHNYj9LRopFIE2uT216VNVV5kfU/kJhs9W9pgfAEuoVYpdK6A==","shasum":"a99c0ec739925cc2693ff9fbbc04c8bf8cb9c263","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-9df99a4.0.tgz","fileCount":258,"unpackedSize":404038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdij8eCRA9TVsSAnZWagAAYLUP/j+woTipqEvLf705TiIx\nU7AqqtZVj5fLS5Qg9jyjoZqh1bLV+sWuGE7MtTR1AR+fOM+ckkN41owKUe01\nweBdO0ws07D3tMXfLZyZrVQB9ezbIiZ/C761VkH26OT/M3zP8vQJ9BvITM28\nAdppifpcQGAvYc3HtgbQ7WcFfzHAe0xPkR6mNWu6V6NkMcp/qr4Z8V4uNSaP\n3Y4P4mT60PjdcrmfaRqgHegiE+uebMaZBxAdVugqoOKCMJD9waaHmZ3YrVM5\nOHsUoszaWvvkEcnyhbuKQMNSEgOxLAcUyBc6+MxCzpfrpsfeY+dDT2B3tRyo\nQyP5CAvdQuvWIfYPA22pKUE2FczSUJ3sDBlegg73VdfMl39IXrludXVa62pG\nlBWfdNpONEdtU6AfaFHkqF8pC3pwH0HaxaMW2iildj5AtLPHRTkbR0J5WEEF\nvIz/dnemAlcvzkmVbqKHbsFh2arH8pFnxaavCQfwoJxONRl1UWtcQItwW3PW\nRFsPameq4T4QbNMsNE7K4urCS2ML6m//hJ1yI5EohN1GT8zYQBQOAoeS9ZDw\nPyv9SHuUKVDO8UukogWwrJgi2Mwra7f5HzyfNu18T8ew7S2gTZrukQ9cMSVG\n443xdDHbVfHnI/ONG29KUZEjvlH52DV9OCNE4ln1tTlIib/7eMTAentEtqB1\nwq2d\r\n=E+o9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH8W78KNM3XPjjDzKkfTNJnzAzCMAChmwBRtXgzNxNxwAiEA6bJGifGrS1SP3dkwCyLWLMy13fU/3lhDNP88CKdg/qI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-9df99a4.0_1569341213842_0.1753768791072554"},"_hasShrinkwrap":false},"0.5.16-3bece8e.0":{"name":"graphql-toolkit","version":"0.5.16-3bece8e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.139","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.7","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"3bece8ed0122b34229f13f1f5cb4e9b01feb83a5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-3bece8e.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-KLiGr/ISBkSctB3d04oSobiC89o0RzhnPJONxjrrcgEiz90zplkk5QEdu1gFoe9MSEExxnXtNH6vL4bRcaeiiA==","shasum":"4554e18d307a2e97ff1d392e0325cdc88de54fc3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-3bece8e.0.tgz","fileCount":258,"unpackedSize":404074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdikSYCRA9TVsSAnZWagAAUz8QAJvt4qSMqduMscyMC/Ux\nX0z33iSa0A+SH90+STRGnpPcwd87UP/IAoMEOzxBV8lp81z/HU+or2Z+J0q1\nwdG8mB5j0eNLRLI9zqrhy+PcBlovrDWYsdJbFt5029yTmhLjunSGni7n9/yz\ncYgN52PIKhlLAPGCoqerSIA9KFktm0fokbchn+IZtFBSb/xBesbE0xd4+Nb4\nYA+QyCGgkuQslsSxKaXxNS8nr0jZjanGXTt67k5c+jzsOmng9Cnzy6TYYbO9\naaSHmKXvkkTAoBAo8xzgFEYkj3FCM5wMf+nkLJYPCBiszvS2NAMaTzugZrrm\nhgusqz++l7I+sfluG1vqRkgTaUCCzXJwJU82OZk/pf/LZkSNr+JQdDet8/eZ\nR3DTZBtPg+cvSvka9akxwehV57QplCOGelI/oLi5jEwcLAT2qfOrqk17lGCP\nyhkKfhB/YI6erahWP8BQo59t+zi8A6WoXrefV6KkFFesJUbBfXNHWFx6AiNp\nYZnXMrD4Q9GcQhTVqGoQ+Nfu8so6f7Vg3Q7ypVXcwW3xLs0tUk7bCvuVTUbu\nCGUvw3ArPMfQINzVln9WmqX1S7/JEyp5eGsFoPwVlib0TbbrdKXm7wAbcXQb\nKrdj+awVffdlP2bdzLQQ5GwMA2d3BE7cWvryCFC+Ew4Z8Sbd5eOzwax2xy9o\n0i7S\r\n=0w56\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBPRixCCx0HUDRzs+6y2tYnb4cpynH1enhyI1vcqrVyiAiEAxBzrpBjPJOlVTH20fbeVGaxxml3SuxDR3IXaApvNphE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-3bece8e.0_1569342615800_0.9997204422861974"},"_hasShrinkwrap":false},"0.5.16-118f675.0":{"name":"graphql-toolkit","version":"0.5.16-118f675.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.139","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"118f6759165ae906d52c55212ce00fc2e410bd1b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-118f675.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-v5J+9lrPRpl6POWkz2dD6c2hqVSDCHFvMtdns656avPhWS+Ge2J1ffpXthalzLyGtkpSJItxg2dyAA6eNuMPUQ==","shasum":"7cd995d30e1870150150e1f57b00fed3c2e95dd3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-118f675.0.tgz","fileCount":258,"unpackedSize":404057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdi3WICRA9TVsSAnZWagAAn6MP/017E/9nWqkgqoo7tfdD\nusf4LYq43rMXLq0E/Vgwj+wNls/8yKp43R9cCnfsJ0Q/4P5KMWAWlGkPBuj7\n8OqhGGoeZ5gh50a1DLlARTKKrLPP+UB+8l7qWyUJu9Igya+FlP0KuIvJEeT2\nJEKuqMyidcFFpF9IOdyFRQoHMmJwG11skzJR0OUW6ieCS6VPeynb9jBdaDrP\nSSxoS/31DOXPIwpehQ6r7fE0p1Xhpml2hDWWG5KrJjNXJbhe3WQIiW8kOJvE\nTTHWeBtlqA0B10qHDi76UeEJenm52WONnn/Bw4nO2khccsw8JNFrFr3Q0NAZ\nXxP0gkM8Ke6MOlhrEgG5TbaLoeVL3mm5ehp0uBpDR6NlS+/v1+NoNUg54t5J\no4Dw+YoCEBDuIEk1H46s/z/hPwCLOu00zWHHGcW9biHXE5ttzNtEvkq+hSWw\nKhvGQs0wn3+4GNpYmEKtmDVsRhmqrtLc2xZm0G7VdO/31HoSCCl+9QObJiN3\n6aCgMPJbqWAX7ALZMEFsQ8U1BZGGajKwDwmMaMsldRTbI1yfJrzzoxIDRyBV\njgZyIlRG3ik34nWOFank0b47oMuAvpzecb9CNB47vfZmlwgDdmFk7CeMkEt9\nD4Wj6zSc333HRVS92VYXd0iecAbnt6swDyS9BZw30JM+9XE1otPJtWbyMBGy\n3X2k\r\n=V1O5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4xOrgXhSAkt5/pZfMpbkc5qa/4+fjTrQszgdyUrUVTAIgRS0PAA/jHfdwTcJ9z0arBEIEOK/kiMKz0VOWkDryvwI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-118f675.0_1569420680217_0.297663183182691"},"_hasShrinkwrap":false},"0.5.16-a486858.0":{"name":"graphql-toolkit","version":"0.5.16-a486858.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.139","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"a48685809f1a3ea46a91980e59435ad3d915648f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-a486858.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-eqmhWLQ1abbaieugqcwXA1XLLF462d3jqC45ISR0lF8nrLhGEvdilgg5pAayWPAyOXr7klvylrxJ7ylwf3Y68Q==","shasum":"e5c07b4910a4d381c33a6cd9a6959ad0484b764c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-a486858.0.tgz","fileCount":258,"unpackedSize":404054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjDUACRA9TVsSAnZWagAAyIgP/0Ohin2KrcUsVHl8+Qos\ngzKw00DyEc7X8IKTBSkGy6ZK0vjSZpN9Qu8i8E3jb7qbM1u5JOoQGGSRm50g\nImD1iAQ4CRoqcQNuGmK3ps2nt9UmtLlFwOb0mck8esB+9YcFuIMsXv3KPICL\nomEcRZOn/+3u9Om0B+T0D3JbAvEazRj6qGOoT5MKbdpIWc8iZEItCzv0eQB5\nGUrtEhJ5lztfP/HO2VOsUBgyqyCGFS9ArwvYPTir04fbOdBrVpZKtjpp2bRI\n+/KFRCzFFvuw5cWFQVC1yI+1MtJlWrfHLsnVMabnbmHweZ725BpHfEjQF/M4\nH3igbg6/mP/jqoiTbc0tyOVuMT7yWa/lu8K39xQ9eZsvbhWAqqI7fZaLGH9m\negVy/9r4J3ZZ7nzceR5AGYuQgQSP4QBzJTcpArrAnXgVbhwx4zF6Tif/T4TZ\n7ZbU1vG11tPfm1pElLUIcXYqu9tc/kbw4TPdbgGjEWZIrH06Ngly8e4g0MNe\nI17OqpHsGH/YVmENYbc5fEXxSdXzM8gPj/X9x4G3YGtjXm+XBb1DNeJ/M6PT\nUutVZ+gwv+dT5d8yw3dbnL1a/FMORX2DUn/6wqfqeu98WqVPd11Yj6DJrWB4\nW8WGjhqdb6WPLEjf66vog84oexx/yjr3Eg+40FTP1V6vi8iOoFbka/OcK34r\nfcLS\r\n=BSgs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA32v7mH5oVBqlJFjiSVg/YfTxt6S5ckzIe8k5SKvPd1AiBRmudN7mXTsiOQm2pbESlJom97YiH8SavIyAOy+xUj1w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-a486858.0_1569469695514_0.6109398527715193"},"_hasShrinkwrap":false},"0.5.16-539ebaa.0":{"name":"graphql-toolkit","version":"0.5.16-539ebaa.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.139","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"539ebaacd6ffe499f1f000ff2d0be2b0d19da85a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-539ebaa.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-B3hqi5L3YWS/xVkuhkNfIO92F9KMyR1z8S+h50FoSpWaL+UVWw5iT61bhop2gj2zU1VKlTFfbcZ64kNXT39d6g==","shasum":"f4bf396b1472c5b0b4931564a102350f57266974","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-539ebaa.0.tgz","fileCount":258,"unpackedSize":404045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjDUOCRA9TVsSAnZWagAAO/QQAJ7QYDStgHVN5AZrSQoz\nxq78Y2eJb28GzK5pOdA4+vzhlLEqbswt7ClMhqVoq1/waY2ICiU4MJZhmXJF\nxfyFgXi22isSKFbXFPXJrqkTUlypryp0El5GP//wNh4QqXE9mE1EczwNORDr\nikACGKkbugyww6hutB6kXwmWap/d7ppxjseNUPjMqRGn2fzet4LDCdD1Y7y5\nMUrtaSDPkDyhdUx9KSRt8q6VikrHRUueQL4AMZQtiOs7cvU45pDgEwRkmMUc\nY6BkURgv3Akx8OJKQZCkhzqEOAQDde6tCQ8A9+ntUQFRy4spl0867P1oBBbJ\nEXV24rUflUUU2JqPXz25Yqnx3cwUzV53dWmdE25KUsRWTPImgZG1TmoBIMKZ\nGa7AT+xTtaSbf/gQ7jicQmPwGhjiwEAJuZY5o+a8G6QAOzW5NvpjKiURviVn\n21spBOwoUa1bzoLfU1sN9sT9voDrJlUH/rkpHW5w4qsQ4t2Yu3vc1j+Qmlhh\nn3tQjQLOOcbQDt9jLjVVTRBymV9jFk+LEHGoIge3sIDiQ8xknXvABMS1py7W\nm8Gz2GEG4nFhCH3D7Gs0Z7d2BNnDYtVVg2AB0dpqtrHeD3q0CJc6mXRIixYo\nVaH92rxcewJTWfnliDEqBrsY0Wg46t1xqhxlhfEUMIO5JYntBewmbrmHHHIj\n7dAo\r\n=ul7C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDu2khwGb1dFvynnE5LAkwiRhOeUvJF0IhvrzLQmAGLhwIgSqe3iskmckOnBpkhbptVPNvvMzL8Wuo+dmDf/uYVr1s="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-539ebaa.0_1569469709987_0.4850410376645702"},"_hasShrinkwrap":false},"0.5.16-de279b6.0":{"name":"graphql-toolkit","version":"0.5.16-de279b6.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.139","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"de279b6bb413d58c9088ad05361294b8ed1566f0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-de279b6.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-GXrho4hvPBbQ63bBpXeAkRzxzSvVb0eSLgNtx5Ay9KZStbHTeEu/TlXxXjoTCTDY4hR25Z7hZUqu0XF9KqvKig==","shasum":"9c0a70ca7b727b51ad6ccea40c19cb31c76a1e6b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-de279b6.0.tgz","fileCount":258,"unpackedSize":404046,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjDU+CRA9TVsSAnZWagAAxg8QAI6g1FytxzMiGqMGbgVd\nZ/vVZ1hksU33vqKF+GCfeqgPKPjaMU3BL/uHwXIhdPF1697PPUofRha1hzBf\nprloRv4XijdMaS2WEfJo623sMf8Vxhn1MpaO6BdWseROFSEUhaEn7gbWmUdH\n3DUvcvAqKHSWWDOxYptxZlyAZVy5ymaXklTru8SSFhPnLzkUtlt6grNiRLbQ\n05dXxQrNcS48jKOC/UBVfsxYpbChZ8pWk8CGuYeKSRm0qCg6VF8yAPuxGA2s\nhs7PyosuEzqeBbOOPw9FV1IbkvNI9VvtdfYCyuK4WGozk5YBSRaAwtlLVDrU\n8oxD60YUUCglm61pVjnsljz8iHc1T648M1k+TBvTRlGY6u6Vvd3uM6l9nRJt\nzrrgO5ybJtSrSFZhU+jYQOKkjcaKYSs1fSl8OhUUFNY00qvtcvxSeiFjgWCn\nP9t7FgYqlW3ITEL4/Fe30O/zCYnrGNDPICJBS7+jqm0AZ/l1JVmf/2TsCt3i\n469vKokNL/j4Fi2SZy1iLumI4+oB6Gm6BXMDR1cwsmcRsEe9CMPpcTay9TUO\nkSHHOGFN0xlaK61OMjmaSJn0FKCgOeaqlzqyOmbKJl3ppudIG7tdAABdgc7u\n96CmBTWIeBS+WUTVX5b5q84gLkuyw9teEKFZaeuRXVwPujZUK1bjU1DT0qZS\nzkck\r\n=S9rX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCW6Du6IfjHhJQcUx+V2FuSaA38GWpFemI/pfK4BY4++wIhAO9McXQQU60b3EEnVHMbkABrOzw1xBqqiWxQN5jb3aim"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-de279b6.0_1569469757236_0.5069011404602846"},"_hasShrinkwrap":false},"0.5.15-80f65b4.0":{"name":"graphql-toolkit","version":"0.5.15-80f65b4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.6","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"80f65b40dac6101ca69403245baa68257636011f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.15-80f65b4.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-uNQJhyWUxmpTx4ema/wEyAcpCfXsfdmtQnoxe4Keoal1bx/hZQ8GXM8kyheDPdo8MLGptpiaMjBoNEdOsJjZfw==","shasum":"d845d3195f2db1c12ed16bb427cd6d1924f70870","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.15-80f65b4.0.tgz","fileCount":258,"unpackedSize":409409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjHXECRA9TVsSAnZWagAAhHgP/1OPwizbMEtHYi79wcdV\nfsVgnMHIv8C6jHoj/wHmTsSKpk2DahXx22equHh37AlT97kWDJ4Tq0DLz0j4\nQXtJ8zwu4g/A/UCSjjrGrAx12y85mAxzlGMEDcA24Gn/TFix00gGTcgDxJxO\nDX+j20t1DErxFzx7D4lsFLgAKpqQztFljXuzBboPq8fPkC+UeLpDe7sfMXPj\n0aPM05Rwqy+nVCTebKuzRT2A9VkMgC/aQrTR7JZ9G4jAKPwJtvF+81a1Eu9H\nMyY0WAtvdFK9kQzEQwQ+tZtJ2Y63JeioSjFvhthDHKDC2rp8Luz3h2gNYPCI\n8kfFeqayqWQFwbj5VjJ4FJDtNOwDhQAJu2N86ST95QrC0Op5iw/dZ2x3yWBZ\ns4+hFSwoJw/Tuqs/1dtpaungw1lp3CkjCGrMVQ50L8ermrAPFydw//L0hyQD\nNza3xMxGFByWjSS2+AFYAdSO4VxfJfPuCJ4BnsA2dCIfcRp0I4CM/QbUBRhx\n9rhJ9Ab/sdfhc4MiRdnNLMN9ypbLpSuG7m6asVM/xHFyJ3lVrdPMxog1DzMm\nVJFQygyO2VMRqfw/m+tnDZbqpUYaair4ZYCQDKq0q4knyu5Ah8Got5iT7pGR\n7899ePKxRRsQ4wEGRb4lk6u4EODkUpa7Cb+Qq56Z0yO5Z56+E6YbCBWnvrHT\nSC1g\r\n=TTRb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZlGP7AYXcr5m/n0uhY9UmysCiAKtVgP7I3wy6pzIRbgIgJwVuS5WLejn0CZe5EfFl1gCv1Ci0S3H8cl8c7cr9VPU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.15-80f65b4.0_1569486276222_0.8109124818344133"},"_hasShrinkwrap":false},"0.5.15-050a96a.0":{"name":"graphql-toolkit","version":"0.5.15-050a96a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.6","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"050a96ae1974ae92228be8feebe07b6ac3727afd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.15-050a96a.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-GFYnUKMbhPyhJznyMx8rravJcJ7Uc7HP76mVSYLO/VyaYLnDeq58P8UtdFILAGvPDpRWpVPbpPVBFzznEPKiUw==","shasum":"463519238b8f597de870baee262f3f3e8a3f2891","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.15-050a96a.0.tgz","fileCount":258,"unpackedSize":409864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjHceCRA9TVsSAnZWagAA/z8P/3/Ybxs2wVnPTIybCzcz\n6ZIcqRBhuwxwn3ALFi1k38n0tlSmUzXGWgByYHEH/MDqyN0aj7H8C5sNIXp6\ntrUa14e7yPujOxp30/0V6hjuWs7SmQ2XxScxh3OFgWklBVX0sV0sfWj76atn\n+YBDEJ3HxQLOUb7pbTcEDS/gT1135F/rajFVPNSD2JDxLzUn28Y/cPcsb1Mf\naZjhCR8p1z2Mdl1+wczrvngfMe9eMNbFpO6xkFxx9v0TiyBPAeTi4TLzc0Rk\nuY5VCaiFfLkgZoYyZa1sPdBCJizjNKkuEYfDIZPewnWuBBOGp94mf0wZ0uKK\naaF0WvDPvHhU//73vVlwTjMoFa85cKNMFUOS3FOricTsgdGBfW6lukJAFEYq\nplOwXdJpysLD8xh8Yy/q88QPmvD2o4gvoaPv5aVdzrDtMFB+R9VNmDPtHxCc\nryq24ckm6tJkF0Q3Jqnjpou9OHqMHsN8tVjh9nEJysQPpJ7sbJ5MSMvK+DtW\nojzTObm7FRkC6RbEqJNsBsHgOs/2oX8R9nlLCwdCAWE4PASiYsznSTrUAvsH\nMNCF/SnxohqSCA1Gy57vU+1fJzvgC6xLMoBVplsGgcUCqGpxLaPflRsP5vwY\nB5ushfUZ5CKSzKcsTaeAJLq7OeQsUKGOO2aTikZFxGpHnMvZxn9nmUuBNxud\n7eie\r\n=UDZV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaSeeuS8+jnnwDfKxHLsxP0owybj4qLRx3EHLZhnnEcgIgKfzGdEpFukI85a3JRj3sTK30vnpCWWS+T0DWpjIB8Fc="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.15-050a96a.0_1569486622110_0.7003257146460766"},"_hasShrinkwrap":false},"0.5.16-e140322.0":{"name":"graphql-toolkit","version":"0.5.16-e140322.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.140","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"e1403223b3bc254e417c223c05ad1b52938d3514","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-e140322.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-IwfhEe5ZoD8/+E7H3prFKduVRL+anTkuTkbDjA/V/u28ri9mwzvnyty5Ps/AsjDVZeHpHAajr7jJckMx6rI9Mw==","shasum":"520ac23f6ab6509ee690253dd55934880628389e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-e140322.0.tgz","fileCount":258,"unpackedSize":404045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjUeiCRA9TVsSAnZWagAANAcQAIJ0Xc52YadKKdWX0O1k\nSq2Ptt7KXrg/tTFLxJXPggjvSzMiwVIC0/QoNrl2GQjyoHQRC/Q2AFc1RHRM\n55wmcmPDPNu0u6CR5Qj7+K9z6FeQDrba4PspG7Z92d4VC23W4XRL/ARRTGtK\nQSnzNTTjRjLgxRuNfJdq+e9UOindYqkifjBdEh5Jssb4dG/uvtCPkP8BTNju\nojrXy95Vc91cA5UPVi/NRSdGlfimnF7AnkXrddQEIwmOFAbispyi5KMzMm8g\nGCg0LpVdmFJXWumvxwiGRv5FI6zdRdzYAms1UjMOMr8z79gm3s7x0k839F8h\n8uNiz2GH+XTEVyML1zz5JubDyAW/ofdl334SsI8Apz7+6Ppy2y2mRbBsux+I\nG2Y8ufjJ/YzL7hUcbWIml5jH4F38BcLybTGGV0BGohONWEwsMhqHh55yrEiG\nzmx4EdDsKG2vurQocDY86ik3vwoqb/4UEkCfsEtEIi/HUn4bVHl2xZOqUgq+\nrzFDkneBgbAhcbqJT244s7XsLGjrUF4XZINJEle9r2UdexvSfPsfgJxD4eeC\nTOpYCLQG6YQpFaSE5TnNgd0W8cEOmmB5wtz4VwuMHcJgOMCcM2qFfvLN8qCk\n9bZc0s0lMW0hWgB6XnshZPTwOe3H3jzyGc9yguUCZLSbR1ZMEhnPBTXgyK0F\nZfz1\r\n=j1PF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV64mSklVul8CWOqSuU01f0jfnbhiGEIPVwEcG6PV4OgIgOjI68aqFvJdLZYwMYJPbj7ciujncOpAVMZ+o3K+IXm8="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-e140322.0_1569540002195_0.35580321396803005"},"_hasShrinkwrap":false},"0.5.16-b6a66d1.0":{"name":"graphql-toolkit","version":"0.5.16-b6a66d1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.140","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"b6a66d1c2390da201dc1900b8a3219dce66298e1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-b6a66d1.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-AAPuWDvu7rOOzhAcugQDbDrd9O+kDofxx/qrseoyYhJguhBkyS3bqjhF7Fu2jJmW15TTdVFoTgE3daR9YVIENw==","shasum":"6ddaeb26d38cddce76d989467a8be1a753af7069","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-b6a66d1.0.tgz","fileCount":258,"unpackedSize":404071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjVlKCRA9TVsSAnZWagAAZTYQAINLPHo3wZVaplSSpc7U\nEiDUfMPEKdn3WUuHUoWjvNr/oeCn/ARKT1Nb1aoyDHBBBxrZ5sR071lVBmhN\nEBdceVYomiS5JzuQjvWoVXwTtlRbDGVvhIvcJZlHP3XRi7WQ3z8flqpozY5L\nl+WDwweu3p9YvG5vosscR+mZEKpMbwUq5qtnOD749QixOwEAqoDqU5YdBZFG\nFKFNYu1cz0oDt/HCKV5zxXWwXnRVKYukKr2wjVYEMRi3xtCnYVmep03620nJ\n+/rxsEL0uHECpSUkxRMNX+xM9mweaUeNpaDwxZ+gRsBoIJT387u03Qc76ER8\n7hxJz16SfPeFEKsXAKmEnDwzihSW4JDC+2jAMRwMAyVyp2sw4d6bfc5s1f4b\nSAhDcMXxg4kyIPExJjR3ePHeLLGkVK9IsK+cBPbJzUGK/h2SNPuGUM4bm71w\nlKRkHzeKM91W0yn0PIuQfOvtBCmpUDNDV4cKXwMYp1rq8tzjWFbohfrdSTK5\nr8NKK2e7qgXdx/ZvuZt/1XE8iRa9oIHhi0BrGQJFtZ+ZUer7IE9hPdVMJy/D\nIk07w8pawYvHqL2l22lhGYsXmXnHbpBCWkA7B6MlVqQVewXGC2GoJS7CKrlj\nx4rTXd/E2PAENYI+5utq8fcF8BaMUd5G9kD1O/2yO35CEk+R7zfkfuDiZO8p\n2dns\r\n=I3qM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZLapRbW0ALte4Gmim5IiQUjGLi0SIwyc+Tn5c2ehmQAiEA8FTcl46kaZ5IBf96bYOLoEIrO2IeWRdF/gQIBzpcGSM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-b6a66d1.0_1569544521700_0.4621372732488809"},"_hasShrinkwrap":false},"0.5.15-a1750c9.0":{"name":"graphql-toolkit","version":"0.5.15-a1750c9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.138","@types/node":"10.14.18","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.6","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.4","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"a1750c950e239c0fc2f973741c763f84955750bc","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.15-a1750c9.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-yf/LyHC+mx8xDcBpRN+WCEJqsW5iclqtafd/b39Sm6YxXTEGGCy1p1oq8S9tCarpKCcc9UCbWwlkm9yktOqxVQ==","shasum":"6b5dce17fa9f27286f32ad3ba6dc187c098435fc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.15-a1750c9.0.tgz","fileCount":258,"unpackedSize":411276,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjeMGCRA9TVsSAnZWagAA5YsP/0zY1keScxHibuej2yru\n0WqcXM/hiyuCfRO7+m9rOHaK308gxM5WSc/ZQVZmggkTraWR3cfy9XNaZc61\nhJ5rmVRSeZozrs65/WIocZQeQs6ji6pgXh9jq+2g9C+Ju6/1fN6fnxPyVhY/\n2+MFRwQL92zWm3Jixo1fAlhwhckiPF1yAP8gQCF+am6Z9amMRSEQVSls4WMs\nbhSh727PVpGrPirHRMR13t1u8AqrRxsa5uqhMiMFHWi0u3hqdPHKTyzbplqt\nSfspVF1eHdHynRqcL3iTsOlyo+i+Yito/An1uhI+IGDMWl/2P/k1D7ZTOCw0\nr3EdvWpPchhp53v1ZO4uV8CmqA7jEoubRhkvQkE8d9LvAEiBy1WlZU5+Yn/1\nmBXWT4QbVGRqOfaJcn3eI6wGIIyMXV/d4qdoR4QQV/mM/R0uS9uP8DfhcIQG\nrgwQ624rMh7vsPkz769JTwnU6jn6k8F7M/vjJJogoeJLWHmPnRPNKFo9TwnK\nWrEAGq5dXIuXvvj6Z4HdMZNqxQQ8IrFxHwiYFPiHsLUnGBU4WSwsAI9/ASf8\nYUlbg/Pds+GGiwMITsxeAuJFI0eBkNqCio7SjDz7Hhz2C2pYtBlN8gTMrR4h\n6sDTaEpAt0FsYV8aM9QSsDZkkTw1jGwNyxG7i/dAQMBhASOD9sjrsFDt96gh\nPBY2\r\n=3A9m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEfmILN4Ksim+5z1ctVo8hTjhS8PYGO34BwyXAG2qY/hAiBXLPd8Y3nSwTN1Ss7TxQNlYUD9lGIqNVq5RmUMR74lLQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.15-a1750c9.0_1569579782100_0.04811409167133163"},"_hasShrinkwrap":false},"0.5.16-5568245.0":{"name":"graphql-toolkit","version":"0.5.16-5568245.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"556824571bbab7afe3c74785e8f5a18cf430919a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-5568245.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-iyLeSKZFhwY+3lOuuXqp02ZDcLWMYqp/IMxgxNRn8mM5TM9S8dnro3Qmfe1EweTGe61Fkcbp7ozkd4TsByTqGQ==","shasum":"fc5b5ccc168730a7000065f4e902ff358fb5d620","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-5568245.0.tgz","fileCount":258,"unpackedSize":404051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjjv1CRA9TVsSAnZWagAA5HIQAIG3LdV10ckUOv7mVkeC\nY99jlHF/V4zh3uilVeJcygEYn2ngEXJ6IIUQ/R+odfJYUoqFG75PVpVhgYas\nwxcfUdKSAGIb3igKN+VIxo/z7aKJSHPTNYMAm4lAj+CsMm3Afx/57SnWxiim\nhPtQHYrMMumn709j9xvV5YDNAiNXESLQy9WEpiuSkTreCrJPKSOTS2dUyqqf\nyl+5oBhsQ7Eyu1KFQA6lmiZKhqfBuT4tnajgXQzu0sgot5n2jubymc19vJqm\nZ9cAWMv86K8VWdwLjCPH+EgZULQAVjYvhE9jsJZ2x+DZcCxKNyCOLzYPPb4g\n7f9Rj+yIh2vr4OOosyf3rT5Uir7AVl/8+H0uctLmw6hOtqUl7A6tVn7JJZRu\n/zTGCoPMcNRXJAj4NUmVSjDIb87EzUge9uwdvRD4yrKEkF7WVMegAjoDYwZJ\nj6KLgogPOTZ2eR/Kv+UBSG61lag6HO+Q75wVT7fpCUzKICs3OY+Z9CtNPyZC\nZbZuUDm0PDj42iBuDoJiJ57aaFMQSYzkGoTlHcW4zuJ9y8jOR1KBgtA8i2cP\npYQuJTyqUBoftcI7SEemaDEHmKyjXdOLPzo3IYyN3Xp/VtliSkVEEYxG5iwe\nAA2I7kPXXzZs5ljtydZG1dcSPw9U+FmDqFawKm7nXzfNV3IsbBdbBP65f+rC\nvPdd\r\n=JmS7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCj8J14Ea9J6Y1pdiaJIX6ut1RJwuvDOfnpxjXsRyrquQIhAMYW1K9WUY56884Kzy99jE958z8EV+m+P2VvPo6fvF4/"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-5568245.0_1569602548919_0.833101700686697"},"_hasShrinkwrap":false},"0.5.16-b88168d.0":{"name":"graphql-toolkit","version":"0.5.16-b88168d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"b88168da8ba44a98f7d6f9724906764866a2888f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-b88168d.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-4qaKFzLABzF62vgzwieaelEUCQ8fwqz42CB22b1lH7h8M7TSrTEabl1PeSZqv7Z7i8HQR2ya15GlVFbsm0SRtg==","shasum":"c42db611f261295df64046353b873827a2f83b07","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-b88168d.0.tgz","fileCount":258,"unpackedSize":404000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjj7wCRA9TVsSAnZWagAAi48QAIz5L+zLyJekasoGWmUl\nGkGZck+Sq7IHHevPKnFZojzPXwvoC5MObyt3JM7AIm0m9h8XSnIwY8cdNe5u\njZAsnpfjpLU9TXL4mmhcuBAAAEItwXylYEFybRSvYTbzw4i0qA0BduGzOSSj\n3+6X0mLZUvShpKP2HDpr7pwZLdTrAyZlEY97QZabCg6OW4s7/uE25+f1ixDc\nI80YWnEfDSXuCAkVtZIldmAE9ZpLmq6jqL1Ug861Gh+I39tBt4O7lV4ZZlha\nasafAskLo1O31ZtRUTtD2AkEgmoS6WQP+Z0oxXi3COe+wx801ltD2RrEM3Cw\nmO/dGnY27gVsSNuNdDJ4RsQ2vRSNWU3mAoK3A9urhV7rqnUY6b09Z4zhsbM/\nBPNwnjrQUxVIJeok2pCCzUqxm2b7nu4w48I/yiFegBkaosrCxJJ57UssSYrF\n4+UCNwXluEE5SB2wQc2prN2JVBnJ2jQ1wUA8vd4RT5HAdjSTY4i026M0KagY\njCQlcqnpjleNmYHfWAsAf+HxECX9EoSYKLcuoJACWKECNFyedJ1bS6P41TjD\nFJLzOOnOqYZ1/bIaMPXhfhQzgL2dSsX80VVJpTyeckR/f32b8njQw6vOMLR/\nwCXkKYMp3O0FZ6v7DiAtLSpsaAkjvMLuKt2wZVhmLMpvhwm0OX4Q2reMTqL0\nGtg5\r\n=u4gc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDx1WXsI5/lafJ6k8Emg/XsQdgTbdSrgfh60EHkfRNSHAIgfHDpWwyb4YVR1q2a2/sXGh6xkbSbI+UTfu3ID34mdbI="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-b88168d.0_1569603311426_0.26131715461656424"},"_hasShrinkwrap":false},"0.5.16-6ef0fd2.0":{"name":"graphql-toolkit","version":"0.5.16-6ef0fd2.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/graphql":"14.2.3","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"6ef0fd2bde47c713a2c0c9ae6aae634415b5bea9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16-6ef0fd2.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-VzjaEdf+bHXs3obgE213LbiOTqdpfUHvtRX9vFHSRckU9EzfD0qfuEIiW6356ROaD76/9+sMsoUq3LVecPfXqA==","shasum":"4639b40673c05e128c565e09946bc4a9fc0143d1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16-6ef0fd2.0.tgz","fileCount":258,"unpackedSize":411262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjj8+CRA9TVsSAnZWagAAILkP/1JNjkVFXS8BTWCN/U97\nXM5DSKvySECj+oroxjdrEw0tKclV8EL0XnOdrBl0QmTSTqmQXTJiElrCCSdB\n/4aX4WeK55sWbShDzVmivqQrx52bG2DZMObk7ZIu/PLwGZBATTlDZrsF8gL7\nM5+xZwBy1TDsRivc5Ay2myREhdDlKCQ+XvT36KNJ4DUdI7VqXnevB1C8zCB9\nqJViQ1LJZCJNe7BPPpH1Jk+fV1o+Aq5/PydADXQmi3MkuknDsbniG5eEovD9\nqHUxtUnX8WQhjvT986lKGeqo+z3Ir0Si3sbB+6TqL5o4rMqKcHMoMXTXWaDp\nYvSeZcn2zJvAr4mzchkz53Fq7uYX5zNIdCpmUnIeR9yVGODIIC+uO5nO5ua9\n0vAj11MYzycmXqP21n1el1y4KDkeqZPQCISAWJATlr+tBDyahQNlW8fVpUVg\n26IcjvGuo1bVrrUYUmGNgpCRDHxE4zyKVLQKMmTkXjZQgdRrMn8uuW2WRqpj\nClsugd4u8WfKswyqD6eUnkpAfiUDRgO5dN+8aL7qu40wXBVQKcfovZBDKdqF\nfz46TjsdCKiQCsfF1ozacKrUS1SEFtBrugQVTZ55+E/WGo5WaJTazg4hokAk\nwq/kQf2wmJfzY9Ua5izIAaOU1dTiEGd6x7PRu0B16o602G9Al4RKEt0RzyUq\nJ2Gh\r\n=se1i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIcuq5zoZrhvhwKpPJhof0fT3YjCATWkpd5cda97n0MwIgRS18gv5B5HIO3mWHIJjvm2wR5T7EOnr9Jh6uotGbsGA="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16-6ef0fd2.0_1569603389435_0.715736702336863"},"_hasShrinkwrap":false},"0.5.16":{"name":"graphql-toolkit","version":"0.5.16","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"6ef0fd2bde47c713a2c0c9ae6aae634415b5bea9","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.16","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-J3rAlsO7A/TJTZ7kLcFYy4/sIvB2AxiosxXFQICdsXf8R9b//fy7jmXnNo38ml1mm//915V0U5HMuAvo/hYiWQ==","shasum":"7673364e4458a6e6bc561eb3b87b2bb0e8360059","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.16.tgz","fileCount":274,"unpackedSize":418737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkuhdCRA9TVsSAnZWagAAMagQAJc37oRvk4LV6j28xsyL\nimFVtUg1RbHud0GkYbj2JScq/X/Lb88wlVnJqSCVPUWgb1WlBwbq2c5eCMQY\nnj7Tlvf64pS+qt2b372qjFbegl9VKHcE+jWY9LJQZaZC/aNWzYdaOZVB4u2r\nhADJN6yslh4iEcoqo42BKPYC/61NExYUK1JuZfWhXpajxCkkKY544C7pyqxP\nh1mzgnveuomKCpn0dLnTksCcgl4vFfSkt/LaL/2lTlj3Te2McdLev5Qp+SxI\nX13TrHC0fze1RjeBVrdhFDROqW6PfL50PR3MGRlx2N0J/XWOc8x3BmvMvw38\nnH9Ve5qpQtl30MZ+PNW4TgogC7er3EKxBi7PXkFJQQpeDnDP3oQAFTHElJsD\nIHh6aauKPoASAxl1DNvc97QC89yp1lAreEZAi/OYqGs+j6Bae6B5+yFihWDa\nqptW9zZerDXEuYTTDKfE/PuH0sT5fSxZRudo5X13osuV8CubkHInvVRcaKAe\n1sLVeSd+eaphdgIS1YEISdkFrPh2cUbsZfQtIsjIeBcTPXe3sej7LLd9fHNt\nWRDd586LWbwnOzNXEqTo2P9KxFVXoC93DKSW+p1KH2kWJ+JMfonRLP111a13\nrKerkO6KcLy7H3zAHcKk0jk0LDPpPe6MlNW8iMsBA5VS6klz/z59aQTSuS2N\n9sOA\r\n=w9hw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGAPo0B06pKQanHrHqt1ojgTn+9h0f0E0t9LV4Wjo0dlAiAYbVEqut7hBWaryw5tPw5RY45aNPFnUh/Xicj8GcqSvw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.16_1569908828919_0.29613211660499816"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.17-d9b9bdf.0":{"name":"graphql-toolkit","version":"0.5.17-d9b9bdf.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d9b9bdf1085e3bd253d9e05af2310b427794c051","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-d9b9bdf.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-ckuoAheeq+QKspQZnSIgUnz10gSovQAngeAfYi5vlY8Etkqi+xIwvjTx8b3BV82nZuj96zGi+S6tJpWV1VU3Pw==","shasum":"1b5f707899091a1b161cb42077be0f82add6cdcc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-d9b9bdf.0.tgz","fileCount":258,"unpackedSize":411230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdkujnCRA9TVsSAnZWagAA3wUP+wVIAgXgF6Ub773AJ1Lp\na4im+30x6uSiN1vqWm0T8eDhbhnEW3ZaVQsqaoHEUWXkgQnnPmU4+MJKFDwk\nReI0h1+VVwQtkXvL8eOjUNYkM+EK7djrmQFKCkeCvBEyrDyNvaQF2uHPAYRa\nM9lrey+XHJ1304BQp4G8DepBfTY6ZQyz/Nnj2H7UCyOtbO6BSbzbMBhGEgcB\nPZXPPP3NNzHsa7q1TiX+ygqAobJYoDMTEcQ1El5V4MT8GPF5lIxaSosBOg+l\nMToOV10soDK3HTUrSkIRO0ByvdSzusLqiI+FhG2Q77UPln8ixCFGADpM5rnh\nBb/cZvOl/aR2lVB3dV4f+vjrM8eGICfpGfjXtDW0RnICt4wJmpPMLOA4e4jK\nfTTXN0Pihf7LOG7a5Z3BPzyUuxAcP5C1cDBa6PAIRGjmepq6iWtp6aFCw3dr\nVLJeSLcnqjESzPCbZUvsZLeTIQkjbAZ/CGh1Iv4q8ZhbWzSaOIG9jpPfpID7\nOjqlkX/ZnFjMbjz8PyBavl2xGGVhuIrSRG1xjDGLnYHNudb2KtO2roTq5lpj\n45WO7MlaUxCzvYrv0mQeY9O7QDdfJpwb8GpcgY5N+SHurDDy8WN7uJpkRExj\n++001dIoBzkXsHZh2hSymqcVlsF7yiNtFyYINSt/9nRW4cfw2+uPeraSa/4A\neWfb\r\n=WPG6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpBycUDfy46KDhud0rg3+Hu3q499vPizyNFgkdqj2wfgIgQYjAGG1FpQM8Ej0hyh5FJL3rwKy7ZIvjxC939k6Nivg="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-d9b9bdf.0_1569908966967_0.9753429508355622"},"_hasShrinkwrap":false},"0.5.17-e5d8fba.0":{"name":"graphql-toolkit","version":"0.5.17-e5d8fba.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"e5d8fba9dbefdccecd9d1e2e775f96970f9c9e0e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-e5d8fba.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-uVeIuMe656dpDSVz7ioDjAbwYBVhaXZcus7+EMTFI+8lnzqskFdT41JwvOSQW6fED3vfsiXhqBxqMTn0QC+8uQ==","shasum":"c81b70b7a9b9eb6ccf6b95c57b418915b8e40b81","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-e5d8fba.0.tgz","fileCount":258,"unpackedSize":411252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdliXCCRA9TVsSAnZWagAAlrMP/iarLZCkNRpsiZU7kWLw\nwHGzkd8rURiUL7/1IVQAm8TLbME4RT3RR07GElWyZu4zEUuQFAa8fObt4XFU\nUtB0XbI9i+uLbmu49KNrOQzwU0VJ44OnFcuS4E2ynAuirwDYX5Qonqq0XxtJ\nXVD3wTbCyoHv4KSfj7n0wImeFcOquaPb0OcjOGDIHutR/trFeuaP/YVeJzHH\n1BXYPvu1SLDd/SI4qPxx8n003UEwdP3yx3JLL2z1VCUTVHCLmtTizSXlqTLr\nB84IRLpQfR/HsaPyE7PG71nMNUOV86qq5J3M0t7zoZp2BuJHn/qk06zci54+\nl+rOQAtNXR3Ulv/KWCn8cqLOX9gnTxlzYKnIk5y5dPaaeBKznDyTDhaz1FAc\nAwkmrVBbo9/tixu6FFdcC9QsK0VllgSUId3snad8H92w3Jv4I2ok9fgZUfPa\nsR1M34yFtuI7smMu2pRUl5R9IslUxVg8n1IhpeWaecNOz9Y/9t4cKpvqYJuz\nqDey+VTAWfxxOlnv9HNZw6AbTm5Rfh6rhd2XViBx3ZNyWYGcHBa+9B0SgZ2d\ngCwld1ds7tXdleNl/ZaDGGb+LBbBKZ8laTn1DVr78RVk8SWBr77NAW2N2hXN\nT5V2GkbX0zzCXV62WWCEb72OBBfOZrrRylQOjGNqNNypUTJEnCRvvzEfQeqI\ns44/\r\n=bWhI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD58x6Goq5PBLNOj7BQsq0A8w1W4RtwPyz5hrQ+scA1XQIhAP0306w6uR8mXXonYvN7+CoDWo9QaPWm3nyVqVV3zAzG"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-e5d8fba.0_1570121154074_0.1823273595433612"},"_hasShrinkwrap":false},"0.5.17-a46c1bb.0":{"name":"graphql-toolkit","version":"0.5.17-a46c1bb.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"a46c1bbc22516a76ae7ad9a3d93c7c0c88cd42ae","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-a46c1bb.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-gKE6Zefg4OOQC9KBzBWANvZgOlrjgQZDRJJZLz0DrMAh3Xqy0YdBG4ulAbaj5S6xnYd0vMcVqx1crw1ihluKlw==","shasum":"eb14ab79ebbbf1e8a99443da41f295256dbded9b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-a46c1bb.0.tgz","fileCount":258,"unpackedSize":411214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdltz/CRA9TVsSAnZWagAAgnYP/jTHcK2IJ+qSI/n2SxVZ\nGRne9pqnXIBasVpRBg3bLsFd5zneCpfQfnv8/ADTR8auPhLWcKrhpX43Xe3G\nnNVcUxtBZx7v1voNgI4qso553qUzW8Dsz3og5azEe/3R0d5RQAPj4u5QlhU+\nCtxYH+QGrhKJpeHznCCVk8Let8JwkSQ4DpHGtYqTLtKOpP5Ol4SQ1OgiieVx\nXe+aR386L4Jds6iHHuxubVZ7FUuuL8ec8Df3VBUI2xvJxbW6f1Xm9lvbUjpQ\nls8cQsabD0Tx/Gj8kjymjjv/zQKflfvSd1LAoBLm5fp0E2atLozQtovs7vpU\n7h7UAJnhhCr5zcsMWKuAoJoMNJSzI4DuiCu09DkCG5ibLSWqlhyDZdI1dFC4\nBSe320irsKb2Gvr+8pavOO+3COu+rdtvp0TO6B8KojZ+rINU6HpVpF/bdo5c\n9ixNS/Vu6EADjOcXePQ+GJyQpZhLS9W7BWOo0WBmGBr/TgvzZfY1gOrEG55t\nR5H6dqGL/vdmN7yO/R4/AdPDy0BtQq27XW6C7yFijkFNPK52K0XyHAG8fj5p\n2E6adLQM1jpEwArUNpzlXEtDVdzuTrWtJJHmZM2W/MV7dcgXnMnhsQoRACDz\nGFb20dmucuUUrihdDkeuvRc1xWHup2nGLoSc6qyr6Xw3h7tI80Pae+/BM5ZC\n6F7a\r\n=VYg+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAMYHaxX/wkCoxOBZA3wvAgjj5UZl40NVXwe1s/5K1FLAiAyegmItQXI1BpVNj1qFugOQuukVq8S7y4xNZ3WjzXz2g=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-a46c1bb.0_1570168062545_0.23496430713322658"},"_hasShrinkwrap":false},"0.5.17-121fa00.0":{"name":"graphql-toolkit","version":"0.5.17-121fa00.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"121fa0075408845817ba6fc3c701d451214a3cb8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-121fa00.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-cqC89JoMfh5KLBesc+4gaYKFso4cn5wPL8bXolfanqGdWQhCTt3G3sGxaeTIw38Id85stfSiUa3MOuD4UyaM5Q==","shasum":"30f30225e569ec5c56d83167c4c3207d429e6321","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-121fa00.0.tgz","fileCount":258,"unpackedSize":411254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl3mKCRA9TVsSAnZWagAAMOEP/j+/WEP+ScfxgX3/ocOp\n9APXzwW0xkUHsegTX0ohHgXa6bV3HfkyS6SW/UHP6QQZSf1iMefyNUauSz28\nAAqPFfpIJ/kxLEFd2rYLtLpfDIVKqx7fByegfGOfPz7sTI1vSUxNTaxNWJgd\nbDVaFHOfq0rLIG22T9XsFVVupPkTSaWoRK3uIA7K5eq2aEsiGAuB/edHxGvD\n94PrLjGWei6uLxzznWxC7kPoJQYTi/K7zwKpnP5nJ3hvjiydPl2MqmCYyIZC\na9aG6m5Uku4Ts2rQWnBD4A7GbVpw6injVA3S/MA8BMxr3ntoHbLpbabJJvwK\ntFMocJz+BmkAlPWYnh4TjasDIAKHvU1o4pN2vgjMZr/eSeDD4ew5GbLOCijf\nqcZTyc6tZFU7vp6NYaQkagiEGqTzlKIx+mt24MaLtcahxTxdbtqnMiIcx0hc\nIIimg4X4/EUGpxPsi43HB/IUPSv98edaEKCnigmHt16VVueZlQ3QHyJQgw0K\nLw0dXmQ0JB57+DzOooFToiHOM3g37FiCJ3qJUAtVLaT8NpFqsQW9KLYhUopn\noaBmcmitMmfdX7+esr59XKRDBJ9bNhZktjkOUlGOuSMpqpu2ungKZC95uWNt\n+y+y2f3wZp6CuxGkoMAj97sMo1AdF1mSHXrRsVl5R0A2i93v1hJhrPjxf122\nxpp7\r\n=DdO5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYhae1NSDa3sjZ7q/bqEqpgLS0eqIhI01eL44DmkbV8AIhAJdieMDKTBwZTNVTO0lLa8yidyfzQUchmeVhBZIsC6sp"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-121fa00.0_1570208137350_0.043897440323994896"},"_hasShrinkwrap":false},"0.5.17-720220e.0":{"name":"graphql-toolkit","version":"0.5.17-720220e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"720220e99e77b545416407fd1e1a797555ca6aec","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-720220e.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-He0eVG989PH7ET5BNrTa/KAwLDRgqf+N5xdBec/+5N/pGjpA9GZDOdnDmxf4MuSvO5mmyWIx6Aa1LkRhewhOGg==","shasum":"35558351b52349b8932205c0a94c48b05682217b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-720220e.0.tgz","fileCount":258,"unpackedSize":411252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl3mbCRA9TVsSAnZWagAAmqYP/inLbAmR/uW0Iog/Ioh1\nQk4DUgx/kejmEi5IPixwVPNEDaZAt7S6hFhHuRmOMOtRz3hmiQOq2x9M48ax\nVRoWPoBPy0ceMi7do1vGJBdY5z/idQZF3znKmHBmIndZ5Xa/1AuckaJtGZmO\ncyFnqQSaZjJbsgaP8OpIrINKHacuQENAiW1txC/le1UuiKEASncWDa+r1hRw\nMUFHapiRzuGbTS9EAwG9veCsIjAdskgoWct5nfFbm4FVcUv6D4x9QKeQnt5G\nO6lc85RcUZLMDYLRl86wAnsnNdsX4ryzVD/XGd1umSs+GgrqFnqRovq+I+AT\nagKTsOsIFnMZGzskMfFgdgD/01Pqe63Z4NDTD6WMsNO2ua0c17AAscpxFRr/\nQeTttzDDwww0n8ZKe6MdKixH9FiJ/x0elnBla1kFsOcvV50Ob4FjyawTcGTS\n5yY/LYsBwzDLChrj2MD2va0zw2lPy5LnfkivCIh6/euSq4p/vKqhfoEtzchA\nLxGg6Axc3W5tnynHxhZnzi+byDvBg/ITMhh9ck+dmXjGEnwz/j7QUtPpvUpx\nTiv4CXlGVft76X6y0lL3t0qr2ptVwCFVbnNMDu1t+hHfIihnoUs+x73FLpxb\nEhKyPIa8BjlLnu8imYzNgUK8obxqHnOSa5f/hctjPDutpXM9dL04IbOV1Exw\n8ffJ\r\n=r8iW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDghfxPTP28RU64oL60Q4C11mXda6MKr52m1HitkHGOpwIgcoT9fWZ34yN6SozVmJ4zpMIoY2zuX8ZUGVpemvUk4Zk="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-720220e.0_1570208154820_0.5367236142752947"},"_hasShrinkwrap":false},"0.5.17-ddafc4c.0":{"name":"graphql-toolkit","version":"0.5.17-ddafc4c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.19","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.0","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"ddafc4c8fc203a8438393898fc39b5b4b0639a19","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-ddafc4c.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-6Tv1UYn3rGfEFIzYinJUwKRD7uPB9rs8aEJ3+TWygWXqfcLY7mtJ8XwgVopBjseZOQhE20M2z+RBQ5qsYca3zg==","shasum":"e41cfa1b63c11b5d7ae33c0dbedeef00332e0274","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-ddafc4c.0.tgz","fileCount":258,"unpackedSize":412076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl4WcCRA9TVsSAnZWagAAorIP/RmT0yeyMCU3jFCIIBRe\nHZ7q3em4LH8L4Bh/61uddFH7gSK1mR+TxHpUQ2zlZuF7KNtfNFk5q5nmo9zm\nGpbGK2zuYLJEO2UFM1qFBmqrg+7ahqxzO5a7Kb6JN8ZYlReuzztADvRv9Y3p\n97r7wk/h5WuKmmAeaB0Wf2oqcwSc6xIVgV71r05aAZ4hp351brYMRYQINyeH\nrPHcj3D+aQ19x2sy9IBk6Wz3US9KtDGkDN9pD3RMkIhuVEc/GCxoASvJTLvs\nEVu2M1gBr4CjJJmAaNSwnKymYGo1OoOQ+dzcNc2PLBrDOk1E4cIsBa0ZGGEr\nkBU2pNtoPxWcGmGFxDoVakItLy8w/Kv+2Sohd5ciBUvZ49gshVde/XSo83Vp\nu6dKEFE3MyKkunuE0vzXg9E+L5JOy6dsnEwMqL67/opPjSWtanpFMqYkD0L0\nHL+rzh9o1ihOCF1ELDhVIlp3YDJo0nYTlm1/9hjH+GzE2JtpcyM0b7+8O1DE\nZwH33EjDtzqWgOvEVjCuOSn/O7eWRQZQHc6z50Tk5rhT40Xh49cxKVtT/64s\nhGDujdy4x3JkSOsOD9AHTALGYga7Gm7c+efvjalFJuzg7HJ+KRy7TLRqEmgd\nKzUNjSaLox77ZXnjoQh8r4nzmJgQUmoopF/unraUpJeySF6jYQgYNfc8mbRm\n6Wt3\r\n=4NEv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBadvd1n38FwYM/2PFIKlvuxYr37fRb1Y2fmZ4qpS8udAiBlvIpojwvtlr3DdBJ8kslrVsnL5YP5kTSf/dq0+EAb6w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-ddafc4c.0_1570211227994_0.6361029849891502"},"_hasShrinkwrap":false},"0.5.17-bc47b56.0":{"name":"graphql-toolkit","version":"0.5.17-bc47b56.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"bc47b561edb1bf0316aaec76481265d705af6809","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-bc47b56.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-5kExpZ9qOdSmy75de+IL1jSIyW7De1Q/jfAaleCayYLSbDSB6NDwFwfya/Myt/4wBfH9cdT4r2TguQrxFBB9rg==","shasum":"54d02755b4753281582555c629d2bb41482e0155","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-bc47b56.0.tgz","fileCount":258,"unpackedSize":412071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdl92/CRA9TVsSAnZWagAA6GQP/jsSqvwVvQrkv6ZJleVM\nEBgYzqizYYN5TLtfUIjDVqc5A/+fK2puePcntoyyOQJrOXpV7bhrDs90jLyo\nYfAKX3Sde6/Lwz8ruL869sd1mbI8ns6bZsAzWsVy3QpEJLWFQVzkgrm6Lm6K\neggaJkuvWPcKi5vXqx1fXazb19hoT49VizCIAnqj5AbbfmE1cYfomHRu9gPD\n4PtEJNCjRpmUBP0vQAQV2bU1e5ZKBpDSX99+YVr9piUgFvlKqb6axz6dpbjC\nZDJJ/3GjPJtRPzu0mfuE4QxtkObRnRZCnCvBp4LV8cBVN4KsoBUyieU4A3O2\nFEmNG0aP1NCIyMXe/umKb+yGkSzyIFU8ptoyuzqekJqdjYUYGj789EcTbGLb\nnDql9ZFL0At0faT1i9OE3VyoBdtQRnrVxboMCFkXnEz3z1MMHI0YjwjdUafW\nAOlXHFbNXYRzfkrPLQY2UuHAMxoqeV9R3lDGqf76MYkOoN+xOxT4QzFE5bwJ\nBLX/XITzQIjDvgLudKvPya5r5U45mxLznyv46stJjUETQfM2gHEiY7bRBD6f\nlk884B0796GPmAeD2iYkk9uyAZZKQDW43YNVzP9UDxKYth+16EBfkVVAcW2N\nKIOzm79YdWfSdrLRU1rk8nfdiMmsnwP2IENXlbnGmBC9vx3XK29I4pBA8Wn6\nT5QC\r\n=08rW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBe57TScokekd93CGsYV/hSGrx0CcAf8WakelZIN2wGPAiEAkNtJzZOT8YzjmoueYdWVYfv58mwkDJvb6xQrzK8M/vE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-bc47b56.0_1570233790628_0.8692662216768847"},"_hasShrinkwrap":false},"0.5.17-52cd55d.0":{"name":"graphql-toolkit","version":"0.5.17-52cd55d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"52cd55d5411bf0410ebeeba5003998c12b6d05fd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-52cd55d.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-U1LSnIvZoKvZ2YyMyqLGnp2PTjA0bygoKE516lq5wU5hOrpkOl5Iun8B6Qs/cNSANuSL0LFg1a0H2TqzSyrgSQ==","shasum":"02edcc6da58e97788ea0bd548a02862035271285","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-52cd55d.0.tgz","fileCount":258,"unpackedSize":412111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmTW/CRA9TVsSAnZWagAAph0P/A8Upf11r+obeduHydli\nYa9qSi5R8KJRupy+pvmDieT5kzfpUbNPOVzzSyos6sDZwIM6Pv+yRzkBjxht\nJcr250kr3yr4UdxBO/N21FveWbAzuIRTI363dfrsVUUnG2kKwnnPuI7HR+e9\nw2rhlck9hw8WidrcD6oW1F6Sr/bJ2Bq+4rKmlMPBrECn628d+VYdqKEl5icd\nFzULIGBpP3cBFAyIk3RGg6NHVQTaQIdM/gtWBcH/Dwb19u+BihTVhQnkPepZ\nfBxLQBcOpcfDQfDJG8aG+8OLCz75Zem22sfs/Wsy4fTX05cKtnmpQ1R4CCRV\nKj+owxxXMEZ09dqzXwovjhBSR8LLrAM1yoneB8+C0Fk+HribzUSsYW8WCbLk\nQ2xogJOcRL9tVTTBeYgXrVJs92woxjkO+XxlfGOGHecGSt32bxqEZv3rN7aB\n2zy9+BR4QvU+1koVpItR4DYNh1U9f2tzm6bZo+f2jP002ZBPLMbbMBYd+s6Y\nZLrQZWzg4DaaoF0/7leFkJu2g6HV3SH38kLg3e8Ot93CTx31dyDxw+ojAt4e\nuVCq0R9TR5Cm4ohhRIsN7088hjdfWA3f4iWwrMAdrgsE93lv2yoacUNNKMAl\nAn/fDs0Odx2nbbYW+9H16bD3stOvo+LZcgoelsJeWMhTh4IsgmyOpLPTIsvf\n2m6j\r\n=VkJW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHt3npn/v7wsReh79g3F/4+v74WrQ6SbFCd9khh2AipOAiEAiHidMPXzhvVjwW7DrJ5RsqLU6jnyZzKd9Vh/MbS9JFU="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-52cd55d.0_1570321854777_0.06877216953781562"},"_hasShrinkwrap":false},"0.5.17-7cfcb79.0":{"name":"graphql-toolkit","version":"0.5.17-7cfcb79.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.0.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"7cfcb794baa173128ab8cc2cb48b0b9be2b091d6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-7cfcb79.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-HyHa8iB/s29Au+96eFTIdgRHf/OCrhNWrq/vXljDGOqYElSsOhxe1+Y6ZeXBywcdHIzJuWWc2AxyXmXPln2xBg==","shasum":"160224f00c07094b5f7bc3b0b08120b9a331535c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-7cfcb79.0.tgz","fileCount":258,"unpackedSize":412105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm0wPCRA9TVsSAnZWagAAcNQP/i1eYiLbFi6PBSOoIcOL\nWqaZ9nGFWvIP3D+nVAuNTAfYqQco//350q/3NG0c7hWjY499KmX7qJsaw2fQ\nRZL2WQbnWPIx9jLKTDxMfplJLIFjxOVo7vJTJwP7K6q+kWLd7wlloNXAMo2x\nr3fWAbxCI9e34hUmlYLK3+4YlZE2cC2wmk9R4ATcOntSAKQI8UXqdbp2k+kl\nthWGb8PLf3ptRjHAycQCUMmwzarGoEa49PotP/hgn6yX5qIgU8VtpSda9RNC\nQ+I6Z+Z6OLRLiS1b1It/LmJuqzeS4L/LiTl6rVcv2xZxXNTuFt1VnJo7PZOI\nIb7VNRxgFTm0xyQMTYXltztlo1j6WTC7/4CopgBWrxyOAcifIk9hZwMSWGY2\nXhnLcxSLv3rb9P9b1yx4YpX41MeyYe7VNe7u+uFUYzEBLt/k8hu26XnJnv2m\nbSF7xBnmOuYXQAtbSvfKB7WaE3ZUvO+b6AdkIc6Zs3kcv9nzwCyN9LvoqIE6\n7aAHI4RMzN4hhEwWGb4Z36YVeLxjGc4gTSWYb3A3fs+JO1fzcWVA/4RlJGQg\nj0opB5/Wbu7ebkmuoBWre7czAeA2ZQNDZ+PhplCBdEqmvZMIvnmcIgb/WxGA\ncwCB/bhVg2ZKuGW9jplxyKPmxDRfheaESahTtc6t9XC2qiREx6cbnxFwFvlE\nQ1JF\r\n=n+mU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB0cobRh7W37V9mtRJ5EMjIqAkmVulD422fCg9dOW/BxAiEA/DZVd/QdfiQQqamMmGc51oUnwR+AAVTUir9g/Byyg+Y="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-7cfcb79.0_1570458638324_0.12363384034413594"},"_hasShrinkwrap":false},"0.5.17-aa23ec8.0":{"name":"graphql-toolkit","version":"0.5.17-aa23ec8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"aa23ec8c30c4db690d2e81db6cebb539c99db2d1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-aa23ec8.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-IDqw1TJyqZxbGsflbG+8iuYinhYENaBLRfeE1OvGMnVdyiw5kTUfB+abwvl/2WiLDLDvskSGe7EXB9AHAtztew==","shasum":"24b3b500655e9be2008c3e633e9530cf32f15fbc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-aa23ec8.0.tgz","fileCount":258,"unpackedSize":412081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm1L9CRA9TVsSAnZWagAArlEP/A9iNeAjy9zc9fhkJonJ\n36VodJKvz1W7JXYLb7hJ4YxNVK9UQaJ/qGjfEnkzY35+C1Pu233GtZsbL5Vt\n8/hwH3NRWpulen7hQV18D8a3rgZFZMNLBTTxPM2oqs58XfN5WRypzPQLKvSk\nRL48fVNU24ubowmP9+GaGC5Y8FdpD2UWCrDiyZigdm12L1R7d4TpvPqD9Llu\nIVcGmYdnufLD0LpO3AygDc5U3Qbl+iJU+lzI3S/W4rjJ8wgMKLFILSG8tmYi\n+4PzShHnohTCnT7JwII640/VF93wpzeVPblvJvlIE3n8gxp16dKjbNghNUHg\nR8acQl77zGxBv9IVJuLMEdVXF2S65wb8k8D8kA5SjjklA3gdz8ndix4xBrAy\nADGMcY+i5+GTEx9Q+WH6xQ+xpq2CnE5qNR1N73BqMkbSYFdKtOjt43YCqWBR\nFppxqM7Uc80yeokMPUw2bPSLmYCQD6Jo/glGXEXgavq01/YSQL00lfDzRFrx\nksmlaSGI6AhzCVDlMwjZKzuH5UOOXDdR/tmPQsTzMZrllKX9V6RtWqCctoGh\nGD8mKSHrCJzGKBCjKs+K/HMfo5RwCzp+pe5VNyxYeq7qpsPqkzUd6oussP79\nZi4xU+GYcJ+2fuMFUmdPijhh2dKG3XOb+iuIq1vrrsn1iM+GZ2pnB433BLGV\nVGAJ\r\n=3YgT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGNB/mzfM/wYftf7zHB1cmv42hPUHVF0SNqTvbfI41nAIgRhhNJIw4R/o4tbNWsPh4jlFKR0D20nimBNH/e9yKwVs="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-aa23ec8.0_1570460413124_0.7205498470344802"},"_hasShrinkwrap":false},"0.5.17-9025080.0":{"name":"graphql-toolkit","version":"0.5.17-9025080.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9025080d069c1bbb8345e60b8a2e8a27ff8cb268","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-9025080.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-WcctWkvZI2J0VlcE/4NFnKZuFOO8pqnHKkuGxpEubCTKx1mK/U4Px2d3E+53MS+461TSYjsXywNonpb+qunJvQ==","shasum":"31db38f36e34b7d53877367d3d38034a6acf5fc7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-9025080.0.tgz","fileCount":258,"unpackedSize":412090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm1NICRA9TVsSAnZWagAATGkQAINr30nstCung5lQ9a2J\nQ62VhfCCv1Pqo8XoPSXeFtIGbsey3wd8khqdcezRWP49m8lm8Ldy0m6ceLSA\ne6KrVlnySF4gwqThuBTzIA2sYXINzVa7++3dY+sH7d1xJgDDrkzftW9tiX4l\n2+PJHsyMv3UJGRr5CfSp3zJ9RNSFFBCvfKK6CBWzVZ8ouszdRpeoqQeqUj35\nw0Mf8gl2XOIsi4Jh975DHtWV53X1+QJrXwH/rZkbz7xNl8rrVtaIV2rWSsIF\neyDXi1IC1311ciN1CBhi9LQlRS6qdhgutg08mw+cbQwv001Zs6mdVJTwec0l\n3gIBrj3YoeQXg6p49KfkR/kd3wYjtxPlxm946QJivgoCwfs8fkSBvTKUYUku\nKJlrA7qEfhe9RaXErcttYszsY9H8Ic/icVgRY3iC+lmY/5zXRcUL+bpFJpRq\n9lOBGzTDLd09gvGxq/tu6/Ri6jfbd4wIMEPE7jbm7PUXQTPR5PEAw62Fo2jy\n9xTOy3L/OctZMasJk/wfaJkMQS+f8MJKGDtUocUu1tw9gnm8SpcusLfuJvvJ\nPtGrkxrISEWmxi4OEROOOtyOIIwITfHP/QqD0LqpdzbR/Wx3ms1hhCNPdrE6\nIOdnDFGlY6rhPRKUipN8Vso7EWKV2kfW5ZcH+yAtNyH/0r1D/wkOF2Xv1UVw\nrYrj\r\n=wqxl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNahTf1DWoKk3mdcYMGv9RS+vVMeLINIyqgqxmj6MA3wIgVbX8Gp7DdkBZoPrJisF71lBscfwB/pqgSNjEmzUVnbM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-9025080.0_1570460487906_0.5984147567660638"},"_hasShrinkwrap":false},"0.5.17-d52956c.0":{"name":"graphql-toolkit","version":"0.5.17-d52956c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.142","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d52956cda9efec189c79037c1992ad0509e3dda3","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-d52956c.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-Mw66pBsy3T9nG/gZUR1wGrTrQCaPaWHe4xqTZatrN33iHgp8jnAqYwUsnIRfy6j9/hcsSYH2UQ2utEhJFbY5Cw==","shasum":"da72f9e65fd418955910c8479a0042366269bdb7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-d52956c.0.tgz","fileCount":258,"unpackedSize":412103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdm8zcCRA9TVsSAnZWagAA0dMP/07oQN7qyw5E54CUmTHE\nHEkG5VgWf5jYR1wxeV8jVL4vsr4bWawxj6frE7tVtDr3/8+GZrsEsjHk+X0Y\nfJEGL74+RCjGVb1XpkHt+dHvqHahvS4GnCXO+vkukUu1ySfvitIGlgVlqiFI\n/53OySGkek7im29FQ1AwcNxOsacCI/O+I3LMWsFAq39aE/jFUPMxSrTRFYUV\nFmjbrS/GrTEFpY86bb3+39w11GCzAxbwv9Ev8k/yquKGW6OznbKtzfxM+JvP\nVpPfia9pTEo5CAyRTTcfCp+ik4atulZumVy1RUuKYPZSZYSMUviUQQxNUttQ\nb/ouwDvrkGJ3vgiG6OT0+WX2nAcO/+kzNQOnZZp7TZ8DmyKert8mkOX6lvuP\neosqua4f/OmcbScBoJt2+k5Q9XjHGrF60cpztin3C8AlrvvKmKvVdOfd6Mjf\nIvdSM88pD1GUo7LkOzhqOb6A5rAFaT/0pGvnvPNuuVJAdTG1mXxswuY+8L0z\n948TIwr62ea8MLfDG0APXAiMBePOFZ6mr4hYxIovYh8li4rYsGhNsJnko2yQ\nudaotrAti0W6pnrLUJ4lNLzrBbz9I2y7n8/1f5ehvewvpldSMoQSyME6bxlm\ny9Pz4jPnIgZUXoDMAjte9AtWzk29eBpvZc6NIKiLnJ1jq0eT83ib6JluGeX1\nu5aU\r\n=iurB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCApg4EpIXMqgJiTpCPfVOjFlA9vpjtZvQ6wlv4WaKcGwIhALsvin1s2Ae9Qyxgn5nBgq0mho0fwjI9XL7FTeSH0DzX"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-d52956c.0_1570491611740_0.8033369574280649"},"_hasShrinkwrap":false},"0.5.17-adb48c4.0":{"name":"graphql-toolkit","version":"0.5.17-adb48c4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"adb48c456e34ee6beff4b78101edfd296fe0860a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-adb48c4.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-TDPEu0JyvVMeh2iaeVbpwX6QFPetqVDBU05JHeZz9/xFsaYoG4+nxU3IXs7RKUqr1/gRBwn7jq6/+eVAn3eQJg==","shasum":"0e32f0f9bca8c4b9f579fde4051ebd2b0591a3ce","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-adb48c4.0.tgz","fileCount":258,"unpackedSize":412087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnKbaCRA9TVsSAnZWagAAwDAP+QDXQ+q82GrV7zMORbjU\nNZMSvQUcMAK1+pEX63a4RBaLfigW090diThpbLK66njJOMfrNSqRuyJ+ndLd\nqSrRXDLPOSY9uINYTo/iOJduUN8l2R1J46NYMlG7ng0/d/MlONFWrYrDCvIY\nscCidpjvehnjBJTFQAkyHwtcRLuMmbBIWJqpWhfHDsb83xJgxPfTZTYghtRH\n0KKyz20iSkAJb8DJltWA3YRTvju073WZy047x3gplvLeiB6zG6/foqKzH7v3\nIKsyWoRsIMe7Bjwqe5xrDnEhDIQ9k0k2HW+KOBaMQv7DsRIQFuEw2UNx/G8c\nk/KtqA/9g2dIjD+/K70kQf+261h8r4bESCHCKrzVAj1aHnlglqP1HLd5F4Dt\nqZAqcG7hLXw4vaWScylOpPjhM8nwKtp0eOKxTAt7Lx8UEn4vieShbV7MEVI3\nRFZGZ3ANnUK9kR+oXwGBKz2PiOcREY95e50BnQCrY9EvWdORID4il3n2EQnD\nL/9XoY1AJaRcuvGhNnZwRXIC/zz4XrBpmiRaz+EFgGNYD57qL5oHUQwleFgg\n8kfQ3DksaBOlAHR8SeB7D1Db8haWBuMfelj/MqfB7tn771M40hV2b5Yhl5sM\ni0+7trUzzSTLWmlbIeNUE9yPaUdWj4cvnLs2pj9CaG/hlrZGEQlHolrUPqrx\nUUAZ\r\n=ekCc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDCeOK+FWLkKgnjGAW7sIKTP/whfQ9c71OHhjcHYjLgXAiEAqg/YL0Pf87lplxtM2v74KDnEZhSrxzm93cSXp9u/d6I="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-adb48c4.0_1570547417532_0.6781817724431196"},"_hasShrinkwrap":false},"0.5.17-ed70785.0":{"name":"graphql-toolkit","version":"0.5.17-ed70785.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"ed707854f8d4652af212898470fc3697bab738cb","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-ed70785.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-myk2jGwjBFNH05zi1ccjJlNNDegXIYdG46/gUgd83UjiEn7v5r1j+eXXzi4A8oBBcFxO3tRnSWw4oNBINNtMsA==","shasum":"01c5b146cbfc8d4d9930275845d14ee05f487c1c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-ed70785.0.tgz","fileCount":258,"unpackedSize":412087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnS3lCRA9TVsSAnZWagAAsyQP/2ctDZ1qGnF0Hl4WqP5w\nLmxtObKONz17W9zpxUj3cAG9YVZfcj31PCneNAlbwTi3bUlFrUb+wJckiXXj\nOY+KdOQ2sR4Z7SaoSucFNjXzhNH28oxFCCC9iCvqjJyqeduXOq8D1Rh1kKlm\njlYQEbO/ag9X00DJxFfXYvjNthdbttOunVaFAG4UqLCP1vh4bM52XlX3bLmf\nwtarZs+AU9Bj0mStjOwBoQoWXj+QcYMUQq+x8edV5g8Ljm1VxA78KVadHyw3\nbXDZdF+8Y+ZNXHMXJ+A+liTsuW0N0St7KjbNu2Epjqi6IKGGYaBFEReF7Wqr\nkFMCQ6FrYwwXFp57Peu4F1+MQC8AKZH5JXmZNM81sETfWimkNtOn//WUi0ZF\nvsaYqGl/y76CjXkJUM6BxHX8EIn5N0KQhure23V+/smE28edbZg0N2q8liGB\nHUwX1zGz/jQ4Kef8IR6IzSVrwbWnDpKn+yO2j/rv29feAnHAZ+Ni2eHItKyt\nZAENR473H4qTiYoV0nj1+4Pe+xYAtuORjlYA+xV1rtpY7LKZarPoQcHZBAKB\nw35mteUQjmLqL9dqfwfYZ1HJne0l3fA4OIqRIeeTy/wAFRiTjhHbJ2J0OK1F\nZpGCw04TdXDVKVYZM4TnCa21rcBwi/HHMabUTNP2Fr6BdRS/1tHtETVSYEuy\nHGKw\r\n=Dwko\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgz4Yygvui2sMMBGQK4ghtzRNS6foSjWTlSlTS3SfkhwIhAIa1mPwXjFy6WOuLwIG61v4BabohhxnC5DKPOcA4iJq7"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-ed70785.0_1570581988596_0.3284233811822197"},"_hasShrinkwrap":false},"0.5.17-226da12.0":{"name":"graphql-toolkit","version":"0.5.17-226da12.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.143","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"226da120ea459958b39551d69336e3807ebd1c1d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-226da12.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-q1PKUNOMp6SmE7+d4XW7ooUc/Q/4pG7CaTivbCJOA163jITN9j5kdLX3SKroc+Q1XN1WnVT9njAj92Wx77YluA==","shasum":"3f157e996b74e523c70841b50195a308b49b621e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-226da12.0.tgz","fileCount":258,"unpackedSize":412118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdninVCRA9TVsSAnZWagAAX1YQAIfhOo3dDysaz0zD5p7y\nN2OR4kNBhbgV1kUyeyjJ0g6itIUwqjlGMLicJfy4q3JAa23HcDKobS8Bc6Cs\nH+/w4nZgAEg7OLeXa2PnN1BIqL1Kt6LjuiafOeEVT0uVqePr+Alwf1Q2goVV\nu1v/ZpSTBlhAniI9g6kAftz6/LtIectxRVyN4WsofR/1fWIqoD+rx5e0WmYH\n42EWW5z0aEJ4dp6sqUk86+TYQE8RlZ8am0NZWNpkH5bD8BX3haTZL8+S8J6t\n3Yg0sawkv/kxS55316bDD1t+UIEEyZQIRsfWAXRKBWVNeH+BQ5/x6pJScHC4\nMIpXwbbTbkghvGMHmEE1Obulql0WIcrmAD+riGwrV5Lq953aQ70vwB4xypL7\nAJRWiEPB0QvHiGSo2FEqvDBINGWYtCXN3yZcmNYItP5POCpkT4xcMRzL+XiY\nnQN9A5tdbSQemJBzTEIkj4wB3L835hKDfUHs1SWub/3lRUSwZGFhaq8Oh1Yk\nntMUr9OQccmUlg7wUjtEvz7dKLbY++qApLH5ds+A7L3OtxKJr9VTAithz7IQ\n3rz/iJaiqet6wRAjY8ww3z4dAUjCdfLCUPku6Utotd6aMbpljbYT/Y9g4TWw\n+tMiCkMkG42BEU+Biq4Fcp2MceTMF/59tb9wjzx6EqJOZDSvBtxR7rQ16m4e\noMh1\r\n=XDTC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFVs+QMJQWEIA9gZAcR8HoY9MAIqpMqQTPivWeaVgxlIAiEAuPP9VIdwBa5yKvVb5cWecI370Lir43n8oPafYXhxXZE="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-226da12.0_1570646484927_0.373698743107312"},"_hasShrinkwrap":false},"0.5.17-127bc93.0":{"name":"graphql-toolkit","version":"0.5.17-127bc93.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.144","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"127bc93862a4b6dbdab75c40a8bcf0e1ca6c72d5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-127bc93.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-SQL3QLxsnzvb2/l2LpqacuJFhcmW03ksbY8kGDUzheoAFC5julwMnxVA8E4oC24Oa90439OtU8UeL7X5q9tfxw==","shasum":"827f86d0325abd173009a36fd994b01bf00fc977","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-127bc93.0.tgz","fileCount":258,"unpackedSize":412091,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnjT+CRA9TVsSAnZWagAAJtEP/35efn7h4ActLtJM0RXg\nUwaKHLEb1G50F5ItF/WbUmgXLXV8gvAeVpoIoVLn8MVLEbZouwh4merxPVB3\nPRz4YABYPJMOEjqLf3Nr3Wz8OkdYbJJ4wO+5nePWHJFIcG6wB02mPEaM/aYJ\n6D/JAxkLyJVfhPmXRYgTwtYv4D5JBPoMDdH/DZNwXAhUXMuCZPcmvbt5NLlC\nPOnKK1TP7imvi8vP70hdHetDOeWErSLPT6l4cFG0HhWAWke5h20lcC/SGgVy\n5vL3AjAFc4YtX2RdAQZEYjQc11x6lLdss9BM9vl9HRSgNhayBlfAacaNrimR\ng6g7gMJWiU/Tu8znUFlSI4uGOjW/iGsv/mzEz8Oq1adB2rT6E8VPLqmDnX1X\ntUOXvyTLwYBV9lvz4WK0OtK8YcTmSvoCb0Fcqivw2w4AcY3gqNhryvDsgQkG\nMuOYy01ZTPH6vk5kw5bWxnqGnoErlDM83xImQBvNoYs4IiS1U6DaHQFukN2E\nrUsumqwJFk73L77QGG7ZraQPFz4HmU6sBeEwZ0HVszVN7kbVbcUhIr5Yv6qS\nn/r7KNz/wcWWIHxYP0uCr0T9liA4X8Y/C7p0EKSONgBNrOJ2dEDhmnYz9v9K\na9j0dgV0WR2LaQzfzCuJTvEaxU+NUC9Qy74+1EwA5sNriLWmd2x76f6AO2KY\nKMSD\r\n=gyIA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC35rjF5blJD+3Dbhn70kqGl7u1L/xF5edE5dWrFCemQAIgQrNuDlDyqw8uzvPtU9GIcYWuW36cN4r8pdi+VoOO+do="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-127bc93.0_1570649342087_0.3926829898925135"},"_hasShrinkwrap":false},"0.5.17-f60ea42.0":{"name":"graphql-toolkit","version":"0.5.17-f60ea42.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"f60ea4249b7142e70d8a983f89555539e8d551a2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-f60ea42.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-NSy1isLFXOq/K7PvFC04FdoLttiUYQc7EVF+OTzjNM7ruL/wxoV9SIW6Dqn4gsLiUurmq2ScARiquIwwvkmSQQ==","shasum":"a6684f6c44f7cf435de089551034fe0249da5330","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-f60ea42.0.tgz","fileCount":258,"unpackedSize":412200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnjjaCRA9TVsSAnZWagAADAYP/1aSOT86SEnYDaZXJG17\nleckldqc6Mge194mSb2IMQCVQYdXbI4gqYpCOIWFQpZ3R89FoHqG8Y4SuyzM\ntf6FodPkaGR1vIecHbTX/L2iy/RVpqzC+TwlriHWYliXamZXXloX1mZry78H\nxrxmKR7gcbkzxBTBj2ZXhzDGNeB9ZGAGDbC3HREO7ct6EHFczzP03IAQb1yV\ng1rn2Ib0jDlEvvNm2S6igZAN+sKMNWqiLaQ3YnlXVdj7yhKum7skxfC9YGh4\nAIALb4ku3OLsVfuDDSTNAOOc3fOCN4TQ3l/n6whRvEolao2NoxTRyXAoSMBz\nFUEfUEPAV4lT9g1afsRUynXa06f3Vfvr6fgXUEVOsbzT6AHILcnfHCgYhxS5\nFr4WpLrietAg+ay9MNZ22LuicI359O11WWkF9bA+6gvW8ppV6cnhbGXWzYYZ\nHKminSb+0G0cuZVk8yijUsrmHGsyWPHK0Db8CozVFGIGB4Z1RnkPQ5xq6ehT\nXE8LdnMP1TzjaFE6iUBQc72N88TeYLahDFWya6y4yugXo8BuCNh1BynDpPFn\nNDWysIuYR3+Pad3m+g1pXhukLeM4rje9/PNnlU+3oMokbtDcZ8Itbzm31fb9\n1OXwdIvYCadTp3Tnx6Bpv9JFi/exbEyUrH9SjzFtQ7QzUbDr40XhRYgohPTu\nBkC6\r\n=PAz8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCni1cguP40lNTA+ivQd3MH8tQrNEZn2jqEco8tbmWLOwIhAJUf448El4WI8WXtVoipeeRqKGMWjQnhjmt0fpCRGXyi"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-f60ea42.0_1570650329282_0.8767683754728948"},"_hasShrinkwrap":false},"0.5.17-b361864.0":{"name":"graphql-toolkit","version":"0.5.17-b361864.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"b3618645b620143f77f5177a0e0b88d3bd433a17","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-b361864.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-JveWQ0hnuOJNb6EJOL8zKCblxud1K7EWD23dR4TgIzwoV/JY4ue34B0o3/Yj0PQ0m+qRjPp3RMnfq5M1y1C6Ng==","shasum":"ba5ee20e944bab996e5f66aff202d3ab8a823270","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-b361864.0.tgz","fileCount":258,"unpackedSize":412090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnkWlCRA9TVsSAnZWagAABsYP/2HjaHmeglFR99lVgt1L\nTc4ZWmJb8+85ShH1boEs/C6pGceBY4zEqqJytt2o5+civUDG19V3b9P8upUQ\nKt94T49nIErFctfSfaSApsP5/crqr1VVyDHgeh2/DVU1ZMkh0EnARg/U6bsk\nCsELA5Jhgofsy4gcP4HGAwWpisaQLsC7e3I+RVRHtxmzCUxGKisv+I4N/s1X\n3gV/+OGznhLG8tpDukVX2pwLAITZpwAE6JcUo/DewxAUDLzk/dX+8s19lDry\nFyQSnWL3AXU6vO8kf6EvUWV3QoyQPd7dtwjrNZ5UCWCK72DqSBtI6zpxDP8a\nIBsV4lePxtkTiLuKjvp9kzSIs3/YlQxNtKMZDCQsDueQPNBXcg2GB6ncfnmi\nGFD3ax/wtFgsZo3qzstPM1IAROSnLrUWlpMBgNp7SE7lw1+c+NaNrmKmobup\ncp5oSrBhr8pQtAsOixvDMjuUfZxUGShFU7BmS9J49pB0+E5pzOvKMOQskCjG\nZPH92WtaKz3s5m1HTuEH4nWPjLdfZC0rk/KMpitVnslWzEepQCKeHjHP0jz4\nWp7ZJ0C3i0VbnLOiWgbV5RrvhzhTP+5myRLuDqCfBJgIOlVcZUCvULKSHq6m\nr9hV3j1R7OmrGb0CPwpFzli29stAXgms69Gs5fKjN7zrZvdedahqdQx9VlMm\nvSoL\r\n=Vmf2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDunyatEkcgmwJ75LmY1JsCV3mwagR4HbknB7/PLd4htAiAfzIjwxooeCAHcd5gqqLTRXH6CM5j3BFvDRad+CS+zIQ=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-b361864.0_1570653605176_0.018189833595926297"},"_hasShrinkwrap":false},"0.5.17-d16ead5.0":{"name":"graphql-toolkit","version":"0.5.17-d16ead5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d16ead52872c2dbe83408b3c5dd11202900e0bec","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-d16ead5.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-R8LUN8a/zYbgPf6Punufvc3C/VAyREUOVhmMdKGblTwzs7FGrEhsnGXFCZGzdHlDjV7ecotM+Tzc0fzMAQN/OQ==","shasum":"eaff27f232a96da08ea349d61fabe3847ffec8ff","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-d16ead5.0.tgz","fileCount":258,"unpackedSize":412207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnuNxCRA9TVsSAnZWagAAyWMP/1HYwwl7hslM8dvSqdv7\nCAX4yhVPAKe6c3lfX7CqTPRVCE/qsu0EqMAfL6PvSDnD5laB9vg/0SAdnebO\nKfszy7AuDyDMQVaZYAFm8DtDX2BkXKPn8miGtPcm5wJvbUqvptBRQfBXo7ub\nB6axMkYcuirQZ6L7RaBl+y/6XTdDud9TlordNrRLkcajvmtd+N8Qk2N9oBiu\nOmMId9U7M0GUBdy6MegKEbueGMVKZcNueZspHjoUgbHcCCTcsIJRsJ8ltC2g\nhsHcLlclm1+8l3zwTtP9tmX+a8Fbej8VJMlW89sRabBgLBMrxdBaugna7CC/\nFV/vWygD1ZIzd1UP85N+Ymq8I7GPmeuRvIfaeJHfgQ3xgMwu/+511Avbvdv3\nvK39HiZWZFB8CQ3k+vSjxErhZjIiCjQ37O/emQ9484u6/hHa/hZHHcoSJiM9\n7TO0DD3L0Z7JtPgJJDPt3wYAJzqBFNn6/AZghb02uM80daL5LMmjSRtOVwFW\nuSVZYhX4n10ZliRr8P/7EiRrWODtATF3VNN+ZRFe1x+HN33MdHiHDj+v5eUC\nLQE4NAlPUnW66fL3vu0oX6iJsKryzhLte5PyoRU7FN2MMtAYT8/5pAPMDVwJ\nXCVsOTQOTBqorcgnm0G5pmPAymDDovyV8kWmRgTAPMU2EFtA2HSukziX1Rh5\nX4Rp\r\n=o4/V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE8JFrzzdTcB3IaSeFJhonTnpcV/s+/lPtnZ8JNzSrsWAiEAl7ADWUznn9k+di57idpiAsc7fraukJ2YF7h7Xrp3eaw="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-d16ead5.0_1570694000378_0.0747135370687777"},"_hasShrinkwrap":false},"0.6.0-alpha.0":{"name":"graphql-toolkit","version":"0.6.0-alpha.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-config":"3.0.0-alpha.0","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9025080d069c1bbb8345e60b8a2e8a27ff8cb268","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.0-alpha.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-79GFGNTwdyNcIMsBfkWgzCuTQIXoTMfGwqoO5piBBY1JCBkZ2Xn0vJtj9qGqzr+CSjYKaO/DUwjfFVCtppX2VA==","shasum":"6f6d4fe0c308b0275a242d735cf5eed497dbe092","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.0-alpha.0.tgz","fileCount":265,"unpackedSize":408096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnySsCRA9TVsSAnZWagAA2B8P/2nM1BAYvxE6k9TnsjN4\nE1c6Vz4rf0aGwKM/Zx7Ciy4LtOOPaDLZPGO2DoXv2MK1N2MLhIZbtDqT9frs\niA+4mwxlVkVQhSsXUDyyJYyucqGmmWz9AE9+cW0iScUL/eEx0HUAzsxatxWB\ny1HziHB8vM7Y76WEz0Kxk0lzc4b77O8KHkeabY4diNxAyDEgZDbbvX4Ok3Az\nvm+7ufMQpURY6nqRpbtzMhFQaYRMWjOPGMIhSGmkCX6E+s5i8tkYB4KUDGUK\n8RYAyizy7trv5gGeqmcXvbPa/svQGzBS6oCLszoZfPHaVJWMdAPBkMRSC1eH\nwO28uRsGYyNzE81N0xaJrOVE+cSibSjmuSVBd1KXe1HkiZr1I0KtymsFeYsM\nBvTDDoQk+MzY46Ei0TWShMfa7Kkdw5JdSDFWazfYvpILH4Xgd8+1f8T9OxZe\n+rkpZYgEOeDgOJpDyhIkjOsOx2LspeKzZmRs4AGpGfOO+gfMZh2LoKAB4fRB\nLnprlUht4z7SnuokKNQnxRhLZ6CgLRE9U9AWR/S/mjoHeFtUkPNZHWF2C/bE\nul3WYiO0LLCSzsOBbMQMPb1C5dv2E+rEaEUJCieAafxYvPgGfWAC6BSSM//V\nHACg+sTgP/JLavdkzdSSq8cTnsHuAOOb8Gc1dAeECS4uL6iugOlQolhaQkRh\nTyrF\r\n=ppB2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOyVX0m0bJGYFwUlBiw+GWqlnxrlgCLtwdA2BqTyOsfAIge/l0XJnMVkZumxf+2AkOrcA7viTbZeNKV2sdPb7u1/4="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"kamilkisiela","email":"kamil.kisiela@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.0-alpha.0_1570710699687_0.09242854548452994"},"_hasShrinkwrap":false},"0.6.0-alpha.1":{"name":"graphql-toolkit","version":"0.6.0-alpha.1","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-config":"3.0.0-alpha.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9025080d069c1bbb8345e60b8a2e8a27ff8cb268","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.0-alpha.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-+vYUxGfI5lcd67ztMtSXd2glM6YmV0uI4xKf6l3f0xt88Fe6HMVecHzLXCOq2iBkrxwk9B7w+pjut2by0xyQCg==","shasum":"cc3d2056e8950009a469ff17d1215e7ac2d7154b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.0-alpha.1.tgz","fileCount":265,"unpackedSize":408090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdny9yCRA9TVsSAnZWagAAlUMP+QAqyzHKZPvah47S3LLh\nzRqo+S8BhAJNgqeL2yUIuevqrInIcqPNu44FnQwDvvnLa0o+MTNuILEq7dG2\ngy0kHDp3lTlEsxz27cMRNHWwF/bGH+ghM2rstu7REYXubek7jgYgrBB8RCSg\njJhXcrHGe+OJJ/7g/OR4ZL9l/owGdFx/vK4asV95l/Eb401CHuQaLH0YDKJg\nJKU/Es2ufSuyxk8Nkymoh2OHsuxi0EvBJsxLKLMfmrf2Mlc90aZgNESvWJ5g\nDj8wzEOGUwEqqDhOSqMYxyCHVlcU7nWk/HYR5IYUIcYDxpcKemFqfcYT8kc/\nFaP5dMYgZ/HxPpBOYxcpeYKfx+qJlfSVE9ECsNI2W+47iPs6mdnXUDQ/M4EL\nuNaphO5rXlumatZrII0k6+Ctq/OXRVODJ0oVWI1N60AiggZvARG4MtQLdmr2\n2uhIZeJ3a+TO4GADMp7I+PeT7RD0n7wbdSSyUQ0nIUK8WR2GzKOIQMtRv7vU\ntLqEPGSGubb8ey3bcdmnfzw88toCGD5fjXwzt1LUCT6PSs+C5odtB3wW2Sc+\nbcv/G55ImwG640OCmd/OTfphS8wvDOK7Y2HwLWTttNaFRZZCniwtjb/N8kXN\nZHiw1GlBEfdZNyV8QFzme6h2iOKjfqyw0tQkwsBQFOmL5IS8H1dW58qiCuT6\nhU4c\r\n=0Q5Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHqP6g/2iWyDxfekV5hc6JSIYnzArCI61jSRv1Uc41GgIhAJwfevZ5WjyuESxsh+ShI4uOivPXQXrL0mQXUxGGwJ78"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"kamilkisiela","email":"kamil.kisiela@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.0-alpha.1_1570713457551_0.7339969166933145"},"_hasShrinkwrap":false},"0.6.0-alpha.2":{"name":"graphql-toolkit","version":"0.6.0-alpha.2","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-config":"3.0.0-alpha.2","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9025080d069c1bbb8345e60b8a2e8a27ff8cb268","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.0-alpha.2","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-NU3CxykRmd/c9YgiLAbEL94mSzy6cwcKYqZm5ttSNUNsFvMvJPAp/ssPr9vl5zkDdcYa7ChbY54IttPVljGIfw==","shasum":"235000f444a0ff42fb70075d3e6d6b74095c3a88","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.0-alpha.2.tgz","fileCount":265,"unpackedSize":408103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnzPqCRA9TVsSAnZWagAAp5cP/1wJMxyFM7NAH2eC2jbz\nX0juW9PoHs7uqZWsGFGXZ5aG/Us16PJyZbkNY4XF6/QSsq+DbS3HzE3Puu2U\nikGnAXu13c9bwMMHtDBJbwMc922KjRuzZoSvSExEt0XzbLv1/zeaSPoKlyb5\nCHoiNhks9/kePR3GdMfTaHu8r90IQM4LHZqyp33LnAd6bRwCtOi/cEQGwKrs\nvtBbGrnK9C8D1Ype1zK/FcptgJbn9C+2hxrzAfRCsZkRUrrVSHmzOXzGtTmF\n5U2m9r71uHsx8JJ0uHnlUnuYzQwbhDC/JllWwHxFeh+KmDDvjZfizoOcyXp6\nF+zkj2ltA/2g23uS4MzO1NoJY96c0AUtiPCE/C3lKzHlmklIp5qqoYeLQJc7\nxe8aReo/N0YSZwDnnv5fkEt2s5pqlkLVW9gpH+KpDph9IS08G3GmRkyXoGfR\nGuDinL8WL+3r6JSVrFTH4UCTvqTbs6tY7nfNZvdLQVmn4ZJVauDZ7dfPXp0M\nCa/FBHi39FqwRnmqLcxrq/tI7xPY/FsPK9PvWHo/bMIOU/PLhSHa7CLyRdV8\nl6q+0ZJZbSLJ4H8C3xEL30W20WNLF0Bz/Dp2RSIXsImRATbgupveiKM3/qJx\n7xp9gt1+RmHnNBdOO7TBDRe3jIWLkdv4aMhZhs0gMvpAVCuWDxbhbbsEnHSL\n+u7z\r\n=yTGS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID5CCDMYTO5YNZl8ITOZvhW39j48S0N6x0CaxyV/LYiBAiB8ifH74Cf8ckpX+hfPpLMBDGwnp/ViLhe9CzQVR/tVJw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"kamilkisiela","email":"kamil.kisiela@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.0-alpha.2_1570714601953_0.7785321041420581"},"_hasShrinkwrap":false},"0.6.0-alpha.3":{"name":"graphql-toolkit","version":"0.6.0-alpha.3","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.141","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-config":"3.0.0-alpha.3","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9025080d069c1bbb8345e60b8a2e8a27ff8cb268","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.0-alpha.3","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-aL9tExSqXP6D9by53pwXHTQ/ZJMPWXXKr5efl+rBjBrkzLajPb31Be8w3LwNH9JkYlfhzfGyVPN0CBCcS/y6rA==","shasum":"235485dd65ea1a22ac1cdfa802c9a34bdb6b6f94","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.0-alpha.3.tgz","fileCount":265,"unpackedSize":408099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnzTTCRA9TVsSAnZWagAARCQP/RhlnmvwGmRR4LJ3+ebf\nYLzPQddbWoXVU3bZSZH8AElWEAPzthjGmC0bnq4+t3Cjgco6ETmBlxwnxUnd\napBjLQcv6UD6RZhTy/bkPS4hf9dWzrRmGgGas+ohN5qqLRpw53fo3k0u5NOZ\n9l/G+Xv953K2Qz57w6e7B3h6lSmOksk8jOiAZ4KU5ytzGafyB2u7cfiJfO7+\n6UCeE3q0p7VULMKFT+8pTtxdnMf1mniFvQvCIY54g81ZVW6TuXWIPbk3jTIF\nuV3N30iwnT+GVfa4AM3lRNNksG/k5UTm63sOxwnsBaS+0Y/A7TF98CvAjWc+\npNVh19e2YA8jSyF2q9vNwaMgDIAOvT/a0U94q3et7cy24iPpWt3QeDr+OePF\ntqlsl00G7/PDnV2U69XEusDQde137mYohbed0ccGox25IJvHxpfD9NW3btPG\nIMDeBcDFgGg1NkT6Rs8D0TosPYtb0+4qEjBPPY/lqTegRwkQHKN5hPpaRNEy\ndKtvHNJGL9yH0DZxv9zEuZcqGsRHXNpPCDO2Y+bHBKhH7bGrjSRR2bszhup6\nFO8rVoN/Zc7MAygD6E+Tw53rpY0QBNDSynS7fVldG05H1eX7n6HM7J99xSzP\nKClSqVKPleVqiJvSOKOYdHnmsuCaLRJop/8lvrTyq1VgsaQx1kKmu82Ix+b5\nwV7n\r\n=umhA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDL6IPpYKiRcA+/yCuZPcJamEFh9midSI1QZoSG3zdC2AiEAxBNY0SAz4AViAVhoAyJ54PPUZGmcOT46P7owEuC1gNY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"kamilkisiela","email":"kamil.kisiela@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.0-alpha.3_1570714834630_0.15798440164864536"},"_hasShrinkwrap":false},"0.5.17-e0dd7fd.0":{"name":"graphql-toolkit","version":"0.5.17-e0dd7fd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.144","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"e0dd7fd293fa0c87d9a08dd5d23176282cadaf54","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-e0dd7fd.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-PRo/Jh6r2ybUmkDImhPRw3S6eN2dvKB1YkHngGEH2d5i/GrkN2pk1hQSg1VLb23Wi4RMywchkZnINXxnczCVOA==","shasum":"ab8a51c8627e5a280caccec91e423ae0b81bf0e0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-e0dd7fd.0.tgz","fileCount":258,"unpackedSize":412217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn0+ICRA9TVsSAnZWagAAHwoQAJKMHTjZYLCApovCB3UC\nJvJdnQ9vglp4cmcGOJFPH/A/N7Vwf6wTGeDN0voXz78QuLfEoVkWNL73mC0e\nduA9NfpzDtIcI3ewSUG08mLW5uhRVKgMBibgwhh1cH1v7kcnFIxA0ih8GMcf\nbPVnkRS1eQ/oAipaYZpwkmR+0wm2NT3HYYK7iVDXpp0CYTW1G14qhDqC8wmq\nk7bCs6z5twmwz2TcM9Q6QnQ2MwzHW+8pHrp4t+1VpfdBgvw389y2kk/jh9Iy\nw/zlDd8XgkN2o0U7H8wubmt2OIpmGA25FP0dxrbvY5kQ5w5WudipWMDoR7AP\nAzGNrXIwxBMiUgiPu/SDk473DWz4I9ILxHPW26mTLxkbe3Laqjy7sfiMEXW8\n++OwhpC44+zn56+TTRz9ylY9jYSAatpvbDIIjEiUO4QAjNVX5dK9aJg0pkJR\no5+p3dJhU5/8HX67gksXtOlqp8Mg8LehJkMrGp0h0EMvnYU7mg/Qecr280Nz\n0ppiVVj3O6njsSfgYf/L5jw2xbQMeSPViAyziGnq0aVPjsbUpETSBhUCr1Un\nIlRyHDMxrNxAlHHOopFR324stxRZMSUDjOQbeBR69HMPGpnB7ttLKenkQ62g\nByACJ3OAioawe4DoCZ3kZPt5bLvMrHNeFihVR5WA9BHcEMRxQBtgviq+ffpS\n1Td/\r\n=2lhb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdCjhVmzvuwrOdo1kryIeyssDc2MqXvwLsBkSv3k71wQIhAKtAGS+DVVk89lP09ZLZM7Anddi1AP3QCingGaAqnuvH"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-e0dd7fd.0_1570721672017_0.25612374227105406"},"_hasShrinkwrap":false},"0.5.17-217222b.0":{"name":"graphql-toolkit","version":"0.5.17-217222b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.144","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"217222bc333fb1c7d1f6b68d78a77166dca0bd45","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-217222b.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-OoKLN7z7hT1RUZcGHmvUqMfapnp/nZj/jtCjdNDjTMawL8hjXWSlDijAKQP0Fc58wSbodtaELuNR5YJoqXCHAw==","shasum":"1884d5cbbb92655d34f6fd8bc04d2265439180e6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-217222b.0.tgz","fileCount":258,"unpackedSize":412153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn0+aCRA9TVsSAnZWagAAjMUP/isBu7Gs7grSO7evKt0T\n97CCzUQ7APrW4nVLJiB8WpkNCxOXga85j/cSLRApZ9gXzK7/GSxHo/ONIfmQ\nQ19iEGQGehjpx62g/YpZ+OpGkV9jcr9wf8eYU8OnOlLivEyONHlm73sW4Mdy\nlgjtjNQtCIzsMHd7cMqLj39ERljw5VWcgKbJkvJe+jh7VQgob1ka6uxR9C42\nxFOyeRjzb7VFn6f/ylavaUU3owj/6T46mMna+aq+OqGmwcrlUjNvAl1RZH+O\nv/HcRPoUL2qUUtE+GgVEoSkEPd6gDt1QbHoMHAMlBjULnZKR3t2O8/Yo1XI3\nJ3wH2uaR9zn8Uu9/oDC/2a19drpi6u5CMmXl/O3Ewc7EYdbYz6M8di8Gyb6V\nSwBVcHT5/WuWhxTctyJvoqRY3rpzLPByjatqhTGuR/SEbt0dkBwm86pRE8UH\nRnRr8y+sPNXRMjzY2VcEa1FnW36IVeJVk15R3AoYKwvZWFhgdR6T8Ofww9xJ\nA7sm2hqZ8VgC1/P045t7oIpkxezHlVbJdG+Sgm047tLaQh7u8xDCXCD86clI\nOyDZvB5UDifyKX3A8s7HtyQlqLGqLoa1gdNpUStgDa2LUBUsRKRNp4py8Wav\n8gkhq8W3eu3NCpBZTWuLavs3PvpqFl0DOcTt68IJSDt97zK0xVUXERzPyUV+\nFXW9\r\n=RLwp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICbsyZD2mYWNFUDgjZcN2scWQ9UGqyqnUVIVpWE6Fd5iAiBHuwIgCTo9LXs5EbKb34cT2JA9/c1RH4+Cxb4/Cw0O8w=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-217222b.0_1570721689619_0.2230544112866606"},"_hasShrinkwrap":false},"0.5.17-27bf350.0":{"name":"graphql-toolkit","version":"0.5.17-27bf350.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.144","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"27bf3503e6c6d1cf1bed34b551df3f80c5f7cc35","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-27bf350.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-o7aZSkgjrdWnd9hxLrJsAu6MX6kUYvCa14l2MvSRQ/+ozCNte4hHEQKNu5hgegbWpNbV9dN0AT9ROddDIZzOsA==","shasum":"77169a639346177dfaf7edc32fd8611783abf2f3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-27bf350.0.tgz","fileCount":258,"unpackedSize":412203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn0+sCRA9TVsSAnZWagAAfUoP/RfC9oiy1dbQBZhpuvB4\nkRjZ1B3o6NURIa2h64nK5+E62xeVzRSV6HVGejc/e6HZQgdSW+kJWBRQEq1L\nNfj8YRXb0xYQ9r9eAIrNTp89k9ujg4Bdm7RUkurWiQvBkMm96POT8J3dC4Tq\n6Hs/J/RMJVmHJRHg1aDw5RAIGNXQitxMkqsp3YWLR7iMoJNne/K/mfWsbtSF\npoo7j8oGuinuN9oTozVJbSYr6rPeMSdevjLmdQoVglv7i82p1nYm1jRBQkgN\n9TKOyXlLzSbK88ij/NKIwSEquy9xHX1F8Fm+QA5nf1YxQNfh1aLgEEe2jTic\na3PL5iFNRe5S0iAkP+50eOOuSjNsKIsHXJjMDSD813eDX79H0vo4NxZcMDZO\nLFNfR0BP2uzcLw+UY9jWrAk0XcSD1/UnTsqBt6e6OkikQ6tD5PnRj3KipeVZ\nN59W38IWoJoxMVq9B/V57twfvyK5uUgjQ8nmJm/V1WK7k+x5Uu4MBDhFs0PB\njKVMaTHhKDVoi74xlI56VKYZIOJwph1uDZpHoJECAtiW1n6Bjq/UqaVrJT92\nNZLIb2sstvmUWJjtmgqRBXMEcC8VYeBTb1W12RWqFxYShhDEMkoRiJljAlQP\nMrEJgUH97wIrqVbYYHQz0NwjWKFfnOPqCy4qOkUUCEEZ5XjWrhw0P1yoLgyz\n7sbr\r\n=vagl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHdHyPoRHayvtRa57Nt+DzmR/KBg6WiSXbfUuX/KH9LAiEA/jGxmoXNO+GD6QgTcCliu4GTifcb04F3VwDdeActZ9E="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-27bf350.0_1570721706881_0.08272459228350915"},"_hasShrinkwrap":false},"0.5.17-cc2e2b9.0":{"name":"graphql-toolkit","version":"0.5.17-cc2e2b9.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.144","@types/node":"10.14.21","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"cc2e2b915a17245c280d74cee529e60edceef06b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-cc2e2b9.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-GE66/91fWycZhY/l0bX4Ji1cmZ5gha1T4jqSOiKFzN1196tW+GiFEqHrwuaGzgX5NRMDEpxcjTcs5b+TEkngRg==","shasum":"db753a15501b8a0611036bf39456a53ddc1e3454","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-cc2e2b9.0.tgz","fileCount":258,"unpackedSize":412203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn0/UCRA9TVsSAnZWagAAxwIP/isdyA/VBvlnWFgacnEf\nsf5ANAYR8laKsxdXvktqrZ9VST6ykYyAxWNxyRVJaLkZQBLfF4A1Yc78sUeY\ni9XMy80iLkYx6fNYlPLyMAvqzYHVn3llA+qPsdCgpJXoy6BwWNbIh2CT3ERg\nmnzCc7hi376ZksHVNXLw1WKtjjb7bwz1m41bsfcLAWPnodX4jjisBPY6g4G0\n2uKz+oTe1WatlpGYJsYdHx/h/VicFouRl9nAIjVkGgQ/Tr7mdKlqtLYU1Mg/\nctHTdXUXDBQNUi6C9dMr1RORAqI7AE/vgGhTqK1qK48C9lXuYuUv/kMHIHoP\nHB1Zq+HtEvFeBydthm1aZYPU1zttBgn2dr2HmZB2CHfz75LhslD0PbuxWSjX\nDptS4POr9fEzjuK0V8FkFTbGXDv/Tbc5b9fhmt/0HaifyvGhV2+nr+BXun+H\nXz19pufh+5OUoViHjvaM07OYAbX6Xmr0cxqLOV/+Ap5h3jm4IOpOpuUQ/byJ\njRgRbn5uDP5i94zzQvuA2eFmK9LQpAoMKhUrbz5kbez1l4T4ZBteRTyuFdAJ\ngBbJ3dmidkZ7qTPGYCYzQ68bHdiiDj09pL8kmslsV4EZCoS0RZl8O4RWQS0r\n8El7HsVC5g+zn/0Ba6gS2a6etW8t5hQumqlYC/uZigfYXuFkOPw/uFciQMod\nIAQo\r\n=6Siu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGoL0S730C0DsUAQMPv57VgNeuljX3KvtZo1z1HUt4puAiBG9pohqPAF0wLXDvsImQNUUluLBRHkoev0JLUrn6c2zw=="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-cc2e2b9.0_1570721747602_0.6341965820303053"},"_hasShrinkwrap":false},"0.5.17-bbaa233.0":{"name":"graphql-toolkit","version":"0.5.17-bbaa233.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.144","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.3"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"bbaa233332fc00721cfe35161f938eb55b0ae693","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-bbaa233.0","_nodeVersion":"12.11.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-39vOWhMskasqLzxRAVBlQIPHG7P4VvtpA/dL2EbsLk0wh093rw4EREdp4mur3jAMFtJsY0UgrBofgd6KFSyF6g==","shasum":"625dd0f7a512199146ac2caed1b572a1bece91ba","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-bbaa233.0.tgz","fileCount":258,"unpackedSize":412198,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdn0/xCRA9TVsSAnZWagAAaYYP/3RuIzEaaqNfVLLVkuDh\noI5hYFa3iPekSjux/bXF3x+dxKSMq9ROFlGH7XCv37LiOiv0hEljVAQqTR3F\n6WeRWTmWQtMZIDUsbpGCtNRdJXqeT3uV0FRne6H6UVSAYQE2Sdkp9rCw0L8Z\nM41x3ma+J9lKak8YJw9impfPz6J83QkyEBi6Pv3GDTOuvOp5JLzs0M0yupJg\nKjmjG0kfZd90iuFJx7CYmmirEmvMfqQrK0rNqyRftmlpv/sjIhm/Zb9ef2Hn\nQziN3EV+DVKQ+zPAWsYOdSCeOv92L+7sqm5+WFjpK2F55qS9lFmS7pHPyOi4\nCsZRvX4ETadlUSzb64+ErilJOAcsPniCh9egzhiJ3jPwTu63c4DqxSVnqHPF\nOwY9Cm8Tb12UJMmXF9DqJIWOeYmxkLYbxiVzZ4qgz/1udGWR1bptv0TrckH5\nmap9JzulYf4FwCJ1OaDX15cUD+KQqGrqcFnaRXWcW3LqGP0DfmTKkiiRKcAG\nk3wXjDkKHcxB7rd3Oyzri/yBXT2JPu26Tyte+pfhruTuc33hDaNcRAYilGIn\n8YrmkYNaHy9QauBLyJEWTdDSnQqBQ+wXLfATaHQgoH1Ni5HywV9UqCFbP0a9\nv21W2Bn+hn3kHiPAQk9yVJ5MMeg3rwUBaam/ppvYV4UjJJHAJDbjUVR7HJck\nLurC\r\n=9OrK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi3UzNEnjJNcm4Qz5JOLqfmiKgwVTIfWSj5thXQT/QbgIgQKetM8qdBMxbaEreva6Eq7yUefb77LDm2RJk9+v3CPY="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-bbaa233.0_1570721776677_0.14265067391074515"},"_hasShrinkwrap":false},"0.5.17-84a0284.0":{"name":"graphql-toolkit","version":"0.5.17-84a0284.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.144","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"84a028436537d59b61c2e190ea0271a3c08e979f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-84a0284.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-hgJnlXnzk2MXBKzzCML+GS+Xd6KlnQmrUgPCEWVDRYz9TrbbDSvhMoPjGTSClXkuYQD98K9/OmAjAMks5bDZBg==","shasum":"7ad59919afaace2193d1ce5f68fcda019bb3374a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-84a0284.0.tgz","fileCount":258,"unpackedSize":412126,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoGzRCRA9TVsSAnZWagAAEFYQAKUo10oKWGF1vJ9VmmzD\nVElYml9NzjzJa6kyW8BQLjPuQPYnDEoi6YqjaQYkomp/u6N1D4wio8ZgJtHY\n2jJEA/JxYy1t4sxWoesx7AHVHXB2UxgUJRPX6u5dRkuxD4UALqhkO4pw/cEW\n0MTEQHlaiiI5F3B1SJ5BuTfV5QJpXAbSp19OlSO/QgahdMjADXirUe/DCr3S\nWte3eqb8NYtlGt5YFW723LgeEMzxozwade4gPKUt/bxK1PItSiN7md6wPlxZ\nhVuMh+KQTT2l0feouLfbMdhXhYjb68ktPBFc5h81Gl0BeITDn2hxJWUksO+Q\nq6jVCe+qab1FetNrp9W1OoNZ3J1vc9i6zJQOD5usjH0Z+2NUO3OHQeYOZwlD\n5AqRt7HXuWmlij55iJmh1DBh+DJ/cUCnR3H5TwvuWfpTETTdR37MVddC+UQ4\nItLJrS5BQLF+w8KpxezrZO41IUovNJp/vWIaI9ALENBUPbU6qQkk27uP4UUO\nqu+ABQlDa0jSEUZJMP6ujYyqpVLiQW3n8V5NSbYjb377PCbDcB13XTKZ+sI9\nS7v8dGtke4SMUXT6RZin/Mz+nuzCRVAkQV5cEIe14noT14TLZExw6R9huRgC\nI30s+vMZKjPZ+h1LO8yE9pSM2n38FdkXeSz5WTgQoLDX/dJEaDtikx/s6ZSJ\nXRmR\r\n=cfCg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDN/g4Kvpw1qrkKE/4fGykxBXb5onr44R4d1Hlp3NpofwIgJzPK5PiMhvrG4bk5AtWIe1QL194t33YpD9Z6RsN2778="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-84a0284.0_1570794704729_0.6229986254249167"},"_hasShrinkwrap":false},"0.5.17-14768d0.0":{"name":"graphql-toolkit","version":"0.5.17-14768d0.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.144","@types/node":"10.14.20","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"14768d0231832c4d09b1ae63ff69020be56c02f0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-14768d0.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-FdxrDXr7Ej4NtjiAjybo/fQdYi0A2eFG50+hpZBREFK+oxwWqRkIS7mYHcenr9D14snmuAQalgByZ4ywta4v4Q==","shasum":"c7bb689bfc8334374274e5a1c6e636d93ca76370","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-14768d0.0.tgz","fileCount":258,"unpackedSize":412193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoujnCRA9TVsSAnZWagAAeJwP/jqG2CPuhiX6W71kqeKp\n3SefUg6Neyf/2vE41LzqfyYKn5tDvpNy+eGikSRvuWhUbkQWWGnDBEEjSrBj\nei5FpRK1c4MS2SRQmSYBL5+A1SY1g2Ot+1nT/nNcIQ6KOLyJLnvoNBDfmuI2\n6hKkLFriRdYlOI8chszNU/fH0xBD5du/2yFgzR7+CzfGz/b+0WY7aMI8dVhQ\nDL6RvI7lTw11WuFtv8vWWk9W0rg0gAPdG/M8L6zDuBNe2NBHSbxCBTxThDGI\nwAAYfUZii6OHdRpplcX+mmf/IFNKtT+phKX7ebys5EvK4W2uYr99kEdNRtnQ\nyfwGMG0cghnpjcaaLuzTiFNhZfba1P+Rp/vPOZVQWZafb9U813yDzMFS4PqL\n5cCy0v+XWmne0Wzk1VVi0XM6XO0QFCQY6CNRzeozF9/RZj2Ik7W1M46Mupyo\n89NheVRHW9/bMukaPst+ROcQrMmP/tzZH22b1q6iGs207D2g4oL8guCYZNlS\nz8heu/5tkUCR6pk5W19Mu0L1CwSaFlxUuP79ietoxAERxGu4U0ZyMXu8JEO9\nRG0d6b6sEZsCR7Ellw5JgcYn3sVf+/JGE7togdqrZUkSjbbpwu8ZJlNUgnLH\nobZTgnIjkNBcFLQ/ef1AwEIAjTROw06h6o/hVsMGdf0Uzkn15IH4vvc+P0+9\nT0jg\r\n=B+/G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAkbTHf8mdfX1qC897BJYMwBD1JjKAy3fWl86ErGwwZYAiEAuqVnEcY0yxX+u4g7fy7gXzacnqMFS7AwjG/U9d8SSJM="}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-14768d0.0_1570957542353_0.06478043197803562"},"_hasShrinkwrap":false},"0.5.17-bccc110.0":{"name":"graphql-toolkit","version":"0.5.17-bccc110.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.18","@types/lodash":"4.14.144","@types/node":"10.14.21","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"bccc110c2ae24ee913e52535f632818e687920e0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-bccc110.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-GqgoEkeW6ksvyfsBxUnK8TDFkCNQhnIygTkmzDuq6Jnu3xGP/OQUQ2+aHVTyGcdYOCRLVYb8lkYkBMs1au7d/Q==","shasum":"c147c93f33a2726aaeb23be96fa5f8732de1658a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-bccc110.0.tgz","fileCount":258,"unpackedSize":412159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoujuCRA9TVsSAnZWagAAo48P/3iiT+VE//P3XFN9QlcC\nD9DbHh52WkVzBdYnCa6TtaclAEoNUdrvtG07pMxj5KonwYkKV4c8RpDaCQ2T\n+agvtfi2W+S0qAj1o2A8rWeQMzZ0bvt0T11iDRzy7TvlzMloL6V1WuExut0A\nNp93ceZtWxAl0YrmtZJvorA6p5CrgOuLk0iOWYV03hCbGJZNd6FMA/5pxfXC\n1+nNM4pz2ipq2x9nTjojapbfgPcop4UDUHfdJcNS4XJtQW2kZsGjCqr8VNk2\nhHYjVqn0gdCdSitPlv8VFr/U+rdJCakqF8usr5JaUg9eJxEbDW0QhFFIuHk6\nRrzSIrnVTulZ8/ypqYUgcsMCun9Xa6C+xY+JdHQ6sYZSJS6zQfHzWjWSx6Op\nkYF+N3Lg7S+Kjy3vVIMPAe23ZW70Sb8s/G6Hh3hR/jI4KaTPmQ2tpxtv1p2F\nWG+2JiL0bJblXAnCheYim3l4WxQFT47tczG3CqtCrM81LfAdfuGdQpb3vHaZ\n4oLWXlSyTsXjfe/To+5E6bWkjervLZWru4yqxK+FrTcCqrZN3V47Ss7mzdhd\nhHuuXazFLkrZ/3CETFcbqJEpj14wYVh4upt22k8WC1Rr4zMGGQ0qRJwupcKd\nfivdWtHFSB3txAqYFIJvvMFeTyiZj5b6b4lCfM3bT7Buc3Ly0Pi2GNSnMVRr\nadPV\r\n=OnjL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIF/Ow/9FvXGN6lCK1jsgc9WC8SIIiRw240+vZ9/L2KgIhAJsmpp1ba3rZQt5wE5GzmQLEKZnDatPXQK1Gbxyg58Jq"}]},"maintainers":[{"name":"dotansimha","email":"dotansimha@gmail.com"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-bccc110.0_1570957549121_0.9415090737702614"},"_hasShrinkwrap":false},"0.5.17-278c8af.0":{"name":"graphql-toolkit","version":"0.5.17-278c8af.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.21","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"278c8afd1082b751738f7b5d950b419d144ade3c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-278c8af.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-RhFUhQVRhiZtw7/1j+dQ/AkldiRgYVowYKyusiEDi70AcBzLdvNyTLjZvEF7YzefDIX9SVLZHZY+YThF5n4MQg==","shasum":"a5322d735ea3d81f0432b9d769c6b9f921386334","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-278c8af.0.tgz","fileCount":258,"unpackedSize":412192,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpMwhCRA9TVsSAnZWagAAuWwP/jW3i1BQfU6JTtc6lweA\ncxRwLHC8NJJAmfYW+K6rz7/9YernOwpsfE792Jfy4feul3gOINrPlLXRfeIQ\n5W6qHhHQPx2Bd7V9WhThsnu80V5Rsi18L+IXUcfkAUVOV/DGSB2b3l6r5KWV\nIEcbree5C+N8TLvFFiUs1gVN20PlkONPMDATggClJSJ4IFOgS394yfDGTQWR\nvs2tnbCs9c50FKj39lVAxyaNia0gULAlPyokFtsJdti5eQvgQY3JxmjY29UP\nRoaNPu7Q8gEZkwhP0tU1XbqCOy5hj4UZdoZm11DeZIEoD8b9QMLkHECXo/Pb\npqwxcOPCFsdJFYWRnCyQYmv3UUyajDnZlDrGS4qFuidZNZLcKv9JQrWMJAKL\no5ixVHcFdghZvEtLN5Bwmac95jwX20Bhi+A8gPxXKit+9XLOrc42C7CWMf6/\nw4ETOrFpEXqwXpYR29dUiT5desoKPxjr/8/2BTXQYV7oSjjHYjMEJZGoP/dk\ng5lXJdspi9FxxJRR8Mg6vWpKYRiaVLGF2W1euE3Wj+ytx2XCfEGBD+Ebw2n5\nsMNCeMCCzhbKriq25rU8tDOPjy1iEgLN77JtIFScOHSsEGyWvD8Nl2hDa0nm\nw4DmDRPg7SS6KlU6Z44b2TiuL8+qDLnl9Mj/OF4CExM7ozB6Zaw0IfMJGIG+\nvCww\r\n=3OA1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVXCMluSM1TfoT31m+FZcEMnfczlZJJHURFihqkOWUbQIgfqHMh9C4aQ0OgUEGpsBz1enoy7ahtjfj2YJIYdEytd8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-278c8af.0_1571081248362_0.6617258449251517"},"_hasShrinkwrap":false},"0.5.17-7954316.0":{"name":"graphql-toolkit","version":"0.5.17-7954316.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.21","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.5","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"7954316346b797ff5f51b4417ce943238f8cef29","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-7954316.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-GoNKgeHO4jCZxO7P2QCOEsreMSJARg7Br9Oh2t9ZO57P7R8tiyVSJrGxJ+00N5lKvGPV5lyWwZMbLjhCBJKxEA==","shasum":"5b25ef855d52613ae71a29d21fafc5fa1129e0d3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-7954316.0.tgz","fileCount":258,"unpackedSize":412153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpUDlCRA9TVsSAnZWagAAtGEP/0X6AarFcerRy/H4qC7U\nXr8+wdwyLsWypXxcuC3WojFbc9L74BwnCremEyMTm4hb1DvRmL+2kTS3zH8S\nyFJh6sfRtrAxgC+0U6JyhglNeCyWu6tz8PNx7U4jBAYCRo+RzwyZAcTobiPD\nSv8kHGL4C80AWOsWSiqwg6bCYal0SDO+Q349rUSzPasz5k/TzU0QUqIVlerO\nTBja1Rmae76o3Sc1E+oXm+dx3U/lvCHEuZfG666No3C9Q4eSURNShpuRjeju\nDHyhC6YDLvVtt2e2c1sNUgjxmG3dIieC8kCXspwFHBMGbPxjtmtjcJGT9iFX\nKl++h15ioxEHjTD7yrVFF/GBXO4t/roMFKO2piYCO2NaeX3/AYzxfZkzYF1F\nz1hzEinQyUncBSujpbW+A3KuDcjjBR2kxPtzze7TXw/fZirrNzzlvWXg8n2Q\nZZ/9ccUIraryUcK5oc9pHCR+pJ/2YRujByUjGYjDQDfTYAHHRprh6LKYjciw\nYPv1iTL+Dx3v1+BySOD7QncMjFHidv/Qj8/EMVCBcvkJwzdUzOEvyhEgy+k0\n7ji2rFK0NsBIIZiCeMAba38zmzB/0s5se1jS13KwTRfAu3LeCt9Q4b/uh1Rl\nlbg6VlRs8KGAX51K8XN46ZT4/pBUW6LMOjGogh7bR/XqP+fyORhxT/JbGVNT\n4RHD\r\n=pUYe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoz6cFrChsOqfq3yZMEZirS57CTo9XKdf5sS6m3BEB5wIhALDD9BZzqF/Xa8uLaUWx6TU1l3zRsQ3sobZx36ijXo8l"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-7954316.0_1571111140736_0.42701176467531754"},"_hasShrinkwrap":false},"0.5.17-1eab5d8.0":{"name":"graphql-toolkit","version":"0.5.17-1eab5d8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.21","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"1eab5d82b3993ec25602a66eb55c429088950f98","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-1eab5d8.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-1vRaTBm56lVTUPwY35avbC+uUxijNVDWcdsUMtF0ZjBOSJDPMMVqD35f3I/ML2/AAKWu5ySy1bbI/+LXGgUPzA==","shasum":"eabebac1d236c551e155bf3c6b1c8f778d8a2237","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-1eab5d8.0.tgz","fileCount":258,"unpackedSize":412174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpVdECRA9TVsSAnZWagAAZCcQAJU1cgalDQCvo23Y0T0x\nchvJSoVe6d4yGVbYJBgsLYW5qz4yeDufUBV8dSbV2dTTZHBe0pMSmRrLXqVk\nfJ0Cjx0ycjiVrlQSw2zRtJhi4p7lyqQ9xx3ee1pORor99LmbDKXrPydJvXWt\nLopQQNcjBvTGQzB71gNhC5fdiKlTr4Zvo+gSSAWQ+AhUfYoIJmrWEJomynFe\nbMWAbFa/9vv2uVVxJCDN+JU0UUCnvkhMQ3v2y6j5ao6d/BjHTYUp5ZN52NiT\nGU7eYSLZ+RrMMBAb3uwunFkDDUg9jHlERv0iBPUS5H2Yrukn/og6IiKbBJcK\npT0hsMRjzpTKsi++cM9sVpCHY0ZLh/tp/1a7vLo8dpkt6Lzsr4ofCZzVtg5W\nE6SJM4bfZPURJQCinjSazY0NEc7+YjqjO2dSKXO5VBFLZb+Ae0XdXJZPJHZw\nqRgtoIrAxCxQgb6AdkRcRdxEI8b8TzmxTDcyaiiMyXWrvpnsr670aLORn/LT\nhpnVHDtywXIS3HnWWyrvWUYbNoQps4hPbxyOtS7O1yNKC8wM1reqs5E5PGYJ\n6F2iHfy5mqGrNsAnpnV/Hanm68JkG3joNSgLtC9dT1W9CXf6zu9dIEQLwIYg\na10Y0OaxMhQ/LKxoiOYvrwW9Sa/5HU9BtTjD85AiWnv0HeB0RdZwBu1lzxso\nsbCN\r\n=GsVE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOqVoheFZumiWsgQMOTBCmOOArAdCPg6WyvjAlhRSKcgIhANXTZrGKC4pgCk+5nzz3+mw9WSlPtLr8dEPn5QLhELNl"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-1eab5d8.0_1571116867933_0.6479137940307409"},"_hasShrinkwrap":false},"0.5.17-8237e49.0":{"name":"graphql-toolkit","version":"0.5.17-8237e49.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.21","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"8237e491649d900afd1f0bc2a47aabd7bd9bf61f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-8237e49.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-Sb2xFM4bXHMaszUmbVcEa5r9DrwVlxuMd+2H1HQgcZj81aVguyS9UfqCTHX/97ZQo2KRfyBum+WrlctIMSGf/A==","shasum":"01c0a1431b216c5cac68ac8b96385d7eb49a67ff","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-8237e49.0.tgz","fileCount":258,"unpackedSize":412172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpVwmCRA9TVsSAnZWagAAg9kQAJCKW5ijsjO8/o7SxDwI\nDd8H9qU8iasd7mfb0wyV9paguo3s0lb/C5Wse8/jM82l68twQCrhgBCiaPRg\nKs3kZOjgU1ibq9mIuTDzcevhd4sITsRbK5mzb1E/tX9TS4eBw9Pm+kUeB9dA\njGMq4HKJB6j6Dtsnztz0X/VvldUuucNYIQhzn4Gk25D7MXeXv5llHlPT2IB4\nlKB34pk0RmHYuqXKYz9FIkEtcUaX6mozNMSsxQBHRJLECwpks6eQZpQ0G8Ar\n4QqJoiWf5Vh+bvU43rUEHkKBokGK2hUy/W6oqAZFf8PvINNFC+Xf9uUxiX/w\nVT1OlGzKs2+jxC7lW0K6Xq9fDcK14PuGmena9XIE+N9YrBYHboGkhbcp8Hqj\nMH/nss0mzCD/th21nBJusCa6S/KeWFr1ygCJSyjJQSDG7x4G96vS2ZYlhfe3\nncKRxlCPnn0XLasD//JHkssSyi4i9uVwDS1qfR/RkhBgR4WXL1F4xi/1mlKt\nfRt6LdvW65QjaJrFK/abuAjhrRftE1l5A+iaM9nVD+jA03y85s222umBH6BT\n/FgWd3zppOLmzIkY+ZHPqKzVme4RNq1+gDmMJjzxFhJdef3A5vpfixPs5/7A\nyn3f1Hhage5COp96jzfLP9acbSHwIBoOzypAU4SL2aBQmfhZ1qYnPWHoF4lV\nkksA\r\n=eYw0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFERU6PWPYX9Bc2vlRb6EDCruJ1K/oiXxTcVTiccjmMYAiEAkbXNZDvmS4VkzuAJNA2HP1niCYMJo+iZxA+oZKMrmig="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-8237e49.0_1571118117738_0.5913406207997032"},"_hasShrinkwrap":false},"0.5.17":{"name":"graphql-toolkit","version":"0.5.17","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.21","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"0f43e2b7dd5492baafce41a34104b6089565c676","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-YdssVDHgkH+z94PKbqgdXrhbIE6J/6z4VJn+8QYQbJ4FkYJ/wPCfnO4Xt11xTm1MFIhzxB10V8ubqo3SzgcwgQ==","shasum":"c5b8aa8856e527a272654ecead94ede2c200c6c5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17.tgz","fileCount":265,"unpackedSize":419844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpV0FCRA9TVsSAnZWagAAvksP/ixRWb3JSFvNVMY8BsTp\nCZL592MMZz+kMt/mEgz0cUfgMKdZZadYUbbqtHlsIdW4hdUqQ3Onk0nOPU+o\nZxCBfx7TakbiieiiXgcoXfRgSNyr7h/iJl3lZBu1+SN93QX3BMim4n7HFGyN\nI8hjS2FApY3OFBVrWfQLgKAWiS4JrSF1g0sgB/ZvE3IEm+QQAIUq/smr516N\nWiAzXZnqveX2wZ9aGP88Qv4PYjRD4NjXT8+ey9riOk0Y49+n76BRMTbeJ4yy\nOZ29Vxjjf9u+EYcF9JJYTsPWqSj8uBLSG0zf1m8xb6MlM47JRRkFyZLjb4ID\nrvFYdmjMtojYGeMGGD3VLpLTLzY7d2WZqckAqDenAWnMPwg1Yfwxl6QbYH/i\ngOEvQjwq5CAWSzihOvmmKKZnJr/2TLy7xraaRLORPYnbZqRpap/+UtMnxoH+\n9jcu85lACV2gWAykZY7fVn8VY5W8FfhhCXnSRQ4Hj+geFFhT65LfKeROpDF0\n+9ECUMEsiXFe/CZ5R4rgs+6QqOf+cChYPx+WC0chQ8yU0Ygq7kGG8T0BOrvy\nyIU88083KtatS/+gIkmzNXadketH92RtCAIu2Aj1QqpClZt6svOqdRDZT1XV\nl2MsyLTvZQovM24Zse9WwTcitplUMEWzC3/PvMtmi3T23aX90vjTL15xUATy\ndrsA\r\n=ywEF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDrVU576HqmsicAhv4vV+CZj9uP4AeV2I056fQARpnWWAiB1GSYYXb0sQmkFxiSPQ5TO7y/aIMWveRXMOmxHuk+EtQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17_1571118340099_0.3968298701954147"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.17-0aed6c1.0":{"name":"graphql-toolkit","version":"0.5.17-0aed6c1.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.21","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"0aed6c1eecfab62306ef8b6b39b40203531c5c3f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-0aed6c1.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-z9xgINgFwQiOwmZxGFEGOIeX2F0vzFljqd1PBZylJMrjthwjLxKc10LPuPS2MywDyEe+ZIEWQJ9cvPoabI61ig==","shasum":"8180a824e0a0e51ae5dcac64d5e30eceeac3662e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-0aed6c1.0.tgz","fileCount":258,"unpackedSize":412167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpccLCRA9TVsSAnZWagAAb3EP/RQ212bO9bYpcVSz50Dv\n/eTwEnZs1Xdwz42AnLRCHrB/YV8rRe5mIiQUkdZYIrPb2/yS6LyJM7s9+tln\nUIFo5H4ZUdO909Bci7AWlXN3KsHQgh594prQhDKT5cH+O6Qf9L8SPDCB//Cn\n5Xs0pV0XR7hQxpb1pSlOyIxEz4Rxqi6RL2fG5v1hCop4itKOvnOhl8xaSXMx\nPXIngSGQ49iw/waSrOx0HpqtXKc4trqaYiavwX5sHuV4Gj2W7fails7WMbNF\nz3Qesw5AMVq5QGY5V1TZPEzg2qZkgVOjMTeMcxwm7Vxzu8hQlKrTiRmW55J3\ngvH7yvIShTp6bdEsidVL+NtBpFDy8DJ1b+/Mcez/jjMv6qcQ9AkzIXKPzcAm\nfK2KIU7spNGUG3zfer7so4hzfcDFOCh1krlC5h9zOIcVZ9mjWDX1XDnaLJvC\nxycD+F1ZoV3XgyeQS6JE2Rw13lDhSil1lLa1VDzFkWqy5n6X4A4IJ2SFKiyt\nrmxuUGT7Zynp0sSD6tCxArVnaDJdUyobVQfpwBHZSIyPn6HXsPrCVdmbX0I2\n1wwv/snYOO2CoWUKY9+6uzTf9Xq62qxh7S1a4W5eEa729u3ewD7iB49Ct3pT\n1wUh5XNp1+8lQuIhBgbpUfTVcmGjspg/1nUYlFuQQoJKgw8MRkW+sRmmLBHv\neDva\r\n=G01H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOuGclfuu3/8X6tFkUAMmLiEy21HGD5Evt3XNPBbQ+KwIgQHTWGVMsjPCRiDVWk12X2Z7DmoD8iXKGPvRIjrGJxm0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-0aed6c1.0_1571145482712_0.6698600162644466"},"_hasShrinkwrap":false},"0.5.17-66439f8.0":{"name":"graphql-toolkit","version":"0.5.17-66439f8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.21","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"66439f8148f1cc16b1187899bf2fe6df53b33699","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-66439f8.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-Wdd2FHkfBl3gLOEtfl+35zkPkL9sXUkA8ktIpd/66KbNRJK75og4obiFK1faey5p0hHg3t+B01rAc3x7WWdZnQ==","shasum":"c65b791028f5b5af92b987bc5ecc8ebd17e8f111","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-66439f8.0.tgz","fileCount":258,"unpackedSize":412160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdph4vCRA9TVsSAnZWagAAVawQAIM3DUyb4g+H78hypAqV\nc0YZyPoKu6RAt2EURL9VUYb690UOSOkh3B7DMtMEpIlmYLxcFvuZo5rYj9Nb\nJqzE3/28nHxqeoqut+IIQC9xPtfyzkR6GsBhePvrmUUax6YFUAZpcsT38ivB\nWFuDiTOEKqbSRAUfV820JCdcjRYSnlaTXcPAL4B/k68eA5KDHZcd9rnJPCSy\nDSciOzi6w9QLSZ9Qg3ksrNzkB2BNU6Cgs7DTRNLLIJcXZ89cFJ1FSjohZU+d\nZyJFSKzt5hUUtZj+oEFM13+54U7XLo+cXuwdjfy/GNAi8iwNz6Xv9t+xq0Qc\npFeAZXl00sd+BdoycQrFRSu5qFX+wsj02d5knhu+TuhDLDkOO+afn4dQ1rXj\nNeUWH2SjgKcvRiMNttKmpEwk9wLRmOAySvjglkFWPT1zT9RbE5SIRilkatl+\nXGgMGp0snks4WJCtmxd3XChs4QR9+XHqzxWBc8PsSx6SQ0W8MVSxhTvV9jmZ\nt0N9ZFoi7TyfHRVEk16JQujafATokY/8CPbJS0QzifPu+JVUfH6AGutSRn3M\nvW9uoMBNtKxxfZbJ3rMbLxpDHrO4m0xvXauG74FutApy2AtX1fJO+dMtxilz\nHZNpARrODncMX6oesHjVYZuMy2Ud6ZjdurDQ2ZiVdQBUFQmGUr2uYvkPj29/\nOhnC\r\n=0pPD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEu7PJX4L2wfam4ZEOQ8y229/KoqtUG7bgFcYUmeHAIHAiB8jNDiPSl4QRN7i/rfhsibsZ9+0DtivlQpdRWEB0FZ8Q=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-66439f8.0_1571167790343_0.13849747449203198"},"_hasShrinkwrap":false},"0.5.17-aa926f5.0":{"name":"graphql-toolkit","version":"0.5.17-aa926f5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"aa926f5a3272c57a07548b153798e8000a22576f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-aa926f5.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-KG2gB+usSSQ7pd1UieVoc2GUgupluKlZ0Z0mquQJBQfoq4JY9YfD/qJHvFAbRBAWCuhx69o3AXuEVvGpblqMug==","shasum":"a76951b87c88e724e2eca10ab1bc0e34c0e61969","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-aa926f5.0.tgz","fileCount":258,"unpackedSize":412183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpl38CRA9TVsSAnZWagAAbnAQAJTsMAMsLFDcLFkBUVwL\nxkNZ4ECKIxfD51487oFW3jrvbwpQlYZMmkUdn5bmqoYhRykmBIL00ap/0xp5\nAN96nnAzhSAXDpIRCigUcy3TzUi2hddSisaMnoXlqhbGpXgT3b+MUQDtKK42\nnPzzLqGT2HOQYjZy994uHYt4SJIzrehFMmLKHt9uvwFbWCgCalO+eSFDOLAJ\niYHl6J84otvlzdo/xPLzZ0FfyNf8IAqlAzVuPvLCqiOF+lFVpPsX7vNpXNw5\nqzeS9vslWfgDJbuNAKiq+iqC5g3ZqDSeEmbwPeOuACIQ8ufP8loE6bnb9EiC\nGz/hX2Aj5IkADUUQ2e7yrIyE9viLH0UhLwmdhUpzB5bJ2WqZuAa9rk+NgnpC\nRuBvxKsM5Uq53FJsgdkW6A/NaJ9pRlOE6TP4XR8nGui1AWZR+qJymd8iE6h5\nBqIltfuYyDjdmnIqqzONs2m4gRWmYHYSN6AIeD0uwldXok/hyqJNqpnInIg8\ng9bmt5z41u24zF6AIn7TvbqqyNoKMkTveUKmV3Om8/suaUdt6JuJ7tP45qqe\nUFnjSxUyOyQ/8duvHwEMWpDos2ZR0e0y4MdZyw3oS9t71y0iQFoomCsx1+/n\n93/BF+U+3LEkNzVVtJRhAxNRxchqfC1YrUgMJNFK4LSLg7iYzKuG+TXDHG1w\nUDqG\r\n=1AmN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJuxeQiXF5SPBgfC7vBZ8lODKqSTvzB2IxMrltHdjlsAiBUee9FHsTvM9FjZRsPwWzkA+zcXC9MBQq/14XAixAU3w=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-aa926f5.0_1571184124121_0.02509146210589508"},"_hasShrinkwrap":false},"0.5.17-a07dd34.0":{"name":"graphql-toolkit","version":"0.5.17-a07dd34.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"a07dd34e16527cfb66498b2d16347845d09daae8","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-a07dd34.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-/TCNNB9OI1u5Ohesg93hLPHTPTaD5GawBsfZDd+tdXzf6G6GAf2jtGMBpzXWsHDaFqJUKH6wYj+DpU2XhsZlQw==","shasum":"1a688eaf210bcc0d0a04a3347c3fbb10d303fa3d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-a07dd34.0.tgz","fileCount":258,"unpackedSize":412167,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpnJsCRA9TVsSAnZWagAA5EkP/jOKYGciWliqNk9zZo76\nx4940sH/b7U5GlK8GPQnLFFFXCODgfyOaEdPc4L03rlNKFj5m7UVfMYLn2Xz\nnqhHtTlSAt9LfamhTTLNN67RGN1spgyrMQq5zdp3ST84+2p9dHsuHs7A7N6d\n0st1dDfSXt9WGGPoo7sKmd+AB5P5THo3L1K3OU3ewPOA4mUBgQ+vdIjPGswl\nwRJS8gC0DCDYcAfIqfO5ez7lTL0EjVfOs/kRRRVkerA4YV5Vj5PaWvIRFSaI\nQ+PDdj265GsxfguWUAgFG60E1VG2h5d20gij7/PJcLPs6NxfsdwGygflOsgg\nlsDwCDyHqeJGMuo+8PLLWKeMvMWzqpbpJ4L+gYtE6ucUSYyiU9Ej83rmy30w\neiHNUY6v/x8IJSu4m2oFWCM3oQR5aCZT/BiLxCgjUigDVRmSHKP1ArXRXCNE\nPY9c1Pdl+2qnAjfDjHqmQ9doHUhpiEJSsn4K8TzFhHZNxYx2cY+XhRMpEy7c\nxaCBZNACoeVWO5pGC/XGlwOkvA03en6RARqfCDOXZzZ2XOBB95ztUb2n7COH\n6NmO59/ZMGrbUqwnJeDv8rs0gPVbAYfpPEZSXYgdVf9GWUimS9qfe08l7+Ak\nnRNhKKLDgK9rmAbXrB4itSAhufI9TBBHvUglEViMB+0bLMAFA+YLwO+bGmM0\nJeW4\r\n=WvxL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtrXM3iCnuDVIlqCg7Ld7fp5JZ1QZdxGlPDqOJvdFadAiB/lByzEtGhNdV4LLYfKFeZ2N1xmTLW4wmjWCMOJgSGyw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-a07dd34.0_1571189355870_0.035201424716006846"},"_hasShrinkwrap":false},"0.5.17-5689b9a.0":{"name":"graphql-toolkit","version":"0.5.17-5689b9a.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"5689b9a95f4c12835d3991ace77fba4e940aa03f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-5689b9a.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-QD02YSYE1PRcQgKcSvl0cmsMcU7uYJ6qHrRZuqJkbmo6zN0vzcXmrxmNaHzmOa2Vs+Mu5zkoud1LEfR9cTytkA==","shasum":"a169c616c60b8cbfe2f4d82afc652350c2e6329e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-5689b9a.0.tgz","fileCount":258,"unpackedSize":412173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdpx2oCRA9TVsSAnZWagAACjkP/iHKsrm0g0eFHu+25Uth\nKMHtVgDLL0bvJqhGNOEUpmbJvbs7AJ4DgDfgX5OEMYO5sibfnbNitRXb0192\nb2KcjzWFynDR8skpeIVJ0isceLabEFgkNvYXl8KNZ1fQs7MHYMUIbvtvfmkE\n5EYiVpkuSBqvPc6s/3toIrygMbwuQr23vYJg6BfObFksgt7awqBpulyzWC9w\niD8d0ZQxijTJgU7AdFtuRzFbiuilU8bENQO9SrNQ6ydH0MfpgddoF35xj2+K\nFimO1DvwgLYr9E6t+mKbq5oMRXH9n5teK8MUOdEY4EOuqDGheUcPlJWQEZKv\n1at3VS2ggfCD1ic/ioWB69wbiz83nuvg4UyBS+UGUWZDsWFgtceZBlULatRZ\nv2Am4yUm5OEFoQWexz9Ae3mDp0gYmd3MdoZN2wrG83LgaZ3fUPqBA7h4ITfS\nR2QTUFLEmv8fw5auzku7eJ289N5T5fEiTeZm6cDmLGl8B3TOcf1Yv1jIsj7l\n+zeFO9Aed1IucBkGawdheypOQIwo5Al595jQJPSi5rS7lTVXUST2zCndASpi\nlJ0CwajDigbn3ai5aBKXyLv7J6TMPd9YBz3xIidVxOgcvWVb8DqO9WmNbOD8\n9wQL5QFtEKxlUgpmd5HeBGqNblqiS1HKqBH1DUUytJA++MWBPArXKDE/gyhQ\nH6EL\r\n=TjdZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHb5urGZnDWvT+D13i0vvv6T9bDlYpA3h/aygs0y3JvuAiEA+9Yy1qO07cSCi0x5PNv5kzYkJkILy5jzpvByS++B4t4="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-5689b9a.0_1571233191604_0.5841719913407959"},"_hasShrinkwrap":false},"0.5.17-bb6aacd.0":{"name":"graphql-toolkit","version":"0.5.17-bb6aacd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"bb6aacd6fb34ab14bb19b3dd844b91cc0a252c58","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-bb6aacd.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-XPyobegWo4lBuNYvIlhMschvIEl2WfdvZScaudXfC9vA21UsiiUr0VrCL1rPimjK6vONLFU4juhqsnrEe6gHFg==","shasum":"cfaf58ad955f936e6d487b9bc8ca388f55ee77f8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-bb6aacd.0.tgz","fileCount":258,"unpackedSize":412194,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp/6yCRA9TVsSAnZWagAA5KgP/RNpyQqrghzpSFAEMSel\neyeYuCOvIjHDKonyRFQbm0pYSE6JuhbOf2VizoeAxo6AAVhcS4VD9vS7+AUW\nnjHjpzdSS6UUGLfmwYm0HNOjwwEF+OVZXNy5TboRciNRRDWP/E4XW5SGwfwV\nGHSGowioja7zaE4fmMp+StofG3u2ADpFT/P2uz1vjXy6cqxwI6Iln4dbgKak\n1+ALLoDhtaiqtlFobWJBK1tKfy+QxawGOWUkveXc9CZ61DA+MnbaAKOzwZGt\njB31mC+lwSD4bvnlXkRIY4VzhqeDBQfsJCvmjahTQ4PGuQr/h9zxCZYegrDH\nZhM37bQyBAgAAsnliq89ZjUHfT3T23yzzS3bNFrZJLK4RBjd1t9FcHYzu89L\n4xhwDVrhCcKsepeuzZqpz0sIS56aY72lMWpMbW/vJpP1A18jqpsibyo26Fg2\nNFyVOvdCwschClnMyNeXxfgaEF/MEmQRXb2sI/SD3+npfE/KCxFJtjaxlSNf\nM3wETMk5qD9h9cyN3X1jGHZEryYeru+9vZSTVsByN3qRk91JYmoHh0MPp3Wb\nnP0Z5YCoDuXBcNPZvzfsmQBh9GgljRjsJ6p/ptdhkU915ORckFnyiAYRatc2\n0apidk40//8W3dgXKkwSk70IStXd8fTNIehip2MeleyeupLvbxZRB/1bHThW\nRhFG\r\n=98E6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAzm7yGRj+dmzjs5XGXvEhe5g4di+uduXirlWPFPirfUAiAIbIhkFPmmY3LSjMPPHpbruH5QxySfejBgNDaiXij1MA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-bb6aacd.0_1571290801193_0.9340818140894012"},"_hasShrinkwrap":false},"0.5.17-9ac6ed4.0":{"name":"graphql-toolkit","version":"0.5.17-9ac6ed4.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"9ac6ed42cd6dcfd7353b07ac9afb0b1d254fc741","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-9ac6ed4.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-tSoIgfLtBE0grBJ5/onWe3KVDGSsu5k3JDpqrrqeQEGntRooP5f3j1sekiuWVwy+e6fLhN0fx/mPObyz+N8pmw==","shasum":"943ffa4662dd872accc635082dc2d1252a19601a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-9ac6ed4.0.tgz","fileCount":258,"unpackedSize":412218,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdp/7cCRA9TVsSAnZWagAAeIsP/23X0YX4xxM0AilxHehc\nuXozLkgRED21nxkAUwKULG7pd3lV6XP7pYaJ5WyIGabzH1AzRmPS6huSgwsu\nUE3LkM5p1y0Kw3TbwAxyTp6EVMt21rk/nXyPdIm/NF2wIxAWHYWjJ7/Rt74N\ndzK4z0jw3PmOApyKX6mCKZ5Hw8X0t9v/JvgBgbi/5hPLma17TPvAjkWZZw9v\nYabgPyZOQDGvbNnScF6uBtbj0quiqraSZRWF8B7Ykoe2qBMQ2GytY14wjBUs\nfqCUSzgXXTJbxmWHO9pSXJTb/b/yp9vgl5F+Xgux+IYFX7jJ58ncaBJduSul\n7faArA9E03h+52P7RHktBnqqYHs9o9XIk5YUeqxptM5BDShLI4rzPAPkBvZj\nvrCHaYflS08zQTzkJ8HnFtrwtu5XY0YMoy9nl2xvYRqm3IxtzX74A3n4S3We\nhb0KWplnJQi6Xv+F4Ggo88h2pvV1Txm1EH6A5BdWyKBawp+ynpsydsQOTLRM\nGOH+akXcyl5KzyI3BmnjvbfMjwHH9qQZHq/XpDbGPqvloFOdmLsxFQPDwy9Y\nmA9JuS7jTgjRviVkSVsTBVW1SVzQjdtGvhQLaJVRaO+3qCXl75ychb1MH3Rf\n7O7vQ8ZQfXM3W61IW1+SXrItA5ktP6phUvAWv//ry3QFl1/8qUBcZS014iWm\nmshR\r\n=vt5J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFiEP3EUXOZ0Ifpal5QkNwqGUh7iT6L5o3aWBpt4YCXIAiEA/fuuBLAI/pU+hbxYCxgdtQria6GCKAxD4U4v2ZmJKg4="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-9ac6ed4.0_1571290843493_0.0821499655564526"},"_hasShrinkwrap":false},"0.5.17-e36c3dc.0":{"name":"graphql-toolkit","version":"0.5.17-e36c3dc.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"e36c3dc1675eea91bf955c1de212b4703c81bf58","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-e36c3dc.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-h4zDk750bQog2Xp+V6CEa1vviFXqYlubJezaVqbyfsc77hMY5CC3/jZigaNT26oSS7qACduaBMb4BntUhWbHjg==","shasum":"f1aa28c465a67fcc426faedc7118cfb3f1e4b9dc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-e36c3dc.0.tgz","fileCount":258,"unpackedSize":411544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrWBPCRA9TVsSAnZWagAAFTQP/1D1VkdBzBBQzY81ynhq\nD6szwRDwd9qlKMhnxmbOjO4UfemVYXE/LnhxAlbDuUhFwc+9rQ+eDF30uWCk\ne6MbTqG3zuK0nKKkSKDPPAogCq4EaNiITseqxhg7lEy4Zw8PNnbx5HR+mD6B\ng0JurZ+OKNIB89omV6eItiH11zJTAtoEo+MDVG0QyRkB7ylWLFMx3099NF2y\nhSO56tYFefe21DgTu/pYhDln8qd2tDVi4OF+2vZ2iBr5UjQUJhIK7H8eRA1C\nKtzjZIehXShQKvTprrI8ZIClV4KH4aM+sDOewMoJw/EZQdt7EMUbKw3RphBP\nUv4DNc4qV1cvB/o+ehtZTcbSH6h/MFNE6yN3iti/tLd5aiRd3P2jX1ZTHYZk\norOwpw6kWiRKomQ1LMeGKr8pDZY0dC/8P11ZYF4VFNrVmrpWllOmgO3iUd52\nBT/9F+XLF3SRfG0txPHpBBsBE23w+/aLzVELiyTT45vTOukqLfVoraFaeuay\nRoiLInyuL1tCqe8Yr5xC2d8nFJwt2gPHQIY6e+a8XHdhK8kw3XySADDRtztg\nJ4Hdn91MNgFtrZ7x1BrKEXWdBYk9lDyHJwZWBP7BwofF/vmFNXGYE0hjAMZJ\nfDFqAHYvNTlJTvKNPNx+ZA8akhrUXlPPwJBiDqrm2fhJVOkqEvPKRoeV19O5\nKBEP\r\n=rKEu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFE2km+/vKlfYoKQhPi8LahUsvS4mDipCpGTAWPKfDOAiEA3b4vc8zyu/jYGCKWIxMpVrrlfwo717hzUDXEGw8wL5w="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-e36c3dc.0_1571643470427_0.854019626297037"},"_hasShrinkwrap":false},"0.5.17-c364761.0":{"name":"graphql-toolkit","version":"0.5.17-c364761.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"c364761bab52d383624b252a2cd3fd24ee614313","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.17-c364761.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-2uiDiTLWNExQ4z1Gx5nCX07wsbeogyTG4lSWdauNI4/pkdJlur+yBRbL+HOggjyBYToWPxpTTmJG+mW8tbhTsw==","shasum":"639eb47aef6ef7c3e5e6cf5df57e60b66c43b37b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.17-c364761.0.tgz","fileCount":258,"unpackedSize":411601,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrWNMCRA9TVsSAnZWagAAPxwQAJ08AjYBM6bo7eNDoIOE\nQiW32mpFtarVTQDiP+au96Rvymce6suFamek1beC4ROkpk62Cjg3cLOaQq+J\nsmqtpAeQapc4YBc5c3rlCBXkxwezo3cWy5JPcLvZRDgreYqSMS9DCvLt0YAu\nIbQDTUb0tEuSmwILz3jv1oEaPtO293pIQ0HOZCB9SwTYJvLFiwbhcUK6hsoh\n7l7BviTQ/XeKhYE+VxYRbBPpBbbKMI1eku2XS1Q2/jE9o7F+9Vid6nImEGac\ntwz29+Uy3Jwrd9LuZA3nZ/N7THaErTicY+EEoD6gkKRrwrzaV74v22a3CV8K\ngXJipovdglnBMGoc0CcqQDKAGIjYC8txq5sB8ctw3MpvX6BSTISVmqQEjGd2\nIMRrLYTuaG54Zk7vmH4NDxIA9uOL5uRCqBSghmNj1L192+F2MulJcGDnOLa9\n8nyQjoytRMlV/bV16BkC0LKuweWus9A2+NEJQwhs3E4FLBE6YtbNAMZG6BLm\nPPTLX96m1IXV8k4Kj0eiu46CQKZefFRJJQ1mldAQSfZ7uBm+Ydr6GSWOmVV2\nV73n82mtYGH7sAM35BEN8OwUDFe2oqYnT0Tmg28hISxinFcftL0QjyMTI+AY\n6VlxkQiZjuQ05SR3PQeFuxvqXT9JodbZfn3om0GIUu/j8EnTSs4y8FvYCvAS\n9M+O\r\n=JYVZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuZ0VX6rolahb72CrAr94TcEsPBFN165SUUixiTn8SsQIhALG0PWNSVj70n9EVcGIG8bB7RgO1K9vELiWWW/RB7ybp"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.17-c364761.0_1571644235579_0.6384408428842672"},"_hasShrinkwrap":false},"0.5.18":{"name":"graphql-toolkit","version":"0.5.18","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"gitHead":"c364761bab52d383624b252a2cd3fd24ee614313","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.18","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-METklN7TNlcVeJi1xSqDnRCzgu7YVzgXsU/iRpYg4G3znCZyXK1UBedd+ypndOg598bCVkEv4n+daAu+882EZA==","shasum":"db6d5a5564bd91341620be88af472f611385d8df","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.18.tgz","fileCount":274,"unpackedSize":419090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrWNyCRA9TVsSAnZWagAApHQP/2Gc+Ez324IIG+xNvpkI\nBYG0CjkySO7IePPe+bArvekVTdGuLVdFdsNH51CkRCpEV3WEsxwyZcYh6DUR\nf+phWOEs4OM1DzuBxGpFiWiyx5KeZ+KzAT1gYxDcyAM6e0pS1Ykj3Sj5g23s\nxsZb749FbXGeQy4ZCNF7eJ2HHtxtnPmIe9ygAvKR2JherDTfFe2/1udHDEmg\nhw0EcaKqRhqsV7fnilUsvHVlEybNw/ZKUFonDJlNT3cFHrqKJRd0RQbOqzZZ\n8C+Iznwqfkyd0UpJIlM9mOO88QGGsgBvUQyZ/Z+lkv9eUzOj96ZjAi8R24iM\nKLEDivIQDd7N4KTJl2VOhfo2rvkRDmkZzT+nhKGqq/hdD9cG7W0+/U6EI8GL\niKpiAOQy+KNfBCdgeSxCze4M/SED+2pXpusdqRwB15rLQ2ooErPEae+6hok3\nnSlOSORB7hbCgd0Ucq7p8WfZHcNK2Zcog5fvg/7tAugpatU/FS4LpbONPWLO\nRexZdqPr7k8cymWPHHK4oH4WX8QbaKh75VFg/LJnwqCjkwXV/ODX//OYvdpw\noJnxdZTvYfgIXyMuTmHYvaiwFJN2ohdOyBr4UpgoUxhrzRcbQOp6f+gG+uSU\ndfubc05cVq4dFhI8Qmkz2aQWoD0PzITzsZkkWqWFhEVBBgHC67dN/ME4l309\nK6Qe\r\n=f+ae\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEvgl+A5Z6Xm8fXZj4ayjVAGMqWogrFr3oKC+sn4u+ZNAiEA95HKDr3Qa+YK0aDNWQ4Kz5qJoykkJbBv+FWCZdX67ns="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.18_1571644274155_0.995245486181612"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.5.19-7b32030.0":{"name":"graphql-toolkit","version":"0.5.19-7b32030.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"7b32030a98c0a2c76f7c76b2902768e4de545bac","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-7b32030.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-AlBfphqW5hQUIrvBBD2Fh+nACkOKT/zC6GQJ+bRLEWqXELkMRU3NZU4w+L1X6ZW3AK6reoqTnNklrCqPtyxgPQ==","shasum":"96b11c52e823cab2a1af745b26e235807667e604","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-7b32030.0.tgz","fileCount":258,"unpackedSize":411604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrWPACRA9TVsSAnZWagAACW4P/0FwsFuIxKI52lDnsZvl\n/OBTPsdVZHIE8ddFTJt+PYh9ONtUQ+VPSOmEiCf6TlqjVtEQ2P0Uzh/KxaC0\n1aD8HV7vJFhtUHMoFsrZW4DcAuHbOp/FmXz3E/chEyJ69jcC5l/fWN6XCjuF\n+a+7COMnpCNHY89b3qvQX1I52FBbaDsdYx4s0xj0hv0v6lSvQ2QohfR+QK94\nP0rLaU/Ubm4cDXUtRXBi5sbQPCv9MlN7KQpqxjfpNVLIhDvKcjYlU9SBx90L\nPxCZ8LO3TEQMSgXQ8VyHxJeHE4f3qQPiD0QlYoMo8AXZQA59gWo+uMBK8TWy\nuw9K4PybpJ+cUVczicwFevL+1sbTPQPSTBK002yP1Ad/5N4fxIXxZXC7WUxf\nfFkWfz6sXwH6+tV2bWssiyDPzwXsNKZyqpSDjRUphJnQp58Asu46fyHnJ8CS\nRHS/Ux5zTcCcu+sg3BrnTda+bjxNHc+tjG8CTc2KEzrw5z1Bf23OHARYTP4C\nNgMs1bvbivsQOAfLw61cGzaHHbhE/SKW59T5fi/k/PYmr5Q/cnqDJszs12pW\n5H14o1pPkhcwx0sxtypuUGsG2VN7n7ZyRDUzdWvl9VhydBUz5ux5KPc5AT+q\na5QbGmdT4n/q+ki1dfKguJDFKUyVr7WhqgpNYWPUjkv5oDkapz/4sI1C+ksc\nS4qk\r\n=38c1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjU9PR8UEddsN2OsUPf3NSXH+UJPc73WOD3luh/gZiMAiEA2f55Dm2KtpnIN3HbXHdlmjRwYJ/8N3Fuv71GLwn3MWQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-7b32030.0_1571644351800_0.1496355551522226"},"_hasShrinkwrap":false},"0.5.19-c56be26.0":{"name":"graphql-toolkit","version":"0.5.19-c56be26.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.1.2","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"c56be2611ee74d99d844a90cf8dcf0fc79383a22","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-c56be26.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-O6dcVzeEz24/koXRLN1kwnNAw+F5OaUBkWR0pFrqmd7+vL/0WaJfjPt1czRS+YqLNkX4ZKOTpI3WtrrYjASEmA==","shasum":"3a0f411df4065b04ffa4408da6307eb720d42186","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-c56be26.0.tgz","fileCount":258,"unpackedSize":411585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrciLCRA9TVsSAnZWagAA1QcP/jtYdY11j9t3c5eu6MPL\nuUrXxdG0xMeBCF+7i2cVAJ2bqnx2hrIqosAwgTFne3PJGQ9etxoH8y4P9TV5\nhXVtaKFX/Q8hjttj3KyZsnQpSxxPBzLo7HZsrfsStPT/Up9CPYlUQF2CqWrX\nO5LzG4GMKwEs3Ys5mF4yvNsAkXGgcDKeSMTgED/gYxFZsdxPx00O/CrvRO8J\njC9BiJTMBxbQXcIb+gREok3QrYtcPNrhGkki20455cpelxIDDXNyBu070han\nqKAyjqmdQtueAauaJcpA/T01jNCF8qpbioUW20556xFGr+FcsaVYaQekSDt5\nXiOnJys6XaZZ9zXYyZWLT1lo/9LAekRC659ztg3rX/YlKPpOzED0lEqoti2/\nHI+8VdKO6m5sCuDjgd/akKohiLqOKPi333pViC5fvvuGDAGUneBlKza9FTMr\n2Q4XvGGAbr92HXOcMKqbRIaRfgepxT6MIKqocjdv6dHMo5npQsd7xbY+yVJl\nb/yeQ7Avsfw1kAQkrHdOezGpRvyISHObCSExSfVQgiNkKVcFY3O8TTtUzc+i\nHWP/JoDBtiRg8A7MGg1M7JtfHBzPp6sGw+Qhumbvi7Rm9mNAKL6GGWSHKey9\nRvMrOkkTD6zWkGAGkujscm9+5vhVp7eKWr7x6NWlfhOU85oTMw1VOmqnK4Fx\nQaZo\r\n=a90m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/VLRadWbVS4kuTjbMkLh1hLVKgOEsDzCO1TXIXKZJlwIgNZbScTXoGH2yOEYAc+OVnXvhYttSGy+jWAFhSCkHGvw="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-c56be26.0_1571670154182_0.9201534656784089"},"_hasShrinkwrap":false},"0.5.19-6f61617.0":{"name":"graphql-toolkit","version":"0.5.19-6f61617.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"6f61617b7e44a164ff54660d6b1c7cd5f533c6de","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-6f61617.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-sEblUm31FoOEDrcKY81FU6BvgaHqnckfhQht1bxUgkv7ynT6G/y0B7p3MUlep76u93F9lPP063pMPX/5XTR3aA==","shasum":"2528eecfb196c19097d03bf6ad115de5dece2223","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-6f61617.0.tgz","fileCount":258,"unpackedSize":411595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrdIZCRA9TVsSAnZWagAALVgP/RPCsU4LXY48RyiRLg7S\nEvSwClKlMHQwNa+0e2VPUx+vM7dMz07gguQk/72h52uBRanWdVUz2O0Aik+Y\n+UXHVO3TTlcFG1NRgb7OCk5BI7vyshLm/8eRmh+WemcUwpY+9vESBN5LyFuK\nhxG810pZYAGClkaMHyBQsNrJbO99btRwBdQTGonzlWYh+bI3p1CKxY3kq8P8\n6JR3LjA8Bn++xFz0is8cUcSmewz7aGYfNC4Om1CW1qKykzNNG3RXHFcO/UYY\nn8tSu1V6hpCoZdKQ1a4k+U8Sg98VM5ECXfEya/QhEzcydH+f+/JsMS/hIWgZ\nQYxKyA8FpD3WEjpX/5RzMrG7xT1TX4h+mHHfG7H+Lmv4+d59nbkuRbybP5qx\nfKA6sU7CQ+IOMo3C8kF1mNHwVwQSH3ZcXaXygJDlnb3HFyzAcS8GQhk4Mgrp\nso+8uLL9uVaPqJB1yka4HAIhnmxCnQI4Stxjpc5njRHHOz1SE4i+Z+qn6bt7\npJZsap6p3bgpPb1Fe3tv6bZO0RiNRFsyk4iL7OkOoaT+hMGEk600jnvejiQf\nAskwOBj0zG9bUxFLCVL2JHQT45EeGDrhjc4mg1WRzhL7bT46dY1jWQ2u0lHM\nl2lUMGK9hKoLurm99ztu1Au209V6v2QwK9NJmojqDMWNMRMuR5CLK0O2bAV0\ngpWU\r\n=PoFJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCv/92tJYboyrZIa6UgafvpCE/7FY3Go9lv8Od4E+t2lAIgDQWBgWvtIjRcrgkGLg6fCPfo6StB24NsLNvR/7JBJtw="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-6f61617.0_1571672600410_0.6036040150490514"},"_hasShrinkwrap":false},"0.5.19-3aba8c7.0":{"name":"graphql-toolkit","version":"0.5.19-3aba8c7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"3aba8c74e1246d13a57ce3b431900b2780468a10","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-3aba8c7.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-BfLs8RYJJsGlWpAqwXXbCKly4zlNZDlQU1MMdLmDxeH0BEL5ugt065HmvvHkFgcpmkzMsFSvoOTR5odeOIsJmQ==","shasum":"32cc264ba9a60ff8e120c108d582b7ccd6e8e83b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-3aba8c7.0.tgz","fileCount":258,"unpackedSize":411590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdro3TCRA9TVsSAnZWagAA5OIQAJLcyIOLUOVFtCOW8wGo\n6qmZ6FK9KKq5DOSLUURGlLn+Szg5swKIIyHdu44Pm/oBP0PZfbiiPrJ2nKD0\nm/uwrQgwK7PdnInpWGT4tGy8IXC6NJYXooe2dWtqBvXFjVkfMj5PhewIsL8K\nxV2cG3kx2MaDB7TNcjsjzHl707uHbslw33G/rjWJO6fKabfHkkcFVv/hA7Z9\nsIZlWRv8T6foRmrXaTwIf+GEU1zKS7QeBH01Gje4nBj3n47toZz6SLId4jab\nh36v/GL8IBjhvLIucAw/fh5C7jdSBGBXH7ayp1vH4vSzbBaiJzQYC1KoGTiS\nC26Q2QplKt88Gwp1HNqN67j2dwGKXaWQSnlp5IsnCKNxgcq99eKTCRlYZN6M\n+RPRFMRBMPa6zcHIaE/iF+IvDcGv4FHuBwZIHErSjT34BI1IS1QJlexSClkk\nH4GkkFB3Id0HxSQCt4VYzZ/f947ggehZesLLUiv41x9mzF8H2rA007DXsrPS\n1IdifdjlR++aE9eD9CU5zVaj5oxbTHe2uj/YUUBC2vEc6m/2GqToAOxGpyyF\n08Zbl53Jbmi+kPTxuuPVKmsdudvr9GIpVKazHbOOh7f/eYTCyTtTqnKAcj2I\nOWetF29rQlnSfMIvIXZhkRmVJWK/XKWFid9hyfolJq0nOgNYAEItmqeTPPVP\n8RtK\r\n=BOJo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICKRQdv9QXT30Spxcviz2Z2NdXr80bC3TZAi8HBigYDRAiEAjtC+G73FesOQpfgeindPVqQigxf2yrON/FeDjw0pCE0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-3aba8c7.0_1571720659113_0.5202480718459839"},"_hasShrinkwrap":false},"0.5.19-8daa5bd.0":{"name":"graphql-toolkit","version":"0.5.19-8daa5bd.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"8daa5bd906791a5177c41e4cd0cb3df1dd334ae6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-8daa5bd.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-av3O33WLzqcaeKKyorooLYUo7CuWS3fHwrrCL3YKIAzzXC7+KCXB6bs+3qtVY77i+v3+wXFKAmfVufWISbtx+Q==","shasum":"d00b23ec9625785e8d2814fcf246b90c54dd0325","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-8daa5bd.0.tgz","fileCount":258,"unpackedSize":411590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdro4wCRA9TVsSAnZWagAASNcQAJ7YRp+GUNOU2plcqXCQ\nVwh3EPiJDluFRPGpS2Ve2OxWN/6bYRYeAFWVFdgW0GmOrxU7+Dl8kHzGqj2y\n5e4vblC/t3zqfkjs12i9BPpQOVMOGHrtxUKcD+2LDtnkU8CAtpmNaPjsvnIS\n2MqaqAbjP36msrhB2zvX/89uJw7C+f5YmM82lhgIEv/doUA21RxWGaTLUXZ3\nYh0Z3It2svt11v84LIFZOBRiLONazsA2L2MLy6am3wlv/VKhUWLwJSwXC77w\nWzOXmUnqF45J3n1JFvqvsze+pHdKDelux9O//GjaPx/wFum7/4iFzYKwcGD5\nyIwa+JbhHPVCoStvX/ISldyYjt0J9WLCu5Z5hwxumqZqPAz0Ej9Tryx7YMXz\np0YVqOcs8QbPaTTVGmsD5mfvK0+ElUxO9qwb9VRzN7Sl8l9obmgOEVsdMzE+\n/dVzYZyWjnN+c+CdKJnf5waj37RQyDnrt04Hs+OTrp/hNIYp6B4UQGhlRxUM\npMJ+3V9W8GeJcfTCQLZFXChEly3Ckfy11iVoJ4s8wwb4p5/FR5kavg3tI2Hh\nO06mH0iduYkrCeeyERUpW/+R2EO7mpchql7YNqVgSjQ+8i5Cj11aOuw7igVL\nk4Z//FSeZqkgW2x0g1hw8N0+osTm7PdJldRmc2e9rOhIobd3+rsiVlw8ZlRk\nkaf1\r\n=c42q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcV77R7WjEzAwvl0zq/SK25S8oUe5W/xGru4rdyxfpiQIhAJVd32cL5zm+4gspno4NqO9nhJJl7qWUAQlc5UE4k3Wk"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-8daa5bd.0_1571720751699_0.31700805491865114"},"_hasShrinkwrap":false},"0.5.19-d8c416e.0":{"name":"graphql-toolkit","version":"0.5.19-d8c416e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"d8c416ed2b2b64913af7737f463a804167741425","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-d8c416e.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-P82jAJXirryXInjwTHfaJQMhW8kyiZc9WNeYjC3Xa3xCLcT4DTgkHyakJ6dj55nCn53qzPgAQF9p2enVUPt/hg==","shasum":"852584f01730f130e6d664cca61b53b3e7638638","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-d8c416e.0.tgz","fileCount":264,"unpackedSize":416207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrs7lCRA9TVsSAnZWagAAhvoP/R6V8Oytk7bFmTpwpJk9\ntuy3yDx0Nz3xvr3RcV79nIJmo61ayxQt9A2/qcOEUVjvus5XABLQ9XwcPnBu\nIcMe3kp06ke6Wj+ipjwidCnhogJm2sW1eMHQIgrmB3mk9x/zsDOSD5VIkbLH\n9sIIUJwccAR4Lp6hHy343ztGofCinDjkvV3sShgSClbgGWA8iC91TDVA1wGz\nIPxBhgzUX95s1fNO6QBFJHZ+utk/W7LQqasLvOqdrnYUMgdTn4J3m/4vjKSs\nqCiHQnLtbIpCOSYeY6C4/v9YxFT9z+2paO/zrXn2SmCZyvZT0JqSmxv6X+sI\nuIWb4ivV06PoMPsC6xMcSytzGTk7zcHQM/Itd85p0ybMjwDDERZ/uh0EFEGs\ngFhKvUB67GxTdTCyG3+LbsyIvcCMW1z0W+KuZhkDBHCyLMymvfPFJOW8VMeR\nBPKBBCkP8/Gqq0SMb2lcydmPButf/HBxbpNut8c2iahGkRoG4UQISK68e0x7\nem8JE/WTNvfMZzbMn+zK5xEshjUW1Ri+SrFv60z2nQxeA7skh3Qpv05CgYnU\naSWnsqqoW15iFC6Wr4GfffhLowXq23r3j6IBcVjVZ43aQBVwuyU6q5hFE+Sl\ny+c56+ZiBnXeeztYdidK9gAPc2pOn7aKnnTAtLEFMnCLSxQ5Ax4HyTX2xCjH\ngHUo\r\n=NhHU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFZOAgd+g2sj7hMTkuzAxHVDWTMEGEgpQtlXLS7Qi0/xAiAujv5G5jWD/h37zloChCBBgOMEr5/m3m2CH21JalGUCg=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-d8c416e.0_1571737316830_0.8903560115082736"},"_hasShrinkwrap":false},"0.5.19-8273c99.0":{"name":"graphql-toolkit","version":"0.5.19-8273c99.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","format":"prettier --write '{src,tests}/**/*.{ts,tsx,js,jsx,graphql,gql}'","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"8273c99282e565214ee7d02d6ae8c607c69217d7","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-8273c99.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-UJXflKJdXu5yTL1doh5YAgm1K30GPnbRaecM/7FD37+2MjfrGRF2XMxWZ64eLIh/+MD63f+JnNvz4OFnyJcgoQ==","shasum":"593df9dd923d493ae84f3b4f5f0c23e6b8db7a8e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-8273c99.0.tgz","fileCount":264,"unpackedSize":417400,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrs/aCRA9TVsSAnZWagAA8f8QAJ8kiLWjQsc+L30Oe8ZA\nQIeuEcNSUPRaa11+xGCE2ILULj+TbeI5QqwFyTUxAyt3t0rXUaQMtCg4mY02\nK38jULUfSGp2biq8OqGvGU793gXCopJBlB4nQdgrJkX/ZmuxE2NYtijvrL1d\nwm14ySNocFFa6exhJBqitJ6vBufc1KdGBmQPmgTI0VZnLTZXTXfMreSAc630\nU34a8xT3l006E5/QPFbGdf61NLsj8h8C7oyDdhW3rqpfCDufOe9SnasBoHmf\n4QLmDUJCm7Ej0G8xViiN2b7dulQFbFXP1YhJmHs0p8RSv8i+fsGocT7abZDn\n5HSvd9MmVuhTgD/vy6fvD0MJI20iOJ0DWkBUI04DJejE9LG81aeAYCJNk5x4\nwY5Q3h48NkwATsmtWh9+98Y4obuVmYiMWGR4xmK6iWXElcRaf0oAbipTGJ2w\nEkjGeKIOT6EWpy7WOYKUS6VrwJrbIia/03BSnxQGsT8TDDgmZ/1toaHSJTWx\n3UxRavOjRy4s4+viynzQeZ7nB1wFxdbk2JBEx9HeDhuzaOJLOW2/KFNNkmaS\njU6r4IhZa6NLBSz3xBHuHhFtLD1KUTvfiRmTt/AtcJA8bBWbhCnYjBpt6lEQ\nJVpPud/cmOmFZmN6nZci37Ok2/ZOixhTRSuKrQQltk71sJQNNwkhR8O8Ry2K\nTjwv\r\n=TY3C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHaeJFd7xi4TDyB/AERce+N2XPluKd96FjeiqowkaW94AiEAr9caBWvZJPZatAJAor+tRLlM7J71ry488mYLbjH5ySg="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-8273c99.0_1571737561789_0.21708736935991446"},"_hasShrinkwrap":false},"0.5.19-a7cfae8.0":{"name":"graphql-toolkit","version":"0.5.19-a7cfae8.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"a7cfae8ba217de81b1ee21070048f2d42e8295e6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-a7cfae8.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-oCADQr9ox1CpSEQc4hDHqNv2hg8ainEwr8AODxVmKJuqxGK48DARik9EMtwI75T0fwEvcauxNp7lr8kywpzI+g==","shasum":"4e884186d31b7e5b3a673bacdef1f8fad8237cf4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-a7cfae8.0.tgz","fileCount":264,"unpackedSize":416219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtEeCRA9TVsSAnZWagAAIwQQAI3fUXnx5Pfy9Vdjq6hu\nPds8sTHGxsFXrdNPlZp8owWBgLKPVqP3LCv+1WgjLVdxrhVegKOkoo1qwgzi\nZbOi9B77fOspGaahyfP/12f4p2Z6p4R0prvA/IxwNNL4cdHUlnKpJFCV1vcx\nRLU0uGCzbliotkW18hS+E5XRsvX83HBG9F/tbX4yba+VLSzWIX/AAfaXUXBL\nhmYpgv2qvshvtk+Slg53cFpBEDiR5MkUGGSM3ZFcfrIPzEpn/+ZU7BJoHG5z\ncKVvkWRmFmdUUMno1IZ+Eh7thH1Q3TkR0FK0UazmreG35H+7D57F29JmbMg3\nead7+4VFjB9sfDA4lqvqQaHqkbL6s7PYNchzxe3OIjj6eD6xi9NZahj0Ayw4\nlWiI+Sj40WbndbqRM3uJvhcUwdDCTMjHc9VK6Ikf8x4UM6zO19mqYmIfCy3W\n/ZUr7XzmAAlFX1v6Or/UvGnqnQiOtThqkiHBOtF5Hg3gnPpe5+X0CYL3gQFv\n7OmTsOs/HcUxvX26T3f8zRV5aJYo59l0xBlvmFaCpin/+Nw/3qDvdNTikXE0\ny5lKiP9ouOWFBqS7dzyj43VupahG1S5c5N7ekOW3Ikacou3N78E4l6V9RHkw\nr2n3foy4Jqf/O4XoF3ZbuhOTxKe7V0DDtzGAKMPqL5y+1fMqX5vpLNsYL1bC\nqoqc\r\n=qV1v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCeObhY+RZH3EPsePFyahMYXkVrEvyTv4zOUfhHOE3JrgIhAMzxl8K0oVGzen5j+bHNe1Q1IlZk0PTH1r83wxuZVpOY"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-a7cfae8.0_1571737886240_0.7842345787710381"},"_hasShrinkwrap":false},"0.5.19-b7a35e5.0":{"name":"graphql-toolkit","version":"0.5.19-b7a35e5.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","test:ci":"yarn test --ci --reporters=default --reporters=jest-junit","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"b7a35e5b6aaf45758565124413787813a73b7baa","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-b7a35e5.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-yN9AI2KTaWJKYsr2GJxBgbL59WtRsSzNXPPGzS/KhYp9NogvrDcdDZ0qcZcWcfMzZcchMBNvIF4hQ64ME9tmig==","shasum":"560e062b05eb730a7a829a301a4f710860efda59","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-b7a35e5.0.tgz","fileCount":264,"unpackedSize":421020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtN0CRA9TVsSAnZWagAA1ZIP/iYXcPO6KDEBJWrqnvoX\nEEsaREFAEvvZG+/Z6zDV+5kMLv6a+otDH777RDwj5V5i0bUY00jRVNiCS1Yf\n/rCFo55/5prAUo/YXa9KjNznyCKM/RNBtequHy7dQRuGjR0avI61sdD9qqi6\n8gZSd6YgQkXdr5cndYDSxDbD5QYaqzZ9pIule9uJQweSoXKSV+hNjHZ3Kd+y\n3JDFMixzlPnlyTjTwq+07sNToTAjpRkwYbhuwyLDSG5+IRU+4a6u+JdkpYuY\nQqXkp24Os3ax77LAax6ipHMI2CKwuv7tnzI8hSiZ6wzTb465Vr5GNQUxJo3R\neCV1VwtiUXVxPIMnkBHdPFdEeHPJdiiJVut0hAavQbekU4ZZmSivHveDnzOU\n4YRWlfRm6yNEZOhzyt4v7plyI8g5mhYmhhnfLqqvo3aohQxcfFFSrZyXrtEw\nBHITmzYQkDlsfkzpCNyGFKq5BpJH40FsewrM0f8pySWBzaQ0VHeg56IVeRE4\nUIBHkIeE1ddYzh8VWoa7V/iTc6u8qNM2z3x0/k0wdqvCRENUELZlpgjhiprY\nXPx6Yrs0YCNZWGfLnq9OsjAdk9J2yVKx1YaLQBFTRY0SEqHmFnIlo5YyuIpS\nRo+5iQE8px20xl33APrXEFMK/SaliX4nVx3zyjvvS8/Ww7TtW+L0RlQk9TJD\nf0Ez\r\n=ER7n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUvqLYakehzTZR/ItKfGxgpaT8nISJl2vUNiuOQgtJUQIhAMO63cFV+E4hHdMopGlPu3EWY3PX6WJNHv15KyAgE5Ct"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-b7a35e5.0_1571738484264_0.9633352503527062"},"_hasShrinkwrap":false},"0.5.19-3644c9d.0":{"name":"graphql-toolkit","version":"0.5.19-3644c9d.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","test:ci":"yarn test --ci --reporters=default --reporters=jest-junit","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"3644c9d15c52f9e22ee78c85a2aac197977b9c5b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-3644c9d.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-1RLf9V/jzw0xTs+WunxP1uu2y2b7dVbJFgN0leR64oI4Y1tEdHKWSZuX5srov+cjNcUYsCLjInzPm5KUztIkFA==","shasum":"dac9098c50d64c1c77f08f1265e65d51aef318a9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-3644c9d.0.tgz","fileCount":264,"unpackedSize":421043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrtSdCRA9TVsSAnZWagAADU4P+QCGU5/D3YGqRqGql9Cl\nF1t4UGnrx9ChYMk5SZlJN4mAbAZYvcHJxcvApMqDrs8OAc4V3wimMkpDEv9v\naZQ5nrozTkWmvT+VYwV/jkgylTcL4AjVZs6N9ZN13OkEMCl5uWuJ+BFaQwG9\njs4lrFS26MKJxgJS8ax55IRtYJefBegBna5/Zkq/FF8pmES5vaVkXBoX5YnN\naOSTIyVf8pYOYqE7NM4B1upPUBZXABw9AKRut+miIQ3wvPzygsIR9/bb/oJ2\nixLjsxqUtW9Z5yRI9OfoamOKmjM9fprLZu75EIL4hwMahV8Coegt8YLGIWm8\ncO2pfP9xZzxDAdGhaNfac/Qi6MK+4Woc3Q0CBp8T2Ke8v5ftWzpQVhqQ3BKj\nq36RNfHpH26kYLqw4EYZ23c4YYzzBpsG2CDnQouqQCUYDMsSCxrFJ4vXvSTl\nTgONBfL6acDqy/NNsjoCH1Gh+2hPFGNFN2pcW5n8hUiviyeOeQ7KBcxi9S+J\noxWxdZm+8h3pyLOctlOAwkcmoLOVk7wyexihGOkz6M7Hxmk6m4ZcePO9pZ+C\n5u0G6/SBBzbRAeiCFL2eo7E0L9eRzZzEOS6O3YMjHrXytg/fNtyA+vyiq3A3\nOJrfNMW4qUKad2DQg7MMSu7IMlt5fYp6FWXnpZ/ZJSUWVPhme1WxkhQsZpg9\nH1+O\r\n=ln0G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDSRaS1RZyPuRUwtrPeo7KTWA439Vy4Ps1N2ygh5MbxQAiEAqxYjwTouYXiAZahJoEdgHPKcAeDoYeQMLI2e/c9N9eA="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-3644c9d.0_1571738780871_0.7128329679236127"},"_hasShrinkwrap":false},"0.5.19-89c62de.0":{"name":"graphql-toolkit","version":"0.5.19-89c62de.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","test:ci":"yarn test --ci --reporters=default --reporters=jest-junit","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"89c62deeef883b2de1514555d3ba9c801d81ad90","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-89c62de.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-qh3StZ2zGd0Ylz60YRnGOkoQ2s4AjGbgPQAu6VM18lNpKhGymyn8m4LJ3Bwl1JhS4BoBejWbtIofgizewC+7GQ==","shasum":"c1e0a6f234a6a62032ece718b48ba7b115fa8591","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-89c62de.0.tgz","fileCount":264,"unpackedSize":421693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrte6CRA9TVsSAnZWagAAvfIP/3SvYVjH1xlkKEE0dui8\nny5Fdf1Yya1H4jqZaQAQaGUqIjWPQ1jB1oraUQkvpw4ti2C2W6RHV6wge5Q7\n8rdDUb9DYf7dfTWovEZiiCyosRfHq68zWyL34gbU6XhGH5BKmHBtEpN4SrWL\nFXnmSjXoIgx4+cQvWTnklICgfC+Kv/HKt1FXliGuLDLxuB8YqUxRz1NLMwCT\nAaDPtLpA8g6YzKp3M8qYbhy+GjwuWT9Qz9zHhrj5GlvonsJKb+975WNvAdSV\nw8b5bCb3AeEFw5mp4DvuzYI2GuPO3Hy6Y92ZUwzIEBVRRyrboIAEUV5LtouI\n/rLGjWFzuSPVQL+OFUxE358NFZA4wB218wQnm+U7uk2jMxsI+oE8dHHb3Lz/\nBor2GcK68YZ0dgFMgj7fxNSuIziL0qFJioz1mUjB2Buqtqgnaja4IOwlzgG7\nQ5JN/skMI/aqAsB3XiAHXJ1VvBQzToB6S4Dp38mo+wGLCLmfxEXoZluUaq3R\nffnXnQfBerhwiirQ+O+xBwg9zJPmKmeqE0wF5TlUOkpH6Aez3Vs2n4HmuWWF\n5O9FUkBTdDVyOjTIxvUp8lFoa8iXrEw/BmQi1+FNnH7UzaBiTqowL5ziMbyO\nXeye+Ep0jLSHOOQEw7K2w9iwhxfKUBnVon7U0E2aBJ1GWFdIpqVECgCHFWiO\nFQnd\r\n=xRzf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRF77j9psp2MjH1nMkLtTGkjUbh5tztgJ69PnhfAFSEQIhAOaGqZ+nFukjw4bvEhi/OUnCqnk6BibiwCU4a/gj928d"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-89c62de.0_1571739578115_0.37447514228924805"},"_hasShrinkwrap":false},"0.5.19-f67e40e.0":{"name":"graphql-toolkit","version":"0.5.19-f67e40e.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest","test:ci":"yarn test --ci --reporters=default --reporters=jest-junit","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"f67e40ea19afc47f15cf266cfb79858baa28525c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-f67e40e.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-0XJ5D4NNuZIT4LtgcNgyhxRTvUPPT6fsiKYP6Q3UgS9hyoL4juU+N7KZAFv+KaRqHIvnyXiUtUPI5+rvsGBHDw==","shasum":"1bca515716952dda9e19e8fa8d741344a5fa6f9b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-f67e40e.0.tgz","fileCount":264,"unpackedSize":423089,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdruPLCRA9TVsSAnZWagAAX4EQAIFF0/twXzXWUpMhm+BO\nCeLlG6xjkWr1Q+c3YjGzrT7oVdutdneCLJfRR+WaMKd9a/Lvp1ED8NGBaZA4\nefcNtDlvZDCjQDOa1luOjGVqMNhEQBcFGhVZ7bAEB2U5QcJ4tPQ8ocBbFF+n\nMD0wrWgYLZI6sTG3fYCspsYW6m4DOiqb+a6Dfxc0pXiVhlLa0yuc0Qj46RDS\nl7NU4j9S2cTHRIc3jHXFaA5o5o8fT9VWw9UzIg5v9Rj1TX5xG8Sobklzx5fA\nP+RwcUz8LGaOJOqSApzNT/BMwFkZmmtAxHjP+2YVSoaMuMNb2CQSkNiuM3MH\nijMcErRuG537nlcdp4cS+Zl74ghbevd/9PLHADKHpi3aMhXElnTIhy8wO2Fv\nGQqd6Lr6dnh+cCuBZxulESdNq0AOmzR9SP+VWJxrGv1FaK8cO4W0Uai8oGAL\ncnXNgXY4W1qQIXcXGY1FhKgdg4M2uhpbPDlTRqKPPG2awNczFrawtgX7agge\noWcLasZ4iDFEmsF4TqSgGVaGBsMBfMHkjkMnfYxGM0ts5j/dJQoREYJa4XGf\no9YPhTYCser45jaU8cCjR+8EJwJWKY5FLCUU+Pq8tKpVwuQcoHJy/qbV1bVX\ntW3aBfQKjxf6SQO2C8AhFCdKWO7xZkCJevAUgQjfDfnQasz5tEP05H1MfWCN\nLVRB\r\n=NsKM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIACinC5umNOW/sjiN24wlvSssP33x3bIy3x3dzAE5o5DAiBXpDcIAr5tCS2Jo0G+nDl4/hxmRisJnhuZ0XDBlTTbxw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-f67e40e.0_1571742666813_0.011980779274894937"},"_hasShrinkwrap":false},"0.6.1-alpha-9c21e61.1":{"name":"graphql-toolkit","version":"0.6.1-alpha-9c21e61.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.1-alpha-9c21e61.1+9c21e61","@graphql-toolkit/common":"0.6.1-alpha-9c21e61.1+9c21e61","@graphql-toolkit/core":"0.6.1-alpha-9c21e61.1+9c21e61","@graphql-toolkit/graphql-file-loader":"0.6.1-alpha-9c21e61.1+9c21e61","@graphql-toolkit/json-file-loader":"0.6.1-alpha-9c21e61.1+9c21e61","@graphql-toolkit/url-loader":"0.6.1-alpha-9c21e61.1+9c21e61"},"publishConfig":{"access":"public"},"gitHead":"9c21e61680a69e2b2cadfbe7f24097100ccaa688","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.1-alpha-9c21e61.1","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (linux)","dist":{"integrity":"sha512-00x84eQFgMazL4TGz66Vt0Si6wNAqlG5UXQ6MTXIVeFu9C9b6aFdmbgp67iMdDK6+IWp4ZXYJYtCrXBoRAzuEQ==","shasum":"44a66e1ce48f4b41262d27ab983f2f48edfac76a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.1-alpha-9c21e61.1.tgz","fileCount":9,"unpackedSize":13764,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwB7CRA9TVsSAnZWagAAUVEP/Alpa4aFvYUTct1Q4eAa\ne9c2jH7JLaaPeqzkPfDJ2DHB6HonYFfyJazdJhF2mc0Mb8EQJvsF0W5kvfnF\nBsldXG3c6wKWtmJMEsxNMLpH4A4Yz5m+KfjJCXKURoHLKmsqb1rB2w/H5CCr\nZMChr1Vtsq9TxC1KEdrj5ifH494IsWj4tVFw6igJDetgVCSoJs5/2419wyq0\nSykVY3RaqnMvG0H8mkqGAUiCGUlcxro2FjXui8E3GolkdZDmFludU6qqO4xt\nCe4wY0dkaR2kECTnB+fH55Hs9uihy+e0bJZnyaFsmba37aNSAaKxT9XzF8uV\n+ftagqIzHsGLpUS14bFjkN2qIezu8UxWGARmXRw4W9KwQVKyYkKzF72UKg5k\nDLOebLOQnwKVBA3AweGe4rOKLRG3jL7Xo2Ut4YyvUdRxyrADbk66pU+Z8i80\nCvsu9dMYSA1hgfKolOcR2AnjpuATzxSMCDRfe3vmfFz2d27mj5p5DpJEZ+7d\nviNd5CzcEUPAa+jATuZljIfthjnOZLBxd1k/3aN8h5uUPAa6uouIATkKqwp+\nLm+Ahi9KEjwGuOKtwoB29HNgL07VkAqeZlvnvvDv+UneAfTOHCutpjT/+aas\nYKZJfH/CwnFa7zu99zMMLWZW48l8qXHI0y2AuXoYaZ+zWH+4vFtrAH/ajQlK\nnliE\r\n=Nl75\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOOFxqbxiF3MCQd9FA6ZT2wV+f4NxozBAtYiH869+ZwAIgF64e6/EcuPHkAJAX5T2/djPczjBuDvvq5rgdnZJOOQw="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.1-alpha-9c21e61.1_1571750011003_0.9279553340909417"},"_hasShrinkwrap":false},"0.6.1-alpha-33d60e4.2":{"name":"graphql-toolkit","version":"0.6.1-alpha-33d60e4.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.1-alpha-33d60e4.2+33d60e4","@graphql-toolkit/common":"0.6.1-alpha-33d60e4.2+33d60e4","@graphql-toolkit/core":"0.6.1-alpha-33d60e4.2+33d60e4","@graphql-toolkit/file-loading":"0.6.1-alpha-33d60e4.2+33d60e4","@graphql-toolkit/graphql-file-loader":"0.6.1-alpha-33d60e4.2+33d60e4","@graphql-toolkit/json-file-loader":"0.6.1-alpha-33d60e4.2+33d60e4","@graphql-toolkit/schema-merging":"0.6.1-alpha-33d60e4.2+33d60e4","@graphql-toolkit/url-loader":"0.6.1-alpha-33d60e4.2+33d60e4"},"publishConfig":{"access":"public"},"gitHead":"33d60e4332736d7c4668607e93dab8db3a990780","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.1-alpha-33d60e4.2","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (linux)","dist":{"integrity":"sha512-5SO2UMXizIH9d+V8nayn3xwXeuv9leL9nybVxUezyczfTozenPQxvaiVuwwiqv3X21JN63mp523T5vp9SwsVLg==","shasum":"a81f30ea2039b3df572f3c326fe0bb83c67dd083","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.1-alpha-33d60e4.2.tgz","fileCount":9,"unpackedSize":14889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrwjfCRA9TVsSAnZWagAAmXMP/Ar5y8TOl0t3YFVx17fe\nVif5WLx45hO2WWnBQE6emLuhO0wo6MJzkS/Y3foPwjTjKlHsJYqCM2adHMlh\nJXcWJYFxggPdz4UmIjVEDQmydLgFomv/Q1h3ngIe4fOdPsCjgYySZdJzCTA4\nkezLSocSBO6Eakw/7046DFR7XslCHRopNTu0zGtpISlwPu+zOuJf+JoXivRj\naNP/uUYRydgxJhLXsFl37Fs1odKSV8katPvIJlx+Qh7LUgq6Yi76oyzQ7y7V\nw2HrgBRDl+6CwTxLpjEgIR2cuft51jV8RMfsLrsuArm6rjeL79oqY0MVkdKP\nilyE3mVMFJR8MRNtGRmcTjKT+CYybvldANLVcAa1TSqcy0WhE8CxrR/m630l\nepYvdKkm4rvMHww529hj/3fmKNB3d5BOk0b4shGqsd8bIj2wKaT3k5U/A+kI\nGCYnSG65S57WFcjxDNztMcUn7+T+mz+2W0UGgLFJYs4MoooS5BMymk2Ra/w6\nE4b6RTaEeZ2kOAqz9vbjTEhEtivc9Kt0yPArD+RUmD0mO+NN1rRFevA+YjiJ\nwqr02Hwhw50HNyk/o2OwKoGUf1hg7rWpFTDajZF6J+xMfhklXC5txE/TEQTA\niedpmHLglA9VJirQkfBUrjOD1cNbvN7Ot3N8KMDxSjfMXBDBNdZJNwtD7GvL\nwcPE\r\n=58kz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCv2OHsc0aWlJ3xq1UBeWo4A11tmwiRp7t0MwePlILQewIhAJMTTLCYnDvoHm0cwCI3AWCnPhidYG0i9brA4Fxve4vj"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.1-alpha-33d60e4.2_1571752158460_0.5941577906637854"},"_hasShrinkwrap":false},"0.6.1-alpha-c775427.3":{"name":"graphql-toolkit","version":"0.6.1-alpha-c775427.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.1-alpha-c775427.3+c775427","@graphql-toolkit/common":"0.6.1-alpha-c775427.3+c775427","@graphql-toolkit/core":"0.6.1-alpha-c775427.3+c775427","@graphql-toolkit/file-loading":"0.6.1-alpha-c775427.3+c775427","@graphql-toolkit/graphql-file-loader":"0.6.1-alpha-c775427.3+c775427","@graphql-toolkit/json-file-loader":"0.6.1-alpha-c775427.3+c775427","@graphql-toolkit/schema-merging":"0.6.1-alpha-c775427.3+c775427","@graphql-toolkit/url-loader":"0.6.1-alpha-c775427.3+c775427"},"publishConfig":{"access":"public"},"gitHead":"c7754273dd141ec019258b0c78a2864640642920","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.1-alpha-c775427.3","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (linux)","dist":{"integrity":"sha512-2y4nyGMKnmPYvNpPxF2Ys+yMMNYW0TCGMH7y7p4XO+SXKE0+Sp83TpcVvY0WaJEUvpGVeHPgMBkwlHqTZe2oZg==","shasum":"bc960e06929cb55440ce6fb10a6ea6b2b238fae6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.1-alpha-c775427.3.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdrxtoCRA9TVsSAnZWagAAtLcQAKO3t6yD4VSXzjnqlJbi\nO/dsnI5zWjOdIVWLNAl8xMZjhYk6RhNf9ezfrNqy+xJveZ0nUBZBRqrQfXDQ\ni5mzBbY1t9t2l7gu0CPs1hQn4Oig0cXZZHh1UpcDXCEaJ/YEJ0NEXiT3bI9h\nURvZoz4LzZwCHavLAf3bdMtTHfhBu35sutUb22r3UyRAzS0owiXoC64N5nHj\nNleu2VMZc4eXv9rerM/syE2ClDs/4ZXuvtKA6HsDZM680XCBJkgL4RGccmJ8\nE0TRvYv3x/1ddtNTbNLG7lDEU9Nh7LOypfcFB8jk/oHx9MztVVHoEAMzKzkh\nCnRnDQqSvQYMp3ZGkg7chcGj6al2Gsbn9T0hexOxH0Dp11F0egrPf5r2Cv8u\nCwhSKr3eOixTTUYuepTrEXrZSO2x4yFCjnt9QjEbqJQ9c2M8xR9Rz1ygo34n\nlspz9xZOLWd7iiwLxrpCjpAR9U+h8qREpJSMct/+alg23ocuF7H+RHZ4Ti5e\npiNlExisohdEX2xRnqIzTwfO1Zx0h3TZFnSoAzfz8IwkWR5rSi+vEaPzWz8g\nYwhH6gV/jJ/0FrZN1vZ9mWJ7h7IIE9l4hfgxammFQAZePA+LdOQkt2iHpZ6X\nZ1xxtByVw95gsmQfkA616pFLy5H88rE+6WaFAb87YBVi+zGiSoQr8EEgwXkH\nMhOr\r\n=50f8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDI1XFIo9I6E60AhWLeIFwPUmxTVPNRV789S64f1+yHgIhAIkj8TLkkJyetQkzal8G8JsUssvc+p/O/ntVeU5lz95n"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.1-alpha-c775427.3_1571756904119_0.10599948088142042"},"_hasShrinkwrap":false},"0.5.19-21833cc.0":{"name":"graphql-toolkit","version":"0.5.19-21833cc.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"9.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"21833cc048f90098163b14536ed169432d8ba664","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-21833cc.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-KbHzd2sm83Gj54dw0hheVXZS3BRcr9kfMAmUzZeGuCajfvuNNIGgkROEjyVjlpGJHC9xYrOJ5MYq5dBDFgEcAA==","shasum":"7754847d89e01142624782ebb95fe71a99e86c22","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-21833cc.0.tgz","fileCount":258,"unpackedSize":411557,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr0zWCRA9TVsSAnZWagAAJu0P/RhclSGMltEkijmJHSAf\n7g7tgKULyqBXEnmMkxrEUeHF5Ph1DJ+9tDo/qskg0kgc8sxALP9CiVchYyT3\nnumye6pFzLICRWpC2jDPN8pE/Ks7nW1UTx7+46WJaPxKGBjGrtxoWm02rRNw\nW3ipKiJ8sLq4AiEuPK7884z1C95kCwpAhZAzFXsXzPzUatj9/is/aswD2LYf\ncSEUT6oHeTYfrSq56QnjRFEznLzbl/+Q8Yj0Q8/UPCCBc8B2KF3bSXvbCntd\nE7ppXWKRdIZrI1pMmIOOi3sdghcX81r9d3H+ExA5x/jzemcHX/XbkRaFTiEm\nR0RCDEoIbt5l5FS88h1bnqsAW+HnFmdSvCswS15W7PwVSYzFVzO34jGNWMFx\nJ7qdynUlIsa0qZeiwYAHGC/qxpTq+PAlGRbcFafVZW9yrDXl/jWKO3/kipbY\npSlZ1TjtPlaWyKacv0D9/6qx/M4ThZgFBbcxl2/DsnFTAPogBHmKJnwcyC/3\ninhgdcj0TXMdK15GwN2v6yWT3G+EGukP4f1a4QJ1UMYWYWA+YPW0+JXuJBH5\ny47j/dr72gpDrMhpWAYcSF8WreDUFpOIYDK9gavPEgGmv5zxDrFroYLbs2FZ\npX22gkLR+wCjbg1fILC1CvI6VWNELftArIgX/r9rk6yYsfHBIXnGGMeS8AqP\nPJni\r\n=1Fi8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB48W8mp3fLLU0bRh4hfabZcVTX/NlBvNK7OFfuFXy9fAiAMAdFFxj6jLgAzevhE44d/v/GhQueJL7qkFe596VlEmg=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-21833cc.0_1571769558347_0.09146839165998633"},"_hasShrinkwrap":false},"0.6.1-alpha-cee1e98.4":{"name":"graphql-toolkit","version":"0.6.1-alpha-cee1e98.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.1-alpha-cee1e98.4+cee1e98","@graphql-toolkit/common":"0.6.1-alpha-cee1e98.4+cee1e98","@graphql-toolkit/core":"0.6.1-alpha-cee1e98.4+cee1e98","@graphql-toolkit/file-loading":"0.6.1-alpha-cee1e98.4+cee1e98","@graphql-toolkit/graphql-file-loader":"0.6.1-alpha-cee1e98.4+cee1e98","@graphql-toolkit/json-file-loader":"0.6.1-alpha-cee1e98.4+cee1e98","@graphql-toolkit/schema-merging":"0.6.1-alpha-cee1e98.4+cee1e98","@graphql-toolkit/url-loader":"0.6.1-alpha-cee1e98.4+cee1e98"},"publishConfig":{"access":"public"},"gitHead":"cee1e98ff0ec3e2a47176748797dbc816506533a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.1-alpha-cee1e98.4","_nodeVersion":"12.12.0","_npmVersion":"lerna/3.18.1/node@v12.12.0+x64 (linux)","dist":{"integrity":"sha512-XTHcR6mXxvfyYK16YpabBBQUkzkBEkBFatK/0bLqwPGt/OwNAwQsGCo/0QeWlC07IJMhHIvt1ecS3vEfJozUHg==","shasum":"af30acc7c4146467e3d7eb23abf25a45d54cfbc8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.1-alpha-cee1e98.4.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr3AhCRA9TVsSAnZWagAAgvQP+gKNq1Rl5rFsim/Pq8d4\neWaHfnX3H4NaWENRnFz8bddHo//iZHiFsCu6swLXIH8bkucx+EkW8sleFfVA\nsykV0BhR9y2GdybA+HFjxZtSV05tj7zRoz1WagDDI1LYA0L/suECNycJzDo/\n6PWEzAggzs+Hz7PIKowA3fufWcQMX2WV0C7Z/XbP/RAuw9Jdg4AnQjpinNK0\nleuea9jFIoi9whQ+dBpK6GBQx6vY1441lrPaWqafFqYweSpiAJ4RaBeCaiCV\nFN88OUY6ggsEhM656c6Nd1Xo+NmWUhaKQt3ZrboqW++2bGSM5wJuG4kCTNO6\nUXpj/3Zz2Lckh7gcqQM0Jo8TILUWgO3uK5qz6N7m2lKAvW3mgjGYkNA+BdfJ\nYjmCiu2C9KcjqWAwLX+8gmRtt3d5jWF+um9+/SWe7UMFABnJU/oi17ciDyUL\nDptf8b5ed5fLGIxVE8NyBkut/AFzTZdrUvLkL8EuGZ9wZVH2xb1BlacQckY3\nY8+RX8lV2WlOdBgJMl9kV9HzOMANMQ7I4RMc1ZI3Au/JELwrvr0KSEODLVEc\njHVa4tF39S5zPWhdccLsG8j4uLTMb5KRwof25Z/gUlUMvDP4dPXUdaRvNI23\n5NRbM5ECyOGeaN7fkgD9V2CVtG8deb/jPeYIPHU5EHbTebaeBzI+nEa5rTIS\n6eik\r\n=/k5g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBDexZO0T6xdFbSqN92eP/pH/lar9X0TzX7ad4QOO/oQAiEA8ETPVKRd2nS7tMmWE3oU5E0QhE/InlLgSLPaGJxlrd4="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.1-alpha-cee1e98.4_1571778593198_0.8746218622285451"},"_hasShrinkwrap":false},"0.5.19-6a93a1c.0":{"name":"graphql-toolkit","version":"0.5.19-6a93a1c.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"6a93a1cfcb98b379278820ca01e1901ec8407988","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-6a93a1c.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-uYwtLwpw0d0GZ80GvMb4eCQUK0cUMePxAihFCm4Ag6N4d5K71bZd0zbWNXCgMWymPuaLrgXlJZxEqwr7/jq6eA==","shasum":"a64d0425adde91f033e50b0dc05cfea17f6b9660","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-6a93a1c.0.tgz","fileCount":258,"unpackedSize":411602,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr37PCRA9TVsSAnZWagAA59UP/0yzE6tVNH8j9dMxFTA0\nXtrzf22wwCxFOzZdWPpWI9tZC52pwnAJ5/+Xfd7MeAtaX+zbHyd3MNOQie1A\nP7BxIsFSn/IshKyK79Qz3UYQtiYGhGHrJoML4MfJK9UBi33E4/rLsKKy4Wd8\noidwQMNASOqTyqfpVhK15TOV6zrPWwjDabtTGWx7MRq8hHmlt3fB9IVhsi6R\ndm0mue2fLMarM/PqJybIjQNkykNVttGDa11j5CpFwlCodTKXEiXy4pa6vUYb\nSSmJ1BKnk44tDqKQviNtu5FezxxV1BtLN+CaDfmYSMhH5U2Yy7vNyPkAqK5a\n02VT3cxU4HjFxQhsE2sMq3YZbxJExOHQOcPAsx7sKRlbVugDErD8DZGS+h/J\n06y1LqghtXdYzl0c2tUxnccdL+yPYZmHeX1byB0KJVSGfLQX05sGUAGSQAI3\nLKsyu9YeEudXYAAZQjHacBF3OYGvJqL43PonZHmKuUGQtqLrMMBZDDfw3nyn\n8DpRCoL5O6ngW9aPzFbFEt/X6A3VyUVOCz6EcvMWry2sZbW6lUgs67dA91L1\nVikTqA49yqfoFTFBZsHXVIoJWVKcIHR3Bf+pRpprNqEUyMG1S2hdYFhx3UFm\noBpP7vRxRcff3WqP97x4nnN3JG6mZHzQDcUtU18uI/+dC3Nsl+iyzcxF8iIw\nbZJN\r\n=U/qu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRAC/+qYdXdnjcWpcvOAX/DTQOhbOdZ4wl+H/RlwdTbAIhAKr0ULdhRepfM8wSawsECXib8Er54WsfCCXQq5xljVjI"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-6a93a1c.0_1571782349066_0.2007209594812327"},"_hasShrinkwrap":false},"0.5.19-99c3348.0":{"name":"graphql-toolkit","version":"0.5.19-99c3348.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"99c33486a20ce6452de21ddad74f22e54fd59f72","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-99c3348.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-1swK39BhpSLTbPlEzP2ckX4yvCyEoZNm0IJhF2+OZoELIuRiKjnsz4hqutIqVTcxAOGwkBJcZaufYme+g4gKHw==","shasum":"342e32709cac47214e769f92f029c60636d78f2e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-99c3348.0.tgz","fileCount":258,"unpackedSize":411605,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr6xHCRA9TVsSAnZWagAAi6kP/jNPhqTVBwJvcJUIwpJk\n4h0ThgpwBsIMOTNXQvTl0e/rsjQzMcBP4O4hYR9KbP85OaG0JZddEJ6P55wT\nZaYQ6J57BL+40VHYAlpCDsJliZhHDp43/7K4y6ecuYyW+/zr2Deags/yx58+\njROprgDPRnHYOynOeEKf8zmpBJ/kRxe8ivhznF2QH97SASTrx0d4dE896hG0\nt1IjHZrubIcxv91ljgVJpqD9GfieFL0NQGLuIdc1nNHbnWEmgeb9OAeCog7D\nsLlUto3WBnxdt+EyvyAWMPsuPb9UW54Nku+GbgFJcutVl7Qq2olMpjJNFTRy\nj7bZ4q2Q/Ufo4RpoMQWoP0v7PAg2zEh35hgMbGMAxg2sM8Twd6Y3Bt3QPDYt\nnJxmIGkc5uddoKKClcyueF5/A9zyoj0t2PJS0WLpkJuPPZnJ4mzNnYn3NjJK\neBRD81OM9Vg0Rt53h+TUEQL/n88z8n9xmD2smeQAEreTaMLYtLghlFnprBBO\ng4HKd2//kSjqtvTyZG+CbPCK8X1eV2XDb1BUPEEvG3ZZM4f35og2NY8+E17Q\nJEWnxeQVKr8BP4QIPG3fTaXG3d//x9mP5v0H9oCEQMxcyhNULSkERIfgUNmt\nFY1k/EunMRDa13n1NhE05Ij4LYM+p4Ni0fAvw00rCtptTbR4ST+SF3r3y8Lz\nQQav\r\n=CTyX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsrZYSC6squeWcevEeyZCjnWEuQdPbjyQLzwb7iU6BkQIgYmHvswjK9WWyf2Bn0aOlgdQU1mXt9375erpcrU5mdAo="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-99c3348.0_1571793991081_0.7504893813572808"},"_hasShrinkwrap":false},"0.5.19-eb3b1d7.0":{"name":"graphql-toolkit","version":"0.5.19-eb3b1d7.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"9.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"eb3b1d7627afbdad1adb5dc4a63394716d8f1647","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-eb3b1d7.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-MUPRdIWJPkUrPfVWwISxnX4CkiNtm+1TM42EyrUQ+SiZkobe7bfNpmcLXar8LbGChSw/pAaPat91q6YS/d7UHQ==","shasum":"814201d1d448e628b3299abc5269fd582d5e973d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-eb3b1d7.0.tgz","fileCount":258,"unpackedSize":411580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8zmCRA9TVsSAnZWagAASKAP/j9x3UlQKRocg+pudVpY\noTZaC3aWZ7qYfHDxs0okT2EWuQJUchsyLG6NOMmPFbjwOI0V9xhBBGoqoVyF\n1d3gOvk8PK416WafbVbOylIQ04WxRKtiblnRyPKLQCxsFQoagL1bFlqMuzVp\n42U59iSf1c59dygybH63WPw7ZRPusFQmkIANDg58ioNhnrO6LiQqQBg1hYWk\nJIrfXWJYQYssTrNPDl03amqkKW3st3I4muhim8b/Ty3RTyyUSXzZwJ095Rve\n8vPpepNQ8gnUmu3RMZpBV7NBnBGVYcoh534qSsDHbvCPN622t4Rqp903DYfD\nROsUJdZC9h80Nd+Bx9oUGSIJs8+T+WtxXu9erpk6CUpNfvn+JzJPqhU3LO0o\nuuXTM2mGBNowCbMmCToWB15uywIaOXxsd5XAgyuAUlY0B653MUw7gnBb9Zjt\nqZW+RbD0W0hRXC2O6WVhHv4UdwMflV1H7NBp7o6O2hp0AgX/6cikbGr01eiv\nlMwAGZXH16jbEbrsoxZ+cOAoDFd3h8LEHITV1/Kfm74MXDes90JdjsOKISEu\nz/blk1kmQHhdDzYDcqEMMN3AI2WJcB76cJcE+8T2o6sTKM9EkKnxP9ERVWiQ\nw6NXkAVbtmem8Wk4pUkhdAjng+BJYMYZCqZ+M3EFaiaUoXdFtRjMU0J9DR87\nqlKg\r\n=rfRc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTREWqZl8uOI46zktezk0gYfhdqKovFMx1t9wZ2lu2+gIgJ8NymQAzTv2fAcCLHB7Yl3IYQy/aujPtkS8Ud27HqP8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-eb3b1d7.0_1571802342109_0.7641555436208074"},"_hasShrinkwrap":false},"0.5.19-f36a69b.0":{"name":"graphql-toolkit","version":"0.5.19-f36a69b.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"8.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.0","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"f36a69b0f408e590ca856dadc42d2a64d8232525","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-f36a69b.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-qYhC7K0fZkA+UVnofkSP8XOQmfzBCwve7pSdUJaoJ/fAFcmmPDJYc2CHtArsLkbNseCeUsbTbsBgwxJBzMDtBA==","shasum":"0cd9241064cd90c824827bacc3cdaecd2a22607d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-f36a69b.0.tgz","fileCount":258,"unpackedSize":411596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr8z1CRA9TVsSAnZWagAAWlkP/1y32iWuF6sJYBUfH/3+\n2bA+xcn/Vv7E+n1mkQjmQt5RYCeT4etfTwB9Pcdz0y2WaBzIc4SiMklCTfAX\n0g++bjp1J4F9hFnoiue5TswN15fdrkdtx8CEBu22e//uq6h2Wxvn06FRcgel\nM674OR7fiwHVL3S/DubRapoJjN+fY0/xoZlokwfCIATPZ76sOdVSdG8H6gKK\nOBdDcZuiGaQa8AgaJedmfy/30ICp+rV9ffF6v4WU9ES43oCc1zd0Wir0+K3n\n/Fge0Y9jHrWjlenF4l05AxqegaNUxzZHGOAs7t+1aFAj2qtabADJSdGZwOyL\nSDNRuN+lCiBYW5tVgPW9Su3XSOUOp748QeJYFQpaZphj5JRIgZvbI+2n+9al\ngOaDbVNFHVWOkNGnj81pljThgllv0LiL+DeTpF5MGPOlWGJnZ3Pgglqsktm3\nP/W412Q8lF4/l4qHnkU1M6V+X0IJkY/DOL11JcjiaEUnvpJPXo5yxEgVAIGT\nL6CCtba6zCIfLc7e7h7d8zHAZDZ6XtWJdZ1vdQ/dq9gFbLf8amujE3XaYBa9\nWLIhg6NEYRx6WWigfoJy+1Ufo6Cd3m3P+C9ljVtjO6L6TQVh1mXZ91bnWQLe\nvv2tDrV1E3WDnsHHZQmy6iQMoT82RsF+2QMTlKpsKqossQFdxRg7UVfGz0bQ\n0D+X\r\n=KMlN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD17e7s9Ah8zaLTWSXgaG6N603IcvGghacL8zUONC4DwAIhANF8xOIJARfW8IKRci+k1tTDrCg/WNYOl/SR6SgK1/JD"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-f36a69b.0_1571802356697_0.11560118200603298"},"_hasShrinkwrap":false},"0.5.19-40d3176.0":{"name":"graphql-toolkit","version":"0.5.19-40d3176.0","description":"A set of utils for faster development of GraphQL tools","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --forceExit && yarn bundlesize","prepare-release":"yarn build && yarn test","release":"yarn prepare-release && npm publish","ci:release:canary":"node bump.js && npm publish --tag alpha","bundlesize":"cd bundle-test/ && yarn && yarn test"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"graphql-type-json":"0.3.0","@types/deepmerge":"2.2.0","@types/is-glob":"4.0.1","@types/jest":"24.0.19","@types/lodash":"4.14.144","@types/node":"10.14.22","@types/request":"2.48.3","@types/valid-url":"1.0.2","graphql":"14.5.8","graphql-tag":"2.10.1","graphql-tag-pluck":"0.8.6","jest":"24.9.0","jest-junit":"9.0.0","rimraf":"3.0.0","semver":"6.3.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@kamilkisiela/graphql-tools":"4.0.6","@types/glob":"7.1.1","aggregate-error":"3.0.1","asyncro":"^3.0.0","cross-fetch":"^3.0.4","deepmerge":"4.2.1","globby":"10.0.1","graphql-import":"0.7.1","is-glob":"4.0.1","is-valid-path":"0.1.1","lodash":"4.17.15","tslib":"^1.9.3","valid-url":"1.0.9"},"readme":"![tool](https://user-images.githubusercontent.com/25294569/64810060-4d9c8680-d5a3-11e9-9a66-84ff20e1179f.gif)\n\n[![Discord Chat](https://img.shields.io/discord/625400653321076807)](https://discord.gg/xud7bH9)\n\nA set of utils for faster development of GraphQL tools. Use these utils if you are creating a tool that loads schema/documents, merges schemas, scan for schema/documents/resolvers files.\n\nIncluded tools:\n\n### Schema Loading\n\nThese utils are useful for scanning, loading and building a GraphQL schema from any input.\n\nYou can either specify a GraphQL endpoint, local introspection JSON file, code file that `export`s a GraphQLSchema, AST string and `.graphql` files (with support for `glob` expression).\n\nIt also merges all found schema files into a complete schema, and has support for `#import` syntax (using [`graphql-import`](https://github.com/prisma/graphql-import)).\n\nYou can also extend the loads by implementing you own loader (implement the interface `SchemaLoader`).\n\nThe schema loading util is using loaders, and implemented using [chain-of-responsibility pattern](https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern). \n\nYou don't have to specify which loader to use - just provide your input and this utils will detect it automatically.\n\nUsage:\n\n```ts\nimport { loadSchema } from 'graphql-toolkit';\n\nconst schema1 = loadSchema('type A { foo: String }'); // load from string\nconst schema2 = loadSchema('http://localhost:3000/graphql'); // load from endpoint\nconst schema3 = loadSchema('./schema.json'); // load from local json file\nconst schema4 = loadSchema('schema.graphql'); // load from a single schema file\nconst schema5 = loadSchema('./src/**/*.graphql'); // load from multiple files using glob\n```\n\n### Documents Loading\n\nSimilar to schema loading - but meant to use for GraphQL documents (query/mutation/subscription/fragment).\n\nYou an specify any input as source, and this utils will detect it automatically. \n\nIt also extracts usages of `gql` from code files using [`graphql-tag-pluck`](https://github.com/DAB0mB/graphql-tag-pluck).\n\nUsage:\n\n```ts\nimport { loadDocuments } from 'graphql-toolkit';\n\nconst document1 = loadDocuments('query { f }'); // load from string\nconst document2 = loadDocuments('./users.query.graphql'); // load from a single file \nconst document3 = loadDocuments('./src/**/*.graphql'); // load from multiple files using glob\nconst document4 = loadDocuments('./src/my-component.ts'); // load from code file\n```\n\n### Epoxy\n\nOriginally implemented in [graphql-modules](https://github.com/Urigo/graphql-modules). This tools merged GraphQL type definitions and schema. It aims to merge all possible types, interfaces, enums and unions, without conflicts.\n\nIt also merged resolvers by using deep-merge, so you can separate your resolvers implementating across multiple objects and the merge it into a single `resolvers` object.\n\n```graphql\n# a1.graphql\ntype A {\n    f1: String\n}\n\n# a2.graphql\ntype A {\n    f2: String\n}\n```\n\nWill result:\n```graphql\ntype A {\n    f1: String\n    f2: String\n}\n```\n\n### Sonar\n\nSonar is a small util that scans you file-system and find GraphQL files (`.graphql`) and resolvers files (`.js`/`.ts`) and loads them (using `readFile` for GraphQL files and `require` for resolvers files).\n\n### Other Utils\n\nThere are some more utils under `utils` directory:\n\n#### `validateGraphQlDocuments`\n\nA tool for validating GraphQL documents (query/mutation/subscription/fragment) against the schema.\n\nIt uses the original validation logic from `graphql` package, but suspressing some validation rules, and focuses on validating the fields and the structure of the documents.\n\n#### `extractDocumentStringFromCodeFile`\n\nThis method gets a source code file, and using `graphql-tag-pluck` tries to extract GraphQL AST from it. \n\n#### `getDirectives`\n\nThis method accepts `GraphQLSchema` and any AST node, and tries to extract the GraphQL directives of the AST node. \n\nIt returnes a `Map` of the directive name and the arguments of it. \n\n#### `getFieldsWithDirectives`\n\nThis method accepts a GraphQL `DocumentNode` of a GraphQL types definition and creates a map between GraphQL `type.field` and the directives it has. \n\nIt's useful for getting an easy-to-use structure of the directives that are decorating the schema. \n\n#### `getImplementingTypes`\n\nThis method accepts `GraphQLSchema` object and a name of a GraphQL interface, and returns an array of all the GraphQL types that are implementing the GraphQL `interface`.\n\n#### `getSchemaDirectiveFromDirectiveResolver`\n\nThis method accepts a name of a GraphQL Directive and its resolver function; using this method you can easily generate `SchemaDirective` with a single resolver function.\n\n#### `composeResolvers`\n\nThis method accepts `IResolvers` object and mappings for composition functions that would be run before resolver itself.\n\nInstead of doing this,\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            // Make sure that the user is authenticated\n            if (!context.currentUser) {\n                throw new Error('You are not authenticated!');\n            }\n\n            // Make sure that the user has the correct roles\n            if (!context.currentUser.roles || context.currentUser.roles.includes('EDITOR')) {\n                throw new Error('You are not authorized!');\n            }\n\n            // Business logic\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n```\n\nYou can do;\n\n```js\nconst resolvers ={\n    Query: {\n        myQuery: (root, args, context) => {\n            if (args.something === '1') {\n                return true;\n            }\n\n            return false;\n        },\n    },\n};\n\nconst isAuthenticated = () => next => async (root, args, context, info) => {\n    if (!context.currentUser) {\n        throw new Error('You are not authenticated!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst hasRole = (role: string) => next => async (root, args, context, info) => {\n    if (!context.currentUser.roles || context.currentUser.roles.includes(role)) {\n        throw new Error('You are not authorized!');\n    }\n\n    return next(root, args, context, info);\n};\n\nconst resolversComposition = {\n    'Query.myQuery': [isAuthenticated(), hasRole('EDITOR')],\n};\n\nconst composedResolvers = composeResolvers(resolvers, resolversComposition);\n```\n\n#### `extractResolversFromSchema`\n\nThis methods accepts `GraphQLSchema` object, and returns a map with field resolver functions of all types inside the schema as in [`IResolvers` interface of `graphql-tools`.](https://www.apollographql.com/docs/graphql-tools/resolvers.html)\n\n#### `extractFieldResolversFromObjectType`\n\nThis methods accepts `GraphQLObjectType` or `GraphQLInterfaceType` object, and returns a map with field resolvers of given type.\n","readmeFilename":"README.md","gitHead":"40d317678dd9b476571425dc876f8532b5e4a90f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-40d3176.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-T3r/O/wfXhreyJQni5YZGEisSb/f6nRqcONwqGLv8iAiB84iZXoajE2dM5auxuO/eHKf6m59WGagLuaE5V0ylg==","shasum":"8a682448bdab28bb875969e37ff47ec6e5786997","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-40d3176.0.tgz","fileCount":258,"unpackedSize":411588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdr82oCRA9TVsSAnZWagAA0u0P/0A78mcewukj/isJTXf0\nn7zmRCvAJWQ3pxzpKX6DAbxlWbVX6AOfDo/gC8YojqijJBzgH14kam5d7m3S\ndcbGyGJMd/xLNrqkH7AGv8ecdLXoDAbtsKB2+9ggIEquEw7w/6Ewz8DeTWuV\nsYSUkRrQe0QZhzlidZmbnBfxeZsdBOzN53CVplDUfUdWwJdZJRrORXEqQWS5\nPgqc/zlAk9s2wYZLGNAuAFHrF26knVF+zoEyFg9mVjKCXzQ3dXMg+0+GWSEe\ne+jZY2dfXEyQfHetiSVf4EykXkhz1YJgnn6tIiznzXBcO8Z9StJh4l9wWMaU\n5WWiElGdIFgw8ASC1VGvyD0Xyyd2iFf0GgzDU9y+Aqq1z0Obbk6xJWV06DGV\nKr9JBEdBUbLMq1CDxN8zOn1cPi/x/tEiiFBAzbWC+DU/rXQdFkesvJEJlBLc\nM5OEfOHFR9J32YJKl7nkDo9Xhvv7JKFSYy8C4L7mJygSf/1/TYW8CWlKn4i1\npc1R7EjyMcOD0359sFcKU/V9JgDV3HL1GCZZbO7gF1+IblpjOGekIlWRN88/\nGisQhatuQI7nghjRq/Cn3RuofwN345TjIXeRVE8n0PjrqVbBko2HP/hEg++a\n5LwpYzczDketkmCwRAzK52KrK9rp9qhC7oGrFeRSg9o+4RQ8owwRfOaWurnd\n0m04\r\n=SS/h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFHmYPGSRDYWcQsXJ8Sypi0LnU7DwhfR/uoKUl8RGqlNAiBzvsT6sqjWPQZ7IBBYiU3hwp2AFjdpD7BDL216ysdMaA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-40d3176.0_1571802536253_0.8922297605606133"},"_hasShrinkwrap":false},"0.5.19-beta.0":{"name":"graphql-toolkit","version":"0.5.19-beta.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.5.19-beta.0","@graphql-toolkit/common":"0.5.19-beta.0","@graphql-toolkit/core":"0.5.19-beta.0","@graphql-toolkit/file-loading":"0.5.19-beta.0","@graphql-toolkit/graphql-file-loader":"0.5.19-beta.0","@graphql-toolkit/json-file-loader":"0.5.19-beta.0","@graphql-toolkit/schema-merging":"0.5.19-beta.0","@graphql-toolkit/url-loader":"0.5.19-beta.0"},"publishConfig":{"access":"public"},"gitHead":"3fa87140e9d404939b0893ec4dbbff60f7eaec83","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.5.19-beta.0","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.18.1/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-qVu47VLbUEl1kLKd9z5LRpHvatKhHZPuaqsLvDzPZi/8C6uhJtPjg8NANmgAhwioL6MIfutO1NLIaSYoZtGnFg==","shasum":"f9d78657f39afe7e49197dab92df0ac55097a46c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.5.19-beta.0.tgz","fileCount":9,"unpackedSize":14749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsF/NCRA9TVsSAnZWagAAF+0QAIi5eo7x/a7m0HcUd60g\nOLsc2OfKkMnX89cl3GJUIaHtRszl96i6jxl2Au5jrTgLYTNUO/t2jHEvOghO\niupopOQAR05uIddt4vuVNgirg0TkCzsy5Py1Df/CY5eriELA1Jw2efmoDh1R\n3HPGoatL0wfOb5nbXUxeY06Y4+8HY31DtVvJxvwZ+ybZgvuip5muMvwacZsF\nhTQ93EfS9ZWob7wEFOV+MuXeGn/6d+DLR8R5zLB+86RtngqTzWfSdF1CwZ91\n0C6jABC9qdY8jD1+qChAAgLS7WB910vojPopRFncGi1LOcORYAzn9DG8KKjn\nEo/O1UxmYrX2gmAMhMsY0tBTZZwQJTeqTso6Od5Uba2OpIDgZh1+Gv8stEq6\nH4jNUDFk+FmQIOqkYtRf9En+AJrbjknpT8q4H50t+cQ87igQ1nPwNt3uOQH+\nZ+bU38vx+39TAnZ4af+GTOnJ9sjlCv0EwpMa5EQQ0OJqOj3trsMyig3Ejjoj\nNyu+OWV8iZEgRQ8qxSkUp4ic8WEAe/txg62xQzpTsaqmy6rlftGbgkK3Q+pi\nehnvaphobQZ1tCv6DQ0xZF6sQc6OuLt3mmdW0e+t1JjjlCyr1ALnU1/PfMZr\nuRrha3ZlJ+tPleHi15kcmvReVgUMVwOXNDocPc160TC7aOUffME8wqvFTY98\nKhuy\r\n=S9Oy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHu4l9P7k2NdlU0D9sGtI29AAzuIffVNGXNQC/kIuzBwAiEA1g2tdOjuCfKBqTWq+F1WXt+mBoYHIByutWaK/hekXI8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.5.19-beta.0_1571839949116_0.918031086216893"},"_hasShrinkwrap":false},"0.6.0":{"name":"graphql-toolkit","version":"0.6.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.0","@graphql-toolkit/common":"0.6.0","@graphql-toolkit/core":"0.6.0","@graphql-toolkit/file-loading":"0.6.0","@graphql-toolkit/graphql-file-loader":"0.6.0","@graphql-toolkit/json-file-loader":"0.6.0","@graphql-toolkit/schema-merging":"0.6.0","@graphql-toolkit/url-loader":"0.6.0"},"publishConfig":{"access":"public"},"gitHead":"3df87a45d93be1264e0dcaf3c9c95bbb40849b1d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.0","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.18.3/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-uLdKONvphvgdMkJ5futgsH5X88rwV+iqwxEL+kJ6wRSfBY0zA9NtM4EVZ7qhcoyd1QAodiP+OJGczvJQm1Hczw==","shasum":"fd5c7326668c083d1407826afdaa715f9c0cf718","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.0.tgz","fileCount":9,"unpackedSize":14671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsUR5CRA9TVsSAnZWagAA5PkP/ihko1koEtgXOZ/eduFE\ngtOxmJRQebHySWQTjmxoZVh4Xl+33B24ybeTrA1V7FvpPAeRDwZ4+qgDcKEY\nDLPtzAgIHGaJiiCh6o3vVBxhkZFkZnxi3EfOeWGW4iA4Liz+g4eCpSjT8dyp\nlDDr2DEbm3FLW1HXxtZYvdQfWj/cth7Bu8XxB8DmkdIw4Y6uwmLX2fN2ayJG\nXZ86xjYX6Zhjko0HyFWT4Lv5oTHAUVl/D+v8iH1KPhzuvu1nKLU7Licr1owo\nKIMPgu/yaTcryp3lcU/TQcL6qYD7/zgNtCBnakx3O5vP+DhoS1cj2obXc38S\n8vYP5NKbzPUQ/WIKSH068sPr0G4TVeoxE/IqQXz9EwqOteIRu9YFmc3NO6W6\nj1H6NlOLm5BBgwveLDxk+usFCFeBlrUKlF7oHSa2PioIcHu3jLd/uPnTUAh4\n73zuUUfQChWc9B4ZyODqTXM0ZjH+oLsYF8lacO2kJ7m+lGN98cspsLwRpAck\nKhkOzzCsefsxIwbJdnD1myLyfonIs2wMW6i5/J+bw866ITTHPrOsux9W58x/\nG7DVr2DwciFZeRLbNt0xOPPUc5cPLsEhtlq+WVrvzywmfNLzywzIfpHuDWs2\nFwCNdgWuv5scUz0qNng+mY1GR98JLD+2d1ArwT1IcSkr3Do+Hw925xT11V0O\nvxT5\r\n=lEqq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID4eXEXlzXurq7L2HHZdyn8OhtcalSN0wW6uwc3VV5I9AiANIJN99XooDkTBGsRwpwYqBGE/rGvohIpm8dbzysEjEQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.0_1571898489237_0.0008791291760519293"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.6.1-alpha.0":{"name":"graphql-toolkit","version":"0.6.1-alpha.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.1-alpha.0+3df87a4","@graphql-toolkit/common":"0.6.1-alpha.0+3df87a4","@graphql-toolkit/core":"0.6.1-alpha.0+3df87a4","@graphql-toolkit/file-loading":"0.6.1-alpha.0+3df87a4","@graphql-toolkit/graphql-file-loader":"0.6.1-alpha.0+3df87a4","@graphql-toolkit/json-file-loader":"0.6.1-alpha.0+3df87a4","@graphql-toolkit/schema-merging":"0.6.1-alpha.0+3df87a4","@graphql-toolkit/url-loader":"0.6.1-alpha.0+3df87a4"},"publishConfig":{"access":"public"},"gitHead":"3df87a45d93be1264e0dcaf3c9c95bbb40849b1d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.1-alpha.0","_nodeVersion":"12.13.0","_npmVersion":"lerna/3.18.3/node@v12.13.0+x64 (linux)","dist":{"integrity":"sha512-B8rmIUnmijheU1PpAw/ZsZ6+H8qxgo6/ql6w/0IXL/r4pxRqSiZqspUQZGYqpKSgN5KTOc8x5Glyub2dLekqFQ==","shasum":"60f1d2aa4703af7317dccf8731e0f5589a6871fb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.1-alpha.0.tgz","fileCount":9,"unpackedSize":14820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsUTTCRA9TVsSAnZWagAAdDQP/0pNiDA3RbchWikkb4SN\ndLll0JFIA1cBnwfnW92hbwSdmoTEglJBprighP6CxeNcTLQVDjpU7EPo9I+8\nKrPgiudryke4DdtciZyLmf2OeVY6e43sthFeMN/HXqEpFjYzUO+rDBgOvfWy\nUyHOSrv1yrztcb5Vk6J0gkkkE0cPu69kaTQpwOLnLjXzDjdAGy1413KOd22U\n/iJomm6KTJTDkBv7LgWaNhSWHndYfcHaepQ/N+t168CVZ35IXfO3upzkSRmE\n4602svaxwGyKSU3ytbNzGZdaQOmbQZqjiuTSUH4JNTZqAu9hp4SFW+KxGfAn\nAl4/IiqR61JbGJToFpPpKFh5Dj3V/cXyg4I/2w8PQ/uZLYyDyiaYXai84u3h\n8DuVxGP3IUvP5UvK4iBdzncf9KO8aTXPW1e1Uu6Of73eZ0pvi0A7Sv7Fg8bI\nIbmgCEhKkljhyp9YgS5U6pGn/yPH9IEKZZD1RCQZzeccmGojSYUq/U3Tjg8e\najWHO6LjPUSNWhGPmvloacN2lqZ75ir/NiP2vWSyvqCEw8r8KlQrclPNw8Fj\nOWck5VwZjqt8wVc5wXVwgz1pkHeaUxf7ZljFqmlTSAiPSohcL5cMIFxtnR6i\nqW9ncTWKfHG7PG5/Nx2gkXr4dixf2JQYd0pK//8KghV5xYbz0RTvKLFvtibc\nGAyj\r\n=/9aT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC23aOiePAYE2qNehA1bqvOilbZnediI6rakgSBoJKp6wIgafrHlmSc+H3PuEw8SRxprV5dTrjgNB8bdURpwhMaBtE="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.1-alpha.0_1571898579088_0.40760354314227"},"_hasShrinkwrap":false},"0.6.1-alpha.1":{"name":"graphql-toolkit","version":"0.6.1-alpha.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.1-alpha.1+d6f9b6c","@graphql-toolkit/common":"0.6.1-alpha.1+d6f9b6c","@graphql-toolkit/core":"0.6.1-alpha.1+d6f9b6c","@graphql-toolkit/file-loading":"0.6.1-alpha.1+d6f9b6c","@graphql-toolkit/graphql-file-loader":"0.6.1-alpha.1+d6f9b6c","@graphql-toolkit/json-file-loader":"0.6.1-alpha.1+d6f9b6c","@graphql-toolkit/schema-merging":"0.6.1-alpha.1+d6f9b6c","@graphql-toolkit/url-loader":"0.6.1-alpha.1+d6f9b6c"},"publishConfig":{"access":"public"},"gitHead":"d6f9b6ca3afbd75dfc36870b3fdc5b1114f215b1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.1-alpha.1","_nodeVersion":"12.13.0","_npmVersion":"lerna/3.18.3/node@v12.13.0+x64 (linux)","dist":{"integrity":"sha512-DZCdsTWFtj95oKE2fCANN2Cpx4OVCTsypOEfnN89y6nevwtkNrI4l2vj1mVT7rZ2+MBbSMis8muBAyiubB7S3Q==","shasum":"a1d7205e255631c9c3597b7ac9a9e32faf236f44","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.1-alpha.1.tgz","fileCount":9,"unpackedSize":14819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsYfRCRA9TVsSAnZWagAAmGsQAIWsdPkjyit2PUIXq04c\nsgok2+wc2cGby/bX7i8LEWDZlmPiSUE4DqUhnczGCndlcr7CvwP5ICBr8tyX\n1Jhc8v/NNvdTgBowdIPpwAdKaacUJjRaQpCzWcf9pSvHSfLhU1f4mpWyXV6i\nD1ZM33SY7ptDME8rc7h7L49IE4DLBFyVLBQIvN5YHkX+46Ffz81ugL/rqINO\nLRcLeayHxsp2RywocT6p8qeO3w5iJZDsHGczSuocYIlPYXbWY346xKkH8+yy\nO6SuYTp9YoEKMVx8AEuVunZ8qH5HpJedMCtYO/RqN30c1hPAH1jCx5cGAvrD\nIomc4Lq9/Vr3ZwwMBZQQ7jk9Qhb6OO762aawhrPpT5VTyU05yaPGKiI4Sftr\n448ovO5eOYHZ5ruYbaH1AwGtsCpDzhbnPd9FrGmVgwXvQXwctmQJ2we0nmCV\nrKfmwFGV4lEd47oRzmWlBi3jd3FyJYGbCUGNu4mLNuSh60QCmKotDDYtJAh1\nnZgb7NwtL/72wJ/D/2wqc9zmPWJYO1gyhqYEed5XMIVx0KqFLIt07SAsxfKJ\n3KlIJUbUCZ891LCrLia4tkjpZ/ZN9MLTA2UiYTA0sddtkkjzbGbwzn6bLZ6a\nwIuM7QtCh8V/d9I/PoRZTHpfcqTXg3aijR+kAl1O4UNoNNnFciubAtT3O7VS\nf+vO\r\n=qSVG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHgaHMbfBU0BA7HlptsnShIp8q692wIs9XASOOiOxxJQIhAPZJpc4eFpxZr/FnVOzMbe8vWY3R1vVSHrIt9Pt8vNM8"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.1-alpha.1_1571915729125_0.5363430647492407"},"_hasShrinkwrap":false},"0.6.2-alpha.0":{"name":"graphql-toolkit","version":"0.6.2-alpha.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.2-alpha.0+aab2758","@graphql-toolkit/common":"0.6.2-alpha.0+aab2758","@graphql-toolkit/core":"0.6.2-alpha.0+aab2758","@graphql-toolkit/file-loading":"0.6.2-alpha.0+aab2758","@graphql-toolkit/graphql-file-loader":"0.6.2-alpha.0+aab2758","@graphql-toolkit/json-file-loader":"0.6.2-alpha.0+aab2758","@graphql-toolkit/schema-merging":"0.6.2-alpha.0+aab2758","@graphql-toolkit/url-loader":"0.6.2-alpha.0+aab2758"},"publishConfig":{"access":"public"},"gitHead":"aab275825969724eae67e2df0bb55472c90f7e43","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.2-alpha.0","_nodeVersion":"12.13.0","_npmVersion":"lerna/3.18.3/node@v12.13.0+x64 (linux)","dist":{"integrity":"sha512-nFxw9NF/L4Bt0mU173EiXdk6wS8PpwX+41hCVgRxLEF08OKNGIGpm4+JbXrJHnvAjaGkjPeWxJd2PsBUnIOGLA==","shasum":"1b482c38cb7f298faf66e8aed8f76a31cc949d26","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.2-alpha.0.tgz","fileCount":9,"unpackedSize":14818,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsYvHCRA9TVsSAnZWagAANNIP/jSpLXhHw3kk80kN7UEN\nj5V9o6TFCzLNFc9a44rZMmm7rQv82EoMnmtax9dzigd58iG7kCCFgqe3efAv\nHgarpAyc0x9L6pDU98mPzuuqeMU+5uapD/UZl44dtH8cXFnoosdWG5Kdu0ct\nyqVvEfM1XyJUzo4WWl7W/voxvXymzMtub8NL5d3EtXb/glpkqQqarfGcKScH\npT+z5TTqx9uTLoItSTSFWycF9+PYa0/M1ZlirB07Sb0DwQ/ZPgELzOm5tOxP\nlU+BBbh0L8ozhAgFNAxGWACXmLYUO+v5dgRXdWf1iSxm51sKNt2GrSyEEJQa\n3QiNSPYA9xhmWz5sLeUDQceNRZRMe/qnGz1ixc5BU2b9jZxPGbxgJcDnfJHD\nkOd6Z8tA3b7a5n/S4iIbqgfJFSP771KNtGX/W02Kjt3z+0QNYsa9wIo1JWeM\nPYgO5dutASQMkm8VSFv/lwP5hMnr8c274/DukRGtjsnQq7ZN21hi5M33h7yZ\nY0NypZ/lZ4tIWXwame7s15s8YPTrsI+qLgHg1YOWmBB9p1cethMFq5aTLaOm\n2vznN6DtuLho+5lvjFAad/PsSft8T1D3VEHON4pkCtzjF2NwxWaKuXtdosRW\nDoubTSzPAB8kPvFpbQlHwPWCqxUWeziiZR+vCoqaTcr+w9WTY5qUB7jD0Dor\nxCvJ\r\n=SuGd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5J1oxr53fhkbTkx7GsXZe45z4MdAVY57Qny7s8EgPFQIhAIwz2JFM2fzGiivpOfvxQkTRq4kvPFGFnOdTfny0aDF0"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.2-alpha.0_1571916742938_0.8896223400317549"},"_hasShrinkwrap":false},"0.6.2":{"name":"graphql-toolkit","version":"0.6.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.2","@graphql-toolkit/common":"0.6.2","@graphql-toolkit/core":"0.6.2","@graphql-toolkit/file-loading":"0.6.2","@graphql-toolkit/graphql-file-loader":"0.6.2","@graphql-toolkit/json-file-loader":"0.6.2","@graphql-toolkit/schema-merging":"0.6.2","@graphql-toolkit/url-loader":"0.6.2"},"publishConfig":{"access":"public"},"gitHead":"a21e4bc6fec2b7f5852f5b9a4771ad587e2f05c2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.2","_nodeVersion":"12.11.1","_npmVersion":"lerna/3.18.3/node@v12.11.1+x64 (darwin)","dist":{"integrity":"sha512-XDjJN3D+I3mVildDjEJm0b1zU9tJ/3heNJXXAUDnaSU++tCrZmj3sym9AilOGimFqhQGQGrdz339YvNtX+eqJQ==","shasum":"9f234807552af87a6993e6d1fc6960c8e11a6084","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.2.tgz","fileCount":9,"unpackedSize":14676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsYw/CRA9TVsSAnZWagAAd3IP/1Bq/1uQCqdj8/kvc9kJ\nPY5Mm2n0My5iH38ViyQGBjhqN4tKNQgnGpIHTNO5XcE7lkJ2ZLtXwQ7E/wwQ\noPo0W0zT2pjD4ClA2n/oScUwT+syXm5fK+Lb0yR/TP3aFCTAEoYc7cjmFn2I\n84Zu4mZuyzJzvD4hewEBsdlOPnl5QiRxNRJ5ISdYaTngG4NiZDqHzI20Hy2Z\nJslzrn/df9oPoP49qGyACdsZyrnM2d8pnld8TFlWfQIPFFhBW6uBx6Es9TRF\nvHnb7IFLDmx6Ucf8QuZS/WC+GTArDmvc3UOdwS7VtayfDBJjKZ2K5f1UjwZR\n/yJwBgxS/d+VRfjDoRhCtw6D/g/Vn/YPinvZdPid2i4CJ24wJslfcPJqWwOM\n6uHJ7F8ah6ulMB+BHHqAcK484D+jJ6RqR2aPgVofvSVDv/TvSTRtJ4DNoTIn\nISdyM8txtOMXba93NEqaDpk2BdtmjIZfHAKSFPj3Vs9dSFBV0q64CEXw/mvR\n/j/65uQGTzhthZ0pYcHaXL6fsTvCLHSZdlYfMHOaNk6VXttWwtawOFJbQPub\nWRVX3WH7PcoJCcxq4GuDyfogYc2AqRutLsXPDLhNftTUR/F4M+Ck2lrCfHXC\nxBBRdMiSIfaL0DpqNbdHfG+36fpwHHSn/H1T8v2LkXY1aJMyDqUWQG5Ftgr8\nu/c/\r\n=Dn0E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAh3T5NP/ErPWMlEBsvEVJAch25DE/1/5M1WWYNE4Z11AiEAzDDTiU64tEa6Y+y+N3+9gWtiRIM/HySrBsHtM94talc="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.2_1571916862788_0.7384299195279389"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.6.3-alpha.0":{"name":"graphql-toolkit","version":"0.6.3-alpha.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.3-alpha.0+a21e4bc","@graphql-toolkit/common":"0.6.3-alpha.0+a21e4bc","@graphql-toolkit/core":"0.6.3-alpha.0+a21e4bc","@graphql-toolkit/file-loading":"0.6.3-alpha.0+a21e4bc","@graphql-toolkit/graphql-file-loader":"0.6.3-alpha.0+a21e4bc","@graphql-toolkit/json-file-loader":"0.6.3-alpha.0+a21e4bc","@graphql-toolkit/schema-merging":"0.6.3-alpha.0+a21e4bc","@graphql-toolkit/url-loader":"0.6.3-alpha.0+a21e4bc"},"publishConfig":{"access":"public"},"gitHead":"a21e4bc6fec2b7f5852f5b9a4771ad587e2f05c2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.3-alpha.0","_nodeVersion":"12.13.0","_npmVersion":"lerna/3.18.3/node@v12.13.0+x64 (linux)","dist":{"integrity":"sha512-RQTEB9lYhapTh88zIgovEOERLZ5qYpu1pnAqX65GfJIiW+nwVCsZnNcK0X6igdMsv2BcIhx0A1EqUew2/k2K4g==","shasum":"6df625de942f8825b962070ab760952566706cb4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.3-alpha.0.tgz","fileCount":9,"unpackedSize":14820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsYyXCRA9TVsSAnZWagAAOcgP/23ap53jTszW+QmCXJ/G\nCzuhhJckLYL3exMHXqVIB6W5q1dv88kRTbtRKIhvP3aV6QlBW8sdoBBb4zTl\nWmYyedWJ4KcvBjMN0EMYXIgRI4bJiQUwpLqcNK3jmPROe3mCuuRZiux8ipU1\ns1BVYVbWQ5ExH0xI+qmOqwtHfI4H/tLCNm+2U8JwO1qy0oRn4lvPV7Pz7l2H\nHgdPUOHnOjAQd9pvlMbjVqQQa+YjeJZaFo6HOiww0/PfI8FUagEym3213EMZ\ndKKyE8j7ZfkFnoIjx8WmrYGboP6ZSFQq2rdVLEf/0X96ZxGHeCZ99zLuxeLY\n60Q0nB4JCh2l3n0LgxMpjhRsR97DvzGPWFIqgTU/smB+gka8TXOSqylPO8a7\n2P7KXB7HowQtakTDP/gzQJJoQERUNCkPEJ/mMHJw3xhkx64yga0UtXas5QSM\nxx25+Z7Pb5oZlJqw5A+qE+RPpcnZxQv4HrrMoKQprxtML2R0l3cALwOwBt2l\nAgDVsit+ThWG8xkktFLgIObisLnYUrJL8+E4zimrcFI1bz7O74DImBYAl5JC\n2KCeDcFqoucYy+RrbAK3fzipyrNV3RgDF+pluow+vGG1quZnAWyGP+eoeJoK\ngNRLnV2KARo3cphECg41EdlXDKeXYBqScS7UDVhJ3Z+6pmZO1vBHs7I7HZvl\nisqC\r\n=QBXv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAU10HmkGHdbzLw8hR2DwJ70MqyiMeMUlzYpVMt7a+jAIhAPWZOZ/YQSPkFnIWsQOPlVELTKqd2V02puxXc8stlBX7"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.3-alpha.0_1571916951443_0.04281275405130591"},"_hasShrinkwrap":false},"0.6.3-alpha.1":{"name":"graphql-toolkit","version":"0.6.3-alpha.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.3-alpha.1+64b82c5","@graphql-toolkit/common":"0.6.3-alpha.1+64b82c5","@graphql-toolkit/core":"0.6.3-alpha.1+64b82c5","@graphql-toolkit/file-loading":"0.6.3-alpha.1+64b82c5","@graphql-toolkit/graphql-file-loader":"0.6.3-alpha.1+64b82c5","@graphql-toolkit/json-file-loader":"0.6.3-alpha.1+64b82c5","@graphql-toolkit/schema-merging":"0.6.3-alpha.1+64b82c5","@graphql-toolkit/url-loader":"0.6.3-alpha.1+64b82c5"},"publishConfig":{"access":"public"},"gitHead":"64b82c5efea4e690f896768e846bc3a67eef5445","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.3-alpha.1","_nodeVersion":"12.13.0","_npmVersion":"lerna/3.18.3/node@v12.13.0+x64 (linux)","dist":{"integrity":"sha512-TIXCEVpa6i3UMAmi3cFRp/+oig7EVsnD3hXKhpk/AkXxl5BgJb5FS2mRXaw+5+vjxZkmYJiwj11RaqPpjOLnlQ==","shasum":"c2dd873e22808fcbdc5e7c854721f66e2b0b3521","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.3-alpha.1.tgz","fileCount":9,"unpackedSize":14820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdshzICRA9TVsSAnZWagAAUwYP/jGqZiOlQcAt6M9AF162\n4GlT6980VZqor0MP0QjfGzGzqDgWcqrSVYaQhr3cPVTxV3T6ogp/2rxXxkWc\nA/mLYpjENa4+x4iDNMiFQqRc74HY9C9pQQ+oBw7w0E7SjfJ9FyYTA8x+0HxH\nQkm54HhDBxZ3nLUfQcWG/zella3433FKEERBSMkuzA6aUpeqw8rvwSWLvX3A\nTgvcPeN1Ysl4eLmB7CuEccBo7zyfjl4Puk+HhoZOY/muedNTIbgqpkR3srgk\n2blbQoTooFJxcN1urYp8yI3Ce310+E5i419BRpJwzzKAeYeq3j1rYy6Pm52S\nlwqZyfA/yYro/BfzZ7rpVu1c/C+KYsJbbrE8vCwZJsWXg1nI0+RLOOcKiKcS\nFxS/tYcsagJYkHNOmaWBnECoBASBnJCKbiibYyyKTfScAwwdh4/aYCt5oTOp\n3LC5TQ/8CojjD++8Qg2IoQ/panEHyJ6MrXwBGJTYMKRVGKjGoPLSFGpXaiuF\ncgDiWtB729zRKzyoZbuUHpEPVdxQW3ZvzaqktmxQL7042jJu/oRyfqJxQEfm\ntLDKG0f50aTlVXVI/GBtAJuXACcLVvu/5NugFm2bEZMp6/i904rKibAZZrw4\nsxW5hW+Z5ih0tpTCHsWRXHrKEwlfhfNwbGEoCJyO8fvkgaZ5KTPTT6R+kV5U\n+l96\r\n=NOBG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+fp9+/zA+pVMZHEhymP3AlGtUuWxlQ7LYm4xUWmC/IwIhAP7kPC8jE9nHS2sbYI9LUR0Ybsir3RojE5nhbgEdwvfG"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"dotansimha","email":"dotansimha@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.3-alpha.1_1571953863646_0.962344392958886"},"_hasShrinkwrap":false},"0.6.3-alpha.2":{"name":"graphql-toolkit","version":"0.6.3-alpha.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.3-alpha.2+a521650","@graphql-toolkit/common":"0.6.3-alpha.2+a521650","@graphql-toolkit/core":"0.6.3-alpha.2+a521650","@graphql-toolkit/file-loading":"0.6.3-alpha.2+a521650","@graphql-toolkit/graphql-file-loader":"0.6.3-alpha.2+a521650","@graphql-toolkit/json-file-loader":"0.6.3-alpha.2+a521650","@graphql-toolkit/schema-merging":"0.6.3-alpha.2+a521650","@graphql-toolkit/url-loader":"0.6.3-alpha.2+a521650"},"publishConfig":{"access":"public"},"gitHead":"a52165048698f78586a3bd467edf5a1f59081404","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.3-alpha.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-9ekgyVN0paeAtKOsqxe+LoeyacMoEG/v9pzr94Jzy2lcN/J4sdF35HgoFK5+AuKyzL2DfW1BArrRSpiTLfFMSA==","shasum":"a16d8362053a4b4f67fe03a42f77fff81c308b70","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.3-alpha.2.tgz","fileCount":9,"unpackedSize":14819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJds2BXCRA9TVsSAnZWagAArNMP/RkuvSf1O7bW0ey73AGe\n2bmjcheaN+gA/Ma+5CLvmL5tv/4ZCf90D6XENfMhfoWFjSddY2ESzaSG+8/g\n24MpqfUrMbUIZSf+ue3foKciCnBL7GIHw71HJZqEOOHRDPgSR9Yoeqx2hsMQ\ngQ4StJTKwF70kg7d669+Dy+0V2O9sue5XDPlcz20YZx2LW3oH5eACDNBb1jj\n9W9rkNo04u0NaWp5+cVfcaW3jijMU3sCeRkIdkOngZGOCr9GwDIjgF9eSbdC\nrML+xhC5pBJBn+4knn+0IkzxM+RacMzRmyHJ2fn5Z4nuwFnlwjlpA/D1oOs/\ng5xqyqUAxwJIg7pfDKL9eS0HR6YjlanP3yi8v/QJhyoCjUbeqjaFAp/Vduj7\nTR1TgP5mB+MpPysnf8F3CpkuEG9ST8IuATx9wEVETWvTBsbrqmqkqUMHx6Cw\nX+PzsgZerV1cUEc+71KHNgWYxTiwqApVWFWlfyH4Eq64A3RuMHCnxEjHCbmv\nDy6ON9Bsz+biaq1hbOhFIo58hcfQjmCZQJh8Q+wXFDfltiuJn5Gtf2JkKKd1\ntVG79uACQBuVTt4iZzIPW9SlAaB0c/mF+UvcXeNMLpSzUdbn6OwjCtIkNbaf\ngzDZhblJOu687RRJluPnby8pyjw1MqXF6/t2gn7ay7DGZEFknsbcwaSVviuJ\nUzW9\r\n=IG8e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyuRtcXIc4g5AQN5e2tJ02v89eGddBKLgoeP5sMSQcPAIgZlQ7Lwuyph83RGiBmsVw+dXnjBLbYEgZJP/b3WI11mE="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.3-alpha.2_1572036694740_0.7433336938501502"},"_hasShrinkwrap":false},"0.6.3-alpha.3":{"name":"graphql-toolkit","version":"0.6.3-alpha.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.19","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.3-alpha.3+78c5e24","@graphql-toolkit/common":"0.6.3-alpha.3+78c5e24","@graphql-toolkit/core":"0.6.3-alpha.3+78c5e24","@graphql-toolkit/file-loading":"0.6.3-alpha.3+78c5e24","@graphql-toolkit/graphql-file-loader":"0.6.3-alpha.3+78c5e24","@graphql-toolkit/json-file-loader":"0.6.3-alpha.3+78c5e24","@graphql-toolkit/schema-merging":"0.6.3-alpha.3+78c5e24","@graphql-toolkit/url-loader":"0.6.3-alpha.3+78c5e24"},"publishConfig":{"access":"public"},"gitHead":"78c5e24a92ecceeace840d399050e34835d9554a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.3-alpha.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-j12MWc6xsDstLQpmNtkIG8dlGIXgBo4dTcHVOLAhCKEHIMuu8Ibef/V2GdK3zucYiQUQx/lkwpiJivRifffvxQ==","shasum":"55101bc140b0b944504a8fdb5940c763a11a4da1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.3-alpha.3.tgz","fileCount":9,"unpackedSize":14816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJds2F2CRA9TVsSAnZWagAA75EP/j9pZ40OTJJ+NxbYc6tH\nWnO6uoFFUcpDXYFilt4+c7R+lCcDY95hZnBRWZiZRTbUWpeVbWinI/JGbCF8\ndhpg3qG1xqCQzr9OfR/m36vV2/ilo3vKwd1bSQLZr+IrT4dHlKz73xKJmwcO\n22sg9tTILP8+jk5OJP8yEnf/NdwLoJMAOwkACaEPd+M3Lt1hqrPEvH3YDauA\n9BpdqZp1/ABs4nZ/ryH0pqkT1QJ8bo248slBAB02RjckujvVF1C4iYzrY8yk\nvEl96POGIX9P4iOBHuH87NUFBTPEM/uz2KMgVYDW8oBRbr0LAGshSJlfyigi\npaM7ldC8SYVNUft1BqDg72vPz4rnlcX6loTMZ0FtLToeBgnsdAqcSRU6zYzS\nAXgMdb7wDGS7kcopA9IBlrA/ID7vxezE8/eZ30+TzU357kTUSbEFhNwS8gg0\nFcIQgQxD1vuIFwWs+5FtqaHFl0/645C+Q7+oiPYxwdn9M6zDMUmGdl1XpYf1\nAdm2nZTL1EYxLkALuwrLYyAxd079Jxc+3izowueuPwaFceRZWf990dEt0nbW\nTr8U450w1K6CQDqknJ40BsARx+dgUaPORJy2ukF8e1lwizry7OH8umzg2kyR\nFmL2FpxdC5SAa4CqE8KVMi7VXYrbS9Tn7xUpkcaA/pBs0bwX4HAXQlBkB8qb\nW6xs\r\n=dOeW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC/L7Hsg5myrE5HgjC4GHLVniSf839uzFa2IqhjSu+cvAiEAznlWrgtYr2K5ly7vk7sUSLuOa/4tLSsb/cv1MWUOtQ0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.3-alpha.3_1572036981858_0.36298754703503944"},"_hasShrinkwrap":false},"0.6.3-alpha.4":{"name":"graphql-toolkit","version":"0.6.3-alpha.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.3-alpha.4+d1ef415","@graphql-toolkit/common":"0.6.3-alpha.4+d1ef415","@graphql-toolkit/core":"0.6.3-alpha.4+d1ef415","@graphql-toolkit/file-loading":"0.6.3-alpha.4+d1ef415","@graphql-toolkit/graphql-file-loader":"0.6.3-alpha.4+d1ef415","@graphql-toolkit/json-file-loader":"0.6.3-alpha.4+d1ef415","@graphql-toolkit/schema-merging":"0.6.3-alpha.4+d1ef415","@graphql-toolkit/url-loader":"0.6.3-alpha.4+d1ef415"},"publishConfig":{"access":"public"},"gitHead":"d1ef41540621f604a2561b6846e694578e34d9d5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.3-alpha.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-tVQloi6qId8EYEnlO4Qm4zDgeJLgFzUwXKeCvjVJxCI0MPSDNUl+9bD2Wr2SXfG1GmTyazu2JCBVXi6lXN6yQQ==","shasum":"0c675b36f32d24dfbecf37527da4940256bce9ad","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.3-alpha.4.tgz","fileCount":9,"unpackedSize":14819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJds2GgCRA9TVsSAnZWagAAwN0P/2TfYBUodqe+l4v99tgK\nHrWDjDTeNlB2nTQPF1qGRka8Ma5+3A5RAg01wbEalw1VCNvFtgPrI0gXHOB7\nFBVJF8h1Ui8+oiIGzu8CTfiM6jJHSvIEIBvLleTviiHWJmuTf3dp5+IO6jHd\n5Gqd0zAQtkWUyf0Nhy8Ywzbpa8KUppt4GwsWWM728fFHfsLLBfME5u/j3Qj5\n2wXwc00jCaPCmcTD+sIdT4sSnjghP6KSKEa5xJsTH0aemjCS1unzZ5LgrU7W\nJ8NuN55JtU84XszsHnnHEf0WeF+jvVFswMpePtyyL15RR0wFpthWEjs/69iK\n3TxYEOLNK/A0XQ7/8yThTxpMyy4f4g/phpgCzP0YqSH0Sw7OoQhVpNz4EYtD\nd5a0hcAVlCf6dKYb7Xl7aUpqXTHimvnktsCgP0vZhrzYEL2KYz2mHNfZuMfA\nc7rT6wAWI5Ftae/6DpG8u0xM5qCnsBtbdoyVnNApTpZwGcBPGj4Ik3BEAeg3\nVvk1f8IZxGyQoXI4zpwoAtWSPOUremqYoVDsoUZzwaZICBrBB8it4DLpArzm\naISVLbEReRxGqXXtWLQmdd1GKJqBa185y84/oa1Q5Cc7hAuEwHh8ffZ2SIW5\nDHqC/pplziZ+w6o2jfQ71XPQylj61Kekea0CAzDemh/RNvzPn+n8qQqpw+1A\nsMWV\r\n=9aR9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAu+wPAb06rUIRFaVoIZrxg5lXuIhBRGztg6JbaI6dHYAiB4qwu8Rhas9+mcZzicsUXbcylbRxqBPaNJbkWFRnGH+w=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.3-alpha.4_1572037024024_0.08694839589305414"},"_hasShrinkwrap":false},"0.6.3-alpha.5":{"name":"graphql-toolkit","version":"0.6.3-alpha.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.3-alpha.5+9f72a65","@graphql-toolkit/common":"0.6.3-alpha.5+9f72a65","@graphql-toolkit/core":"0.6.3-alpha.5+9f72a65","@graphql-toolkit/file-loading":"0.6.3-alpha.5+9f72a65","@graphql-toolkit/graphql-file-loader":"0.6.3-alpha.5+9f72a65","@graphql-toolkit/json-file-loader":"0.6.3-alpha.5+9f72a65","@graphql-toolkit/schema-merging":"0.6.3-alpha.5+9f72a65","@graphql-toolkit/url-loader":"0.6.3-alpha.5+9f72a65"},"publishConfig":{"access":"public"},"gitHead":"9f72a65f92dc884d6068661b9384021cd2f83ca0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.3-alpha.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-TuISsyNZpJ37bZOaD0wbKuf+0CNvsv34w+nxjyiUs4zTmFoejDn432a/a5Yvrn+tqIAb5Ty1/fwi5wICiDMH1w==","shasum":"299a0cdd71fe3beb21ee9e9fafe439862e48a711","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.3-alpha.5.tgz","fileCount":9,"unpackedSize":14819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtxf8CRA9TVsSAnZWagAATa4P/3HK6CQIwgBa+y9hh4Dd\nad+EFylrqsfYQgGlQB5AFHAMzEwZlm6Xa4a5UWpSk07jcOn4NT4t9b+bmePL\nq/aEbJLJwsVxxMad5MkH4IZbJojJwCe4u0Xa36x6SLeaFghE1xOQ00aBAPCV\n8CA9WiuItxUEAot8w4VKrac+VW9rsHzDmPDrD4uTdKis1u8Tmg54jjM4Q7qD\nyLOLd/KpXuuMEmJtPTnOahwfI5ZSenDjBGA22IktqRjzAqSRaLYSakPozXGr\nIqa/yurr8mcaCKBYmyy8iC4wV3cU+bMtT1k0D64tKgxsB+1QDOkwADHjWufN\n+fM2g7m8cQWOX/Kio+faZ/HusO+AT3Gv4UUJX4Yw3U+WxUYkXBoUSfdP4q9l\n2V3oCuYrn0ZLAKEDPjw8diCmGyTlkStiE9apEGhctrCJncj85YuObBW/l6Y0\nhegtBPko8Nd235fWb+oZEyACpqCp9GTHDDXQE5TefZG+H2IL/gNRurQjTavG\nkzgfJVhhZ7OS32KFXzrU6oHkTybhNPjO3LaJmP/Zv5D6XcfGmhy90uv6EPIV\nSFgwjzodQ9AfTULxnEbQSMAaAvrsxSpaWXdNzCVI1cKXdQQS4+5mrxCD/kUp\niRoUNN5FEmMOjBCc4hEK/PUH/ZW+us8iJL67k+j/friDjAX6RAmr/efXeADb\n/9JS\r\n=xchR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGsVB6gWtFjREzuXkCMtKbZ8budF9MhBMhvCTIBPGZGOAiBfo2rZRtWNCeUKJZL+apVrgG7ld6A9uynPrwfZXrSiTw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.3-alpha.5_1572280316075_0.06262252888450148"},"_hasShrinkwrap":false},"0.6.3-alpha.6":{"name":"graphql-toolkit","version":"0.6.3-alpha.6","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.3-alpha.6+aa367ee","@graphql-toolkit/common":"0.6.3-alpha.6+aa367ee","@graphql-toolkit/core":"0.6.3-alpha.6+aa367ee","@graphql-toolkit/file-loading":"0.6.3-alpha.6+aa367ee","@graphql-toolkit/graphql-file-loader":"0.6.3-alpha.6+aa367ee","@graphql-toolkit/json-file-loader":"0.6.3-alpha.6+aa367ee","@graphql-toolkit/schema-merging":"0.6.3-alpha.6+aa367ee","@graphql-toolkit/url-loader":"0.6.3-alpha.6+aa367ee"},"publishConfig":{"access":"public"},"gitHead":"aa367ee60048f505d075b4b6da3ff8e52e7c16a1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.3-alpha.6","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-L++AOhRIvWIF/3Tr7Y7K9USK9JPrflJiTinnFZlo1dhYu4LonXLL1RW+rishIxjwhy8+bRvwQEly+xo7huvh+Q==","shasum":"31df95f8d040675571be11c321b52d8cdf7a8ecb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.3-alpha.6.tgz","fileCount":9,"unpackedSize":14820,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduC+dCRA9TVsSAnZWagAAqGIP/2m0OMertOLAqE4vKD21\nLRQPcDQCTwVpAX0GwMoGluOg5k2k7u092A5QXI5LXas9rPJN4oLCthfXCmol\nCTiCzipn8eeTEN+H0s6HPOBRQ6w1+3XB6mFpr17Ndd6FepbLYOhjEq3OEEoC\ntvTDUV710svkaV7Wik4Fee+arVBmw1idaYqvcjGll4XZFmI8lQfEW6Uj/rLn\n8fRhHMC9AhTkVob+8N/hQXhjI4iDUu6X9Z/XGyShcMnDdEk/oAyT03IeBXRy\nDgQqIpN2SiVJGc8qbr47iHsclTWoKqrTgPI2a5wy45/BQ7KzWwSM9/4vew1H\nNDAteROUyjTJhDhfCPYPdB22x7x8ZKvxyXPeaXpN4fR4/uGhZU7y6k7XyBVt\n82OUuWpDpPjtFyS7lFyxVs9XVfiFW7ScnbV0AbW2Jj0UkQsWCyL4AF+zrv9D\nGU3PPhTL9KLMn838INmPdkre866AXS/UL37MN9Y98hHTAazHJkJG3MZwy4c4\nbTySPvM3aOTYzgPYUb57RNc6wjameFIOeZVHeNcSYrsH96kT1/HGYbLCgXex\nTUGeI8NK9NkWPi4ohnIaELADmuV3m+EIFzP9selUqAhL7cUj1re5jAWBFJ5N\naL0qeY5KSV1WOqOi2Ud1Y1Rave7bt0Xl6jaEL1lakQJkNtjpZ281i6N+m3Aa\n28/y\r\n=1cTO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCE9UggkbCGVtuGy+tWdX8MYQDTQ9md8Mn3J069mPba4gIgH8aG30BPHUC6RQU0IfxYD3LtMtE/Q0KTrcKcQfFZPkI="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.3-alpha.6_1572351901277_0.508317140610709"},"_hasShrinkwrap":false},"0.6.3":{"name":"graphql-toolkit","version":"0.6.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.3","@graphql-toolkit/common":"0.6.3","@graphql-toolkit/core":"0.6.3","@graphql-toolkit/file-loading":"0.6.3","@graphql-toolkit/graphql-file-loader":"0.6.3","@graphql-toolkit/json-file-loader":"0.6.3","@graphql-toolkit/schema-merging":"0.6.3","@graphql-toolkit/url-loader":"0.6.3"},"publishConfig":{"access":"public"},"gitHead":"24f3a15b8a22a1898004991a95ada3020b226087","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.3","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.18.3/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-j/5SWbEFMXJCOMw7C31T5vGpFvJWvO2LxcwVW4B92TYvfo8TGCIZzyxTb2G2GXSESJfgmqZS+9x13mntuc6rYQ==","shasum":"5f425ba3f0e58a8cc74e00402e0302c5b7215ac0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.3.tgz","fileCount":8,"unpackedSize":10566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduC/VCRA9TVsSAnZWagAAYR4P/1aq4HsYpQlIAT2Njr7b\nEJPzo/pOyKIRCAr3UQHKCf0Rj1fFtJXqmCusYVym7frYrWDRHGKz95AYkgvV\nCF69OAYMzcv9ez9WTnoi8d42Qpg28sJc0BIk0krhYEND8WBjfdbRPJAAV2Wa\n++6EzwBW9MgDgtQ2eGoEYfVkysFFx+zuAEWbYxpNBNhai+fmdCwQvPWcUY7n\nQu1ZzrG/u0MMtDNs3AFoQhohqkSqPo7CrVx+vIvgmYnuxzCdk/MFTk4xQ7lb\nF2ttgx1TWI0hu/Q61aQFv9YxoHPAG+ril5fMP5A5ONA0fm/KbUa/L+9enU6o\nLH8X4ysYGe+Vl+14qYbAe+qQm4LrLtWVWo5s85fLeiIKPfwYPhMFV2YmXsCr\nsdWxVSAhK8ER8I/OetyM3H2zuXjIghmZrDsYs4A5Eq5oCPTgLdsl72YcBDRL\n0bWnDt1Lq4+lEyXzAkYoJe6jVzJ8xEuYD9NOfUzHIN7Dz58KXe0gnltjC6CG\nnjlxe/8J0XT8UVwk7sK2z3S5A8LdhN+5U5ZtSpf6Y4Q0g6WyfdgWL6/uu9aL\nIxLlHej2Jfuea4FsbIZbtKmLGESkz9CB/GENDRetgqw8BBaNl66H9/g6rQ6Q\ncBGLK9gIB/4rYZYeLwQGspFNBHJXcfxAPaoM7vZ5ZPyLii/nqW051HEUM52p\n/erF\r\n=MGGv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDoUGlseKHLlH3wJIUakU39MwBgj5f/tM/A736/3B+zxAiAt6BDpvddrWkic4nYla0EApWvvdKEp3+2r1SsJEa2U3g=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.3_1572351957030_0.675744430157825"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.6.4-alpha.0":{"name":"graphql-toolkit","version":"0.6.4-alpha.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.4-alpha.0+24f3a15","@graphql-toolkit/common":"0.6.4-alpha.0+24f3a15","@graphql-toolkit/core":"0.6.4-alpha.0+24f3a15","@graphql-toolkit/file-loading":"0.6.4-alpha.0+24f3a15","@graphql-toolkit/graphql-file-loader":"0.6.4-alpha.0+24f3a15","@graphql-toolkit/json-file-loader":"0.6.4-alpha.0+24f3a15","@graphql-toolkit/schema-merging":"0.6.4-alpha.0+24f3a15","@graphql-toolkit/url-loader":"0.6.4-alpha.0+24f3a15"},"publishConfig":{"access":"public"},"gitHead":"24f3a15b8a22a1898004991a95ada3020b226087","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.4-alpha.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-+xsx+aMZ2kaPazm8KlmTXwGn3vWa5pTf0GgiYzPSVOnwsFI4ba/7MF7K60njZYsO/SnkGZ+rJe5eOl91l/EmSA==","shasum":"680de7eca84e344f5595bf294269e2ea8bdee2d5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.4-alpha.0.tgz","fileCount":9,"unpackedSize":14819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduDClCRA9TVsSAnZWagAAT1EP/RBHyXGER1iRvuq3gLGh\nhZrlhwgvJRrD0MNOMBbG0+FwxswFiWWcgRAagXttUSIlenYlKL6ovOBEBl6M\nAdk3fXL3LefQ/KsRdEOpcTc8d/uPQvMJRlLDPSIhPHlKUdZuooo7SSynDQiM\n2UJtvAklfqozgWC3CEt3KbqTsl0LAkXyHMNMKes6qwE3u2pIqExcLE2R5Eii\nZ6J3ATUxUUbqCa0WPW5Y2Z39UL1kVn3EtxABhATZ+zrTKCj8Rjdv7eHSlfiE\nBzst2c8eWBIKts/jmTh2f7RAOTdffUL3TrNZBrLCgbpox1gLWFDMDeQqhgrw\nMqvlK3RE0+HO4oH9qMc4/tCL7vKvWYoAmpPVKyowonXLWqklH6XTlXtHN0+X\nlDfAPg8Y1vIj6yIXAYGpiD0iBiKAXLRag3Nqixcvzot5+9m89TrVC+AueAF8\n+WBPQb1Ah9iiWTbkXsboolZlqAA6NNdMl/NzRAyjZco4gtLDmPc6SApCigng\nqiO+TypHui/scxkFH41V6rneQzQo8VFsyI7WZB/STWJqZiAuC7Mb2fc8KinU\nnnLmJfDK9sO/E27WpQHSINXARNwnS2F6YQnHpGdp6nLxgD5WUr38jZzkZj4z\nsIu7BzRQ5gdHc+pMY7Ye36g+TWF41zD3t329/ZzLdpE3bk9NzfTtJM0/2TFK\nNuv8\r\n=e6GU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICzZ2hzduGpOSm/trvnevEqsOY2QVz3HfcToIar0P+MGAiEA4nAHTmDVKnPcMldhPIaXJP5Yhi1sg2FbzLxmIQgATvI="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.4-alpha.0_1572352165456_0.5792264740627528"},"_hasShrinkwrap":false},"0.6.4":{"name":"graphql-toolkit","version":"0.6.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.4","@graphql-toolkit/common":"0.6.4","@graphql-toolkit/core":"0.6.4","@graphql-toolkit/file-loading":"0.6.4","@graphql-toolkit/graphql-file-loader":"0.6.4","@graphql-toolkit/json-file-loader":"0.6.4","@graphql-toolkit/schema-merging":"0.6.4","@graphql-toolkit/url-loader":"0.6.4"},"publishConfig":{"access":"public"},"gitHead":"71f1db01873753da06537999bc95851718fa02de","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.4","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.18.3/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-9CJCl1vCLloFrE7uSJdFQEfuJMShKAmViSi4KxtpqYdbZ1uTVFi7EdzKhVDXYVmdJrrGppDyJrOqcd21g0KQaQ==","shasum":"9defee58b6ee7ad0e9931b9c86470a96ef4b37ed","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.4.tgz","fileCount":8,"unpackedSize":10566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduMv0CRA9TVsSAnZWagAAj+sP/0j9LmXL16BJjFWRIXc9\n9CFmVKuSkAPR2NdhdqXf8X0nXA8791vECTJASJqS8bCjas5yQ00ojrQqwU+z\nMTyqxOfOWJS8FflnATW48bW+Us4jM56jUmJ+sasRifxKLpNh33/iEoAqB1Dq\n75QtwEg1YDgXrVtGowOhZ99OLe6OZLIxPrrGUFaiOYnoeLF64UgQt6cbbRZ4\noDw1WUErXh9vauJXjKTh8JPw+3LYiOq77eUfnfwxBJnbWjDTX1C4kdClMTYT\ny16Py17EAvUhWZioBJjPesFJ5HGGJyehBhQw721UR9LreVKJgIszQdBKbwZV\ncbeW2uxz0J2Wk22VpIejvUaELiEBfJvs1h+26ql6WkWCMQPaRArVTyfV5kvj\nNGj1NmhCfWbpAUE4cy+OL6pBDlmF8wi3leWyk5Je788z5maeJRPUw5QURowx\ndtge3TtXShZNSbuH1iI1KwtkOxdyE030nYR86jusRGAS0ZrnyUXbLxyWobq5\nk7vg46SOvDvJ2yNmTHi/Au/MHo74skyEY9X5UhDy5SXvWpKD3hJK0JmbeSs9\nPGLMkgOU38Jpk0tJLL2QszDQZHb3RIoc/gu8sVx0RfoT6bA0C3818zp7/0g/\n8kxxKOMiVyqIDgU3MOFCn0So51GRhv1DZK85vVUiAMOq9WFbRNdsLRH4xZEv\nJgTy\r\n=nGwb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGkSLAIJys037/NjfYsMBEoAZPrKEMc+Nys+/eEwpQzlAiEA/tNWdhyAMswR7D6OGrrRcz7u7424Z3CEAz17eoK3eGc="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.4_1572391924017_0.8360429981665394"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.6.5-alpha.0":{"name":"graphql-toolkit","version":"0.6.5-alpha.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha.0+71f1db0","@graphql-toolkit/common":"0.6.5-alpha.0+71f1db0","@graphql-toolkit/core":"0.6.5-alpha.0+71f1db0","@graphql-toolkit/file-loading":"0.6.5-alpha.0+71f1db0","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha.0+71f1db0","@graphql-toolkit/json-file-loader":"0.6.5-alpha.0+71f1db0","@graphql-toolkit/schema-merging":"0.6.5-alpha.0+71f1db0","@graphql-toolkit/url-loader":"0.6.5-alpha.0+71f1db0"},"publishConfig":{"access":"public"},"gitHead":"71f1db01873753da06537999bc95851718fa02de","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-Tgo5+h6s8bpU5ujcWfSTZKRVG14TUXu79GGsC9hPMx+JNQ0xjG+rGbj5t7FEUWzYrBhF9rLEiw/nn/UB+9l8ug==","shasum":"63a4a129e06124f22562e57fc4bbbcdf32774fc7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha.0.tgz","fileCount":9,"unpackedSize":14819,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduMzACRA9TVsSAnZWagAAyUoP/Rw+N1AyLG1krC8FXOn6\nLcmu1OLG8eRQj6svWjW2WkHv+q+zx5z0gsdQjwZGK9SGFGDVigoYN3q99HlA\nQ+Nw4WeH0jhpXoYqxxuFGu5YKxEMZVL9uV39mnv6NcjVrOgkEwHk9k71Ar+N\nnVGtYhYw82UZBs7zmQ5qK9jxs4bMRdCcXWGxyktn7+eTfUG7UxPjWFRRGf3M\nixdblu1nm0JVjLLgZ1WmquHmu33fDUVdtdr+QEA4caKzu0z8OVa+ZVvWM3Fq\nkZcQ4+pouwS2UfJsMACQJDyZWeWbJQbCGKcPNR8xhKIM+kCLjRrsFVwYMRK0\nR9bJ93pr6Zp1bt+0YcXlLj5kYoJfYJ8yeD33/bbwqI0zoKj5joQpiFduWnOZ\nW16Ecbq+SiDpmLI7em2FlJ9HQ+jekM1QgcCAx0XJZ27r6VI2aISXKYxMx7GC\nXJjFLqDDUSlixWK49MBFtCuzuDiJOYOJ7HqPSQTpyFdyiXsLFo5/gmDAh9BY\nmJ8MBLp4T1EZ/FPK57mwhhPOcOMSjtSA9uU991ffWRNNQPxjmBjnfxCZCMY1\nem2A3Gxoq+nmtMeQzpD8qvQltkt7Q/MBJ3/FRos68Jo+JJevFdArqh1wVA05\nn9Plh57SffzFiAJzgYpgCP4HzcSBOJicAgsuAbKyDuNU28m79I7WydAt20iS\nC+LF\r\n=0TP6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEybM4MtfKmLS0NtSDF4T+/4RvjiOW4mxfHQVjLU8csaAiEAlY2FyyfjEMcIvjnf9f5e2WZQA+VG5MMVmKkq/xUYEjY="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha.0_1572392127877_0.5718644004942954"},"_hasShrinkwrap":false},"0.6.5-alpha-4f44824.1":{"name":"graphql-toolkit","version":"0.6.5-alpha-4f44824.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-4f44824.1+4f44824","@graphql-toolkit/common":"0.6.5-alpha-4f44824.1+4f44824","@graphql-toolkit/core":"0.6.5-alpha-4f44824.1+4f44824","@graphql-toolkit/file-loading":"0.6.5-alpha-4f44824.1+4f44824","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-4f44824.1+4f44824","@graphql-toolkit/json-file-loader":"0.6.5-alpha-4f44824.1+4f44824","@graphql-toolkit/schema-merging":"0.6.5-alpha-4f44824.1+4f44824","@graphql-toolkit/url-loader":"0.6.5-alpha-4f44824.1+4f44824"},"publishConfig":{"access":"public"},"gitHead":"4f44824e42beda8ccb1394e0b778fb5f43db7185","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-4f44824.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-iUtaeMGt2ltXU13cvMUrn5xdssPRIc42lIUNRqVI7O73Fv5mo4QmDwprAlkHBhNoLl7vBITmV3MP1GiA4OvaEA==","shasum":"30ad934fdab7c3bcd805e5838f64779e7da2e30e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-4f44824.1.tgz","fileCount":9,"unpackedSize":14889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdujOFCRA9TVsSAnZWagAA4BgP/j1asQonlz7yiBEDeoT3\n/JeXRNk0z2tnJvG5ihD0FOdLS3FCBBZEFmappViSTQgH+PNaGBSZkuxw4UEu\nqHnfDAJ6/VWc5DQjf2J2Sx7tBrSzSfCd746qdcpxqmVN3LCiyiXMtd9orMGZ\nYBEw73ai2zS0gAp6Wkegg2dQU5iqBIyT4NFyuCcmxFtHzh86ZbG/UMVTYQeV\nylUscuB+04o8Af1yvjAwjJzz/Jgw+sAmEYpfYAy94FU/G8W1Tnb1S0xHJL+L\n0N4u0YtbWMGVch8HT2O+gyQMtvp+2bdgHhKdF0VAK+rabm25lPCp3v3SjQX3\nf2QW3vY51LaWQOJMCBbdbVSWKia+KrRRNf1lh3MLowiTEK9czDek6BNs8Sqt\nheP1RXMJVqX80KdBZONLftGAXMMSSw+JQDc1hJDTpsAK+GSlKnDi6FY2Awmi\nAVZP45Z6ULKHJ/wkOB2PZcBz9Hzb+3lmg5rPqB0bCkozapj6S3QKgFczDS7j\n0c5NUBHuyHtDwIVTHilakura3dJdAXP7PpFac3FvJGyP4zFKGk1LnvTFhhu3\nvXPZcI4U2oiZL7mlWFIRISIck3VEG+whFB7QfwJVKsZKAlCgs91Y1nroOA4P\nRg4X/1YZ4mqnIFx/WkKAGhgVridXeOPhvpZOuvBy5mQg+4WBsB+zx5lZPe+y\ne8ka\r\n=5APo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAksxWglJSuul3qdKDBL+W4fnijiOkiNaQ318c8j72IJAiEAp/vatevmArtgMrvOazDyOiVGGuEOJtW1sEGaDmsK+QU="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-4f44824.1_1572483973131_0.33343276144092804"},"_hasShrinkwrap":false},"0.6.5-alpha-f4625d5.0":{"name":"graphql-toolkit","version":"0.6.5-alpha-f4625d5.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-f4625d5.0+f4625d5","@graphql-toolkit/common":"0.6.5-alpha-f4625d5.0+f4625d5","@graphql-toolkit/core":"0.6.5-alpha-f4625d5.0+f4625d5","@graphql-toolkit/file-loading":"0.6.5-alpha-f4625d5.0+f4625d5","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-f4625d5.0+f4625d5","@graphql-toolkit/json-file-loader":"0.6.5-alpha-f4625d5.0+f4625d5","@graphql-toolkit/schema-merging":"0.6.5-alpha-f4625d5.0+f4625d5","@graphql-toolkit/url-loader":"0.6.5-alpha-f4625d5.0+f4625d5"},"publishConfig":{"access":"public"},"gitHead":"f4625d5efb0a2aa74ffa30a1e29d5bf61bfb4c79","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-f4625d5.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-p9NtQwnlgarBTmS0a8BzOMKvYzD4GSNZSEldryKU9j6h0q5GSAwicUwqMGvH9NF+B9MXS74gHY4mFdxYMuMGBQ==","shasum":"dd7f9c8bb05cde4a6332856f88979e93d735586e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-f4625d5.0.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdujTOCRA9TVsSAnZWagAAhgkQAICuraYh4j5dbaVxsmqv\nV3ea/Gt0Mg3s6bcQTbAJbZTdmutYJJXVd8dSReu2nzhvZQTBrQSPksUHbUl0\nSZH9dq4f3kWP6kMS3Yvv+KA18h1fRxOByX5hECrB2OQGZCLfXS4PQLBKqiPP\nrv4C0kuzDKR8mwh1hlVqIy5jWwdfkzt22+vAdScJcRes67F1I6J2x9LTQ9zg\nnXBJAr1gEmx3BDWnFsW3VTPp4jKm4MsvXMcCviCgsndnwf8zxRfEcBQ4oM09\nTDLK+aS70QpBNUMTtaapBPdst/QrS7J44kfoTsEZyGXAx55w/9xloSrJGllx\nCBCjgu96NGAdgYjMJd1tpVYAaU9B8WVipAIClbF4DX4+9Y51pBi3ZvM89sDw\nfZNljSYvgVBcKMzReYt1LVRFAqK21d7xjgZKA6jTIfqt1dErXvXU9+5AaK5r\nq/RFhXEPoACyZc9NRAnYTd+5yOlrQL91qROcoH6b2uGj8kx50PNZ830b26fv\ncryJJT5SImAojFqt8ABuR+15jSEysnEHsmE7orQP+ao+vNmefynrK155Zr8J\nywWtFQASkRTAJCbfdbOrP3eb4KyJsTfWV/b+k+01hBudj0gifPcGO5PMTxIv\nw2ifUarEA4CSTxjF/aIJx2d40JZ+oG2bswb8lGOe1OF3rWS2YCp9QbQW5wiQ\nBweB\r\n=IHVx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCq9lNl0KeaIysSV9glya4Wax4wxbx7Hr0I7zgQ16eIxwIhANjETdY4S6qAUR3JvMOLmM4oBcN9lPOL450/U2iNuFH1"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-f4625d5.0_1572484302334_0.6469895384927835"},"_hasShrinkwrap":false},"0.6.5-alpha-7a40c0e.1":{"name":"graphql-toolkit","version":"0.6.5-alpha-7a40c0e.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-7a40c0e.1+7a40c0e","@graphql-toolkit/common":"0.6.5-alpha-7a40c0e.1+7a40c0e","@graphql-toolkit/core":"0.6.5-alpha-7a40c0e.1+7a40c0e","@graphql-toolkit/file-loading":"0.6.5-alpha-7a40c0e.1+7a40c0e","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-7a40c0e.1+7a40c0e","@graphql-toolkit/json-file-loader":"0.6.5-alpha-7a40c0e.1+7a40c0e","@graphql-toolkit/schema-merging":"0.6.5-alpha-7a40c0e.1+7a40c0e","@graphql-toolkit/url-loader":"0.6.5-alpha-7a40c0e.1+7a40c0e"},"publishConfig":{"access":"public"},"gitHead":"7a40c0e26f2246ca1cea009d803b6611034d0f3d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-7a40c0e.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-rWAdZmlwR7TblCqhp8Oc8P4E3XwHJHsnV1xAhSWoVJRCqg+D0iGylFtUaiExawBy08MRcDJ5euOHt6xkfhx4vg==","shasum":"01496ab5a2ac1545a928b4a6ff9b5cb3ef3b87ad","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-7a40c0e.1.tgz","fileCount":9,"unpackedSize":14890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdujTtCRA9TVsSAnZWagAAusEP/2Z8rQYFbA7eLjDophi4\n0XbN6yMDQEP3UV1++yEI0m9y35TZ07dhvpslS36TVY6fSRx8yJZGqkHlZrOv\n6RarZButvRUNDiN1wQt2Lgm9WBYi3dqAK06vMxa67swREdJXHMNEIC44v/M/\nK3GZaXP6Dz5bPXsxQOImChM44+P8FnUGjaQfZ3URlEhTvXSKrQdJqgr2lu44\nTAa3cqCkoGcXl2d97OeXc0pfrZnpGvjLTUGE64PzVeGCwdcekg1wQQYLxf/S\njYXLruFiM7xvIIDlt/mOVZH/B+OxBhszN5FnN9gzLtHFwXFr/6y3PjHJZspa\nfafi1KqFkp7FeaNKIDO0czyR4tTn0zIYySwEOFdKgMIKo714/isdJd4754xH\nc5Y/j6c5JlLWMhkd3s1yC0ub0pnPmxlujAkdXJ3iyybkmBe+6tZrfdfKfWva\nMnOVLJPQTtVmSc/79YPKS7DvB5sacrUv6aGjSuDe5iKiGho9d0Drxcu+Zucr\nLLnxRW1H7eJLwbVGCyFdw56RmTO8L7eRuliZgEl4rXGY4QteBcTYkRS3QQV/\n4eGdsPjscTO/jQk1g2vSeQNiOp75nZwaXweWkqdto5dbRGF+kYK1aZnfUD9Y\nQI2hWpiJsEZSX2iAGUeYLzAgV/7744gQDuD+XwXd7TyBhwq5641G2RnC76/P\nU2BW\r\n=X6s5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3mWk/38kWi+JuK1ezEIvctVbEnfZPwLvCdvbo3532kwIgXgazvmx6/F+othVNI17cZgNMgZPf6Hk80tIT+YWQ3w0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-7a40c0e.1_1572484332878_0.914886769314543"},"_hasShrinkwrap":false},"0.6.5-alpha-b0359d6.1":{"name":"graphql-toolkit","version":"0.6.5-alpha-b0359d6.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-b0359d6.1+b0359d6","@graphql-toolkit/common":"0.6.5-alpha-b0359d6.1+b0359d6","@graphql-toolkit/core":"0.6.5-alpha-b0359d6.1+b0359d6","@graphql-toolkit/file-loading":"0.6.5-alpha-b0359d6.1+b0359d6","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-b0359d6.1+b0359d6","@graphql-toolkit/json-file-loader":"0.6.5-alpha-b0359d6.1+b0359d6","@graphql-toolkit/schema-merging":"0.6.5-alpha-b0359d6.1+b0359d6","@graphql-toolkit/url-loader":"0.6.5-alpha-b0359d6.1+b0359d6"},"publishConfig":{"access":"public"},"gitHead":"b0359d6ade2fe90e0ebd57947c7c3949e6eda94b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-b0359d6.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-WQD9yk6Zn+x614poAG1bCr3PQsYD3xJiqvtTMWVEA9AOvy1hP6hgedhV5HT6tIbfOM2VdMyhuib8o4m9XWriMA==","shasum":"9532db44cad747a649a0b61e880edb2dc17eecdb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-b0359d6.1.tgz","fileCount":9,"unpackedSize":14890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdujT4CRA9TVsSAnZWagAAi48P/3DSkBHE5b8tcI16/pdX\nG3P10N2qBYI+8y0TinBZYiJwmyBlh+4NN7RWo33W//A6Li+9pP1Vxl/hV8O0\nQv/etAezO68BokdV6D69xC7gyxhkssko1JIwhFgqLnt4TB4hUYdom1sm8yoG\nzMtHuD/FMq+uP5R6OXajP5js5LKRZE0VMPJxhm6niAHtKQHz5hQh/+SPXTKM\nBJl/wBUn/eDq4d7rJE3gecjYGmUTsbJLpMsEfQsK8YO1I/KInJ8zXAP9+A76\no5Kr3//g3CN/VoHkziMn0bi7SFwL45PJRqXOMFM7+zUDyWfon/3Ntt/hZARt\nHvAJQ9WyWih4uNnHfHgR8wBvr3Ezx1Zo7rwe+Zm5GG4ia2lLte9b9YTAz9+m\nqPhQ1uijSylzETQa7IM2gC7DR5Hh+r2GWNBI4iUh6OoYWR0PHhLi3K1fG2LA\neineF+gbjaMGOO0qmnJuYvEuF6rbHLjwOWB/8s2OfuVG/h42nzN/MziZv23b\nPb4FfUJ6iALDQRaDkAco2CJ5jMdC0tX3TySbiUehdwL5Y4xA6pT4b/dBfbom\naHNMAL8TLJOmRqpersU1B5EgQ1/Qv4F+YP6GDuV92zXKIseVDbj7KCuY3Mhp\nneiGelXql26B8ZCxwPSjLTQuoL3b1su7b3RqnXVNuUGn57ZjABxo0DTDZhqb\nUKwe\r\n=1o6U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEqo7b/WUkhDjfJPxtJWF3FRpni2t5YGNOiQCpkAswXcAiAaMy2eSlenTFdC7wEzyUtS/wncgw0CFpG9n+USztEbyA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-b0359d6.1_1572484344495_0.8555105222309753"},"_hasShrinkwrap":false},"0.6.5-alpha-4377024.1":{"name":"graphql-toolkit","version":"0.6.5-alpha-4377024.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-4377024.1+4377024","@graphql-toolkit/common":"0.6.5-alpha-4377024.1+4377024","@graphql-toolkit/core":"0.6.5-alpha-4377024.1+4377024","@graphql-toolkit/file-loading":"0.6.5-alpha-4377024.1+4377024","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-4377024.1+4377024","@graphql-toolkit/json-file-loader":"0.6.5-alpha-4377024.1+4377024","@graphql-toolkit/schema-merging":"0.6.5-alpha-4377024.1+4377024","@graphql-toolkit/url-loader":"0.6.5-alpha-4377024.1+4377024"},"publishConfig":{"access":"public"},"gitHead":"4377024aa02631a7ae19b0102882cd6e99e1aebd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-4377024.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-45cooGkStKRAGuGo0UUdK3lcvGZapkWrDHKrS2OrPxVW/LQ4C4gdf7zzvRUr9S77DJRMiXn6YOFWw1FTV8B8Rw==","shasum":"4e48cdf785bf153537ca8aa43e93a26159a1e3a8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-4377024.1.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdujUCCRA9TVsSAnZWagAAH2cQAJxZoKTOnHTyNmZzFv+K\n08pNcu8csnH/lOj6TFjWa64I9WOkB1SKoBW+z2+7eWqH1tFb2oa14rq8+LQw\n6IPWkjnkMJJT/bxl/Opgnnel+UsD6PAu4yzC3cuC3R3EalTgNXu0XIrqksV6\nPr6ir676rTmA61Aig8ih7DiU6oe0l4I260lCiT8G8530iCn3Y9BWOTxbQ6+R\nnL1P5WhnYWa4FK4D34SeuKxqfyYY+QgO59QUvoq8y5L1DFpzVZduZMVBRgPi\nL/x0WLEZWG183HXdITncD3L5p6rAeO692o8EnQ39un8FQrejFQ10jYBwIWrl\n15PQF2FeSIDs1E+R0KS4zgn+SYoH6Isi92Qv1fKjPyCHDyqUkHFGKXMJdt+j\n9X+wrTrWC+eGCVX37uYPYUonbgU8LpBf8K9Iy6RO2uheTr9kSQWk/zVZtKvS\nf57VLaR/khu0QKbQnhyDlD0gYZ14/eJM5E/rtqD/JxzWo0m18Yn7XOFbYzDR\n8WMocnQvM+dHrpIkiFBl8zr9TpbmRMpwF6aSqIrIDVSgh/D1Stj6H+cUcZAT\nyxJk8BjVNlId7znVXB8dJsMIjnXCiKvg1CcniDnY+E+VfK4cS0oOnGQ17J8c\n1NFRe4iDZ3zCbfqGjvERmIjyxEz9KlRJdruZFVXcTnhViz03EomQM0F1q8Co\nvleo\r\n=QZyI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHrpmPIxvp7UOfUGGnalRQ/uvdsgPIUWOBzZ3nDsMxQwIhAID/lJ5FckmoN6zuqqNDH5RU04VIVzXpYb6L8MWBdBL4"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-4377024.1_1572484353879_0.6097638132678129"},"_hasShrinkwrap":false},"0.6.5-alpha-cea1613.1":{"name":"graphql-toolkit","version":"0.6.5-alpha-cea1613.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-cea1613.1+cea1613","@graphql-toolkit/common":"0.6.5-alpha-cea1613.1+cea1613","@graphql-toolkit/core":"0.6.5-alpha-cea1613.1+cea1613","@graphql-toolkit/file-loading":"0.6.5-alpha-cea1613.1+cea1613","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-cea1613.1+cea1613","@graphql-toolkit/json-file-loader":"0.6.5-alpha-cea1613.1+cea1613","@graphql-toolkit/schema-merging":"0.6.5-alpha-cea1613.1+cea1613","@graphql-toolkit/url-loader":"0.6.5-alpha-cea1613.1+cea1613"},"publishConfig":{"access":"public"},"gitHead":"cea161321724eccb5b9e851e28864e4ade00072c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-cea1613.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-OR7UvCaLhSR+Ko440bdlhSJakNA9MLilACZCo1IhQWokafPNjPT3IFyZDgrTeKX4BoQTjSEZp7W6LK3NIQMpQQ==","shasum":"7690ccd3d58018dfa71975ae0d0d9ffcf36894cf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-cea1613.1.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdujh4CRA9TVsSAnZWagAAM0MQAJhC+uLcRMTw82t/xTQH\nKANlCBfFRtx2rvFbjRbBXpXai5Z6ysZO0HAWIq1lvxA2r+4Ewll36lh9jWII\nWzsXfcdMm/RKG1oEVi8HTKoxaV0ohk+12Qkp+KPEQFtamH8ZDdAcw26v611Y\nSldm93bF2/V8+P8NH2cEWcAWMP99gmT2P2tt0J5mfCms32ws5py6RFjMxegg\n2CpTdQYmaHJ1GgUuMzMkFoM23K59DED4RmPDPXPomkEhgKtCc4lw8+uTS7g6\nrhOu0ioIQAwgA4dkkV2Dt516YfFzkPToptFMwaPDP5XaeEPm6rVWhQw1b4Wq\nSewYGiDVj68aZDFUw2S6d0SgvcJ8xqhv3WjikKxoXHAqEhCIc+boF9n3oUjY\n0fLO0VSGy75oaHCpoI821EdzW9bc8djXtEhPlIv1ePiZMtwNOHEA/IVUmbjH\nI0fJoLrnSP24l6KmVFV1deCHKkwb+gHDDCb8PUoN7k1DnzWpwOCZwS+BPUDh\nHtGrSxbpg86URXOsUNeIIUhbIM/CwPmi34tldobiivFYB9qar5eGmq89Uc05\n6UG7jmXYTd140DKXI+eo+lZTU5PQW3QTyCLkBHiZX2S5L7Fjrf3eVHb4MphV\nzFQUBHw4wntfwMbCJAxwZQ+gp3SfK+gA/0iHYYy2vw0zZxbnTdCr2v5zOcRj\n4HxZ\r\n=auaY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfRJryT9tv9RpP/mdR+lFutvRJXWABg1lBXXLUthy1FgIgeMzSQCEi7kbXAltqa6Bl4MxCoNlJ1/QjWXzWfxyu6i8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-cea1613.1_1572485240466_0.2958597975503119"},"_hasShrinkwrap":false},"0.6.5-alpha-030e289.2":{"name":"graphql-toolkit","version":"0.6.5-alpha-030e289.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.20","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-030e289.2+030e289","@graphql-toolkit/common":"0.6.5-alpha-030e289.2+030e289","@graphql-toolkit/core":"0.6.5-alpha-030e289.2+030e289","@graphql-toolkit/file-loading":"0.6.5-alpha-030e289.2+030e289","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-030e289.2+030e289","@graphql-toolkit/json-file-loader":"0.6.5-alpha-030e289.2+030e289","@graphql-toolkit/schema-merging":"0.6.5-alpha-030e289.2+030e289","@graphql-toolkit/url-loader":"0.6.5-alpha-030e289.2+030e289"},"publishConfig":{"access":"public"},"gitHead":"030e289c40984c6c727e243ec49051e967c50202","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-030e289.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-1HbrwAF94VcvPhBT1qOiu6M7eePcZvpj4xL8+KA7wVRYQoEHqutl0YryuPl+Y7fVE8gLzXnWcA2S6yUj39eqqQ==","shasum":"a41d5bd4bbb4c40b1196af1be8f8864effcf41ba","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-030e289.2.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdujiaCRA9TVsSAnZWagAAdmwQAJVQdoVJkAxNLoVW0nE4\nF3ydt8CVDumTgJrG5QuHKRFrZOBL6iI+c/evxnGz5AIs2m8JnukErD+zn/bZ\n1quUmU/dV9S3+sfvmEwbj6J5UG0NYgs2W8iaNo+5aJVBjfneuCFyb0/jisN8\nXALBW3DAuie17FPeSux1xvRmpT7iflXC8OebZXP4eFfjeHcEutfim+PSuGoY\nQ46AxCznuxVMPCNNlZ1MiKjs4doEzyF3cmIUdDpzlNIjlYxnxxZiJuEAF4ra\naZEDaSYePUBian504y3tJeBjRkL2AuHNiQfhbN8TFSGoylVqx5R9lzVnkhha\nuM7Qfnz9sPeqaFPTQAQAlky7ASntmELbNY7NWeVncymlfQsRqrVqoHGrDrCC\nXWwWWEBQeSnPm41/18q0UC7WJ1TNcO7tyuZeiq1iqKWvoe1sLRkEoVYaTL7y\nLeG3LkIWj/EhVCC7+4Ejxi+ZIR9p/vEcrM7nDw2EgZ2mlNPKh+UyBPqqN27K\nNruWm2snJst1xSoKR4cfpIHYqVL7saGYPXDOWM4q9ZBrQiedwAi/zFsEAWiQ\nh1wb8tK7rIHu/+Z3IZ2lyDHMDDuzuv0qqNMDu2nCVzIfAqGnHIevQSE4TGWm\nhuE1MShtFGF72Hjm0EojBV8ghv6UjVnUdB8R+VAbmtfZfEaBh3Ucw3i1J0tF\n1emm\r\n=c0hu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF3mJtc193K3mdl7M1swpi+u3HrIzyHEZqG5XUxf6UP4AiEA7OQ+dkAYLW71IVG5PfTwfZYPY9v9ef0+zL1Q80kThHw="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-030e289.2_1572485274463_0.8514530482104292"},"_hasShrinkwrap":false},"0.6.5-alpha-b5f4180.3":{"name":"graphql-toolkit","version":"0.6.5-alpha-b5f4180.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-b5f4180.3+b5f4180","@graphql-toolkit/common":"0.6.5-alpha-b5f4180.3+b5f4180","@graphql-toolkit/core":"0.6.5-alpha-b5f4180.3+b5f4180","@graphql-toolkit/file-loading":"0.6.5-alpha-b5f4180.3+b5f4180","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-b5f4180.3+b5f4180","@graphql-toolkit/json-file-loader":"0.6.5-alpha-b5f4180.3+b5f4180","@graphql-toolkit/schema-merging":"0.6.5-alpha-b5f4180.3+b5f4180","@graphql-toolkit/url-loader":"0.6.5-alpha-b5f4180.3+b5f4180"},"publishConfig":{"access":"public"},"gitHead":"b5f4180c90509551769be02ed1a12b152586ce89","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-b5f4180.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-1A1/9WikOBrgnLuJmjdb/hX6xdTAO3obTvADuY+mS9ZYE3gOeSs/miayLk/Q6Ts08yzKt0jGVCeYXmEsukQldw==","shasum":"b3e5f8c88f40630045d02e74fde22098ce4190dd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-b5f4180.3.tgz","fileCount":9,"unpackedSize":14893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdujkgCRA9TVsSAnZWagAAjAYP/3n99uUPC0Xi6m4kumRo\nYPbscr7fPeB6KpIFLNPS2YwVEn6Qi6fkUCIGaFHdMgfYq3bOYf7LFyMN4eEV\nPSNkh6TG7xFmnXkSLrE1y8IPmj5w8il1dvUf7CMqspDur9RCFFdZgKeSs4LM\neNGlU3Nr7fYiLo4lRWHFt6e1iHavtbw2DbXxDl18KYwzApYZoJvGGppuZ4Vc\nk+0zEl8uFvVDwN/3M7BCdGyPqwJQx+eAEbYFspTSvoOOll4F1lEra2kMXMD6\nUvDGOUHP5P9yiiUuLBub78RvhMq2OVpsED7bD5KI77zIezWdaEJDTlb8z6Xe\nRO71F43VrkRbUAxRsNsXtwezPXdVchApeUtvlnp5MKzJ2dnBhUqbCegTQR/q\na4v12og61Mt0XwL9EkX2fH2ifVuXj6OnkiuDrGgaoHE63AB2JLIN9Ku8pUG4\nQZ4Aw5KDdUfmjhlmlWkIQtKrShEGqa3qWraMVZs0WnixFNYZN+vIDQCyt9rO\nL1BqDNO+Z9+f6yGxcuw4Og9PPKjd+y4/Z3J1Iv8mPw241bDPDMo8KTKtLw7M\nDZ4rwkATEpLRGUNVdIU3yx4xSSeQYkzefy7JIoR4wdwWQClDujjci3u6FWoV\nk6m45yrZjA4jLGiZznlLBPDGYNVDsAv/WOYTSgCZvBP1y4koEkEJ77J9lMMj\nOb8w\r\n=tKit\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD56pYfRhHatTgDDF/F5jogALaAoA11XmoHw1iRYMAobQIhAMixYHH/Ui7FV13cdlVBW4re8LcWciB8S4efyq5eR1OU"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-b5f4180.3_1572485407608_0.9668652090182162"},"_hasShrinkwrap":false},"0.6.5-alpha-818e3d5.3":{"name":"graphql-toolkit","version":"0.6.5-alpha-818e3d5.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-818e3d5.3+818e3d5","@graphql-toolkit/common":"0.6.5-alpha-818e3d5.3+818e3d5","@graphql-toolkit/core":"0.6.5-alpha-818e3d5.3+818e3d5","@graphql-toolkit/file-loading":"0.6.5-alpha-818e3d5.3+818e3d5","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-818e3d5.3+818e3d5","@graphql-toolkit/json-file-loader":"0.6.5-alpha-818e3d5.3+818e3d5","@graphql-toolkit/schema-merging":"0.6.5-alpha-818e3d5.3+818e3d5","@graphql-toolkit/url-loader":"0.6.5-alpha-818e3d5.3+818e3d5"},"publishConfig":{"access":"public"},"gitHead":"818e3d5105cc5efe0e33aaacaf0229641cbbe6ee","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-818e3d5.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-lG66cjLpyjwqdDCRUgiTXsNMy8n008TWryHJgfv2ksi53UB0IP2eO8T996BJ+9Ukc20epZtBpoK2dCoY3J2oAg==","shasum":"3dc0d303c6759887119c61b41fa72f3201150dba","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-818e3d5.3.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdut9KCRA9TVsSAnZWagAADw4P/3Zfz+6rcDu4Smdv+YgM\n16SHcZ8ab0qH0lEH3zgQ2ey6UpbuI4VwZFCgvSTrmCh+eyxcSvZHGwwzUyZw\n4/VVKo5MHeyIK/PTqgqj9+6g8UObL+juyxPNcooqsfRl+Hb05XyxE2gDR1e+\nyFeiu7TC7dxYC9aFGrCyxDogJp6TCpYMbr1rFqoB4FK28tpjc3isugtGtnml\nV14ih9pupf6+hgZHw6lSH7QKPFZnExaNMtzwsB8760e+KtrqXltLAhqGSuGQ\n/BQGDgkMKo87noVL8wCVyvLdrNW296RuT6usQdsdeqf4EttUMcirqe+nXjen\nG+O1TI3P4/hFtdJGb01zD36Pnro1N4kLFFh3Loc/IXcUdb+g87LDDZFRsKgJ\n/5L8c7G42L0+romW8eXKAJL/4aCwylqoTWLibocN05afV0zWMAUgP9vD4pK6\nboQbAAFMK0VYIimVwdMl8KyJ5vy85kdz9osskBwqP3zIFYQAjFz5nhdG58kZ\niHOJp2oKIQGC8fros9XUUtE0uDV8kE8IRelMaBJ4VCOmKEXS56jVYz4LQw2f\nNf0CnGTzmMR076pKNkQuTBZkYYGmtIzjgS+zLtyfL8Kwk9iWYRfQYn88rjEc\n/woW5zuTf6HKD8dJ8Z5E0mnB/M4u25IGVPDzDBn23C7jqGxVh5urrcxA7erf\n4Iy1\r\n=0B7U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICtzOdqOpmi6IMG6C4CcdrODWAs77bRyScp/tkSVNxYyAiA8LfyXN1K9ejTP4tS8RokUMLwGRBQvrKXP4XYAyIRc1Q=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-818e3d5.3_1572527946364_0.4538142148529758"},"_hasShrinkwrap":false},"0.6.5-alpha-4e4c9c2.4":{"name":"graphql-toolkit","version":"0.6.5-alpha-4e4c9c2.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-4e4c9c2.4+4e4c9c2","@graphql-toolkit/common":"0.6.5-alpha-4e4c9c2.4+4e4c9c2","@graphql-toolkit/core":"0.6.5-alpha-4e4c9c2.4+4e4c9c2","@graphql-toolkit/file-loading":"0.6.5-alpha-4e4c9c2.4+4e4c9c2","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-4e4c9c2.4+4e4c9c2","@graphql-toolkit/json-file-loader":"0.6.5-alpha-4e4c9c2.4+4e4c9c2","@graphql-toolkit/schema-merging":"0.6.5-alpha-4e4c9c2.4+4e4c9c2","@graphql-toolkit/url-loader":"0.6.5-alpha-4e4c9c2.4+4e4c9c2"},"publishConfig":{"access":"public"},"gitHead":"4e4c9c27548e93bbc9dc1942907c210f66deebcd","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-4e4c9c2.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-dijTBoudgY+jrBCavAzi/7AhNvVNeTuM/wJLcE7Y6mBv5WiwMldTB4g6xFqbYZBpQ5C7k/T3uzyeLPUJg6LGQg==","shasum":"abf6bcdd5c664c419f1ceefeb576a0da192b0f8d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-4e4c9c2.4.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu2yACRA9TVsSAnZWagAA58IP/R7Ofx1pzLIXl+B0mFB0\nOXr+grswYSnnYD81847V0ds0UrC4jFx05FOkfoFQKS1IIRmwgsaTSMwwPRHP\nFBq7eBXvUck1tkDMUrb1547zIKaE09sW3r9IV5S9pdyuS7z5b1SB32ZfO8JL\nwUmB7rG9X/nodfP9SbV922wnU2SGMQx3ld/EUEDFjHsLntu8eMoE/oNKjSb9\nn4VR3wIBREkpST2ZpXC9Xx7gUYBfR9PCWUcrpUdLaWxMFKzMpW+4TJn2p5zN\na/EodYOsP8pcZ7QpunDwBfSmBjBYBbnm+1rfM8akX7D4LkYyVBMC1ICxcrU4\nS9Oa/tAybhfkT+WMC69asXjstgfphDy+g6vNMWllQ6bDj0Si49A+I8GeMvRc\nRajNod7U8UkaJaeQpj68FULe56bT9BDrlYbX2UM8HvZqaJi2dzko+0/ro7fO\n6Yjo8UXz+TmG2ySLnc/6Z2eHrBwLy++e2Hv0uH2JAn8sEBOYcIhJh6KFf/vp\nM/DI5gTT8GbNpTjieS1f2ogW8NUpbKCnUDBrr+44AM5qrALJ1fxIC6QJhMYP\nsCFTDyRmyVqVjMwjmTRwhOR8p8eBXKzOiuMo7uuAyLDHbRAkaUicMUFSQz5H\nQaDc72VtIJceIQ35yBfL0KtTXaOhIqRzvluAuARIHqZufSIqe89/fag8nYaa\njNQc\r\n=8vaI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFNdqVqxuEERsPGc5v/MPoX3lo4mz7er6+uRMRZEVe4oAiEAjJYTyC5uaLCCEMmU331uiK3hsR3pMfC8sJAngRs/LYU="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-4e4c9c2.4_1572564096380_0.4761487250621088"},"_hasShrinkwrap":false},"0.6.5-alpha-b454c32.5":{"name":"graphql-toolkit","version":"0.6.5-alpha-b454c32.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-b454c32.5+b454c32","@graphql-toolkit/common":"0.6.5-alpha-b454c32.5+b454c32","@graphql-toolkit/core":"0.6.5-alpha-b454c32.5+b454c32","@graphql-toolkit/file-loading":"0.6.5-alpha-b454c32.5+b454c32","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-b454c32.5+b454c32","@graphql-toolkit/json-file-loader":"0.6.5-alpha-b454c32.5+b454c32","@graphql-toolkit/schema-merging":"0.6.5-alpha-b454c32.5+b454c32","@graphql-toolkit/url-loader":"0.6.5-alpha-b454c32.5+b454c32"},"publishConfig":{"access":"public"},"gitHead":"b454c32c5f74e8df4d943d285bb5564288232f56","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-b454c32.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-4NsZ24c4hNarp1oExgfd1AqwU+lI50/RXQsH6AYehefuUK573yGdSI5vuFgkyNaLeIuM19Htuy0NB5u5KE9Img==","shasum":"f406f7b6b1886aee5fd7e44a6f09f30a30150284","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-b454c32.5.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu20GCRA9TVsSAnZWagAAEaAP/2EQPOdi0ga7z7PLyQ3c\nE6GZGdATpL2UYFm8pLo+ujIEVZJpdZtMwb2SbtUaWkaUYOx4CJnTpvot12a+\ncaIGUuIPjq5RRIP99Gtv+m/Uqi9ant9MuvdqqRWqZYl16g9fVAcvqxkiHgvV\nm7i2a/ln1EXtmC8R+jcut9VaDk79ul+mBvBh7JvDgb1yqf2peU0DoJKvAf/B\nEvMai5QL9tKZxWkWKQMqN1Y9skR/vMnRGOx1JZ7Of3JcA+YvXTDN2T3zKM7p\nuiFfhj5PuQg/bU/IMGReBg3vi65EK0XsnZoGIEbzcuYVIjllIxQ2gtJAdzaw\nALt/vf6s0lyE8NlBwl3WsucVGgTgDWj9xr5mNTBVg3d072t79uC0wKOH9D+p\nU2zeUh8H7BHdtlURzqBc24rCjEY0GrTjE053eEML1eAuHpm7u5w1B1DRN4EO\n5c1J75y7FWx/1DWWLkAjTtVQ2sCC6SGyQPzJ9zv8Rjia5OjQl56nyHUsJcsJ\nVik4uKjBPAG47nBDgLo6as0pgbEtsuPd9INdmU0QgFluhecoJrNia2G7viGp\ndiLR1yn+W7cMgZmZvXmOWwFF8cy2D0eHapYy+1CCnVsBjFKjwD6e1DGWNObg\nbyOF3Y18PgeqqmzP3ZiOYUwq8F2WHv3XzBpgMR34VZyektuWBxHFlDvj2QLp\nDdg2\r\n=Njvl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6YZ4zHWSufOWf8jtDBazINrIobcMn/vyXa1RUKGc/AAIgIG00216cNcUEo7llsgV1EgVhS1K3TWHvJklMnoT+4yg="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-b454c32.5_1572564229814_0.893240185829149"},"_hasShrinkwrap":false},"0.6.5-alpha-0dcf771.4":{"name":"graphql-toolkit","version":"0.6.5-alpha-0dcf771.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5-alpha-0dcf771.4+0dcf771","@graphql-toolkit/common":"0.6.5-alpha-0dcf771.4+0dcf771","@graphql-toolkit/core":"0.6.5-alpha-0dcf771.4+0dcf771","@graphql-toolkit/file-loading":"0.6.5-alpha-0dcf771.4+0dcf771","@graphql-toolkit/graphql-file-loader":"0.6.5-alpha-0dcf771.4+0dcf771","@graphql-toolkit/json-file-loader":"0.6.5-alpha-0dcf771.4+0dcf771","@graphql-toolkit/schema-merging":"0.6.5-alpha-0dcf771.4+0dcf771","@graphql-toolkit/url-loader":"0.6.5-alpha-0dcf771.4+0dcf771"},"publishConfig":{"access":"public"},"gitHead":"0dcf7712530f830e107cc89c43e3e17883b6bf86","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5-alpha-0dcf771.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-pS8noDbxXgFKp1GB0VuFpE2F0ldKJ/hAjlj1d/1ciJ/mC71c7i8Hq5Y47PMAa/icugdutTmes1+cYqzVAo4MsQ==","shasum":"999dad0e3a26d7d4e720ad5125d3613bee9b1a69","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5-alpha-0dcf771.4.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu232CRA9TVsSAnZWagAAT54P+QCJuisi+buYLBcOAbgO\nqCD1tpvbVRiA3UwPexfpRkOjl6RcBmXcf96bU6KqTi9PUmVAnPqw/uSASXBK\nfcnueuU4ZtCd6VtkMcnTInkfvce79r+2IrTLwh9bBApzDSILVcmOyrinV5hE\n9XQ2qhEdhxaDgReu6SueJO/SFwPfT3zOU2Vm5tLiUqVdEW9A+DoqS+SmThzz\niODJB2QIEVnpCIPUaABHE2+fC3Ui2YRveHwA3tXpsT+QtRD/IRV9FG6LDF7C\nE20S8dPUoMX5x29a3Cs8ejP05h51Sk3prRTU4M211QeJNITPf2RTISqyjpvn\nrzbR/X9nFwMiUuTO9ra8YGZFnODT/7+BDhW5Ph2sZRCgarDsVF6VZBw3G58C\nv2WvgSXh9y4UW90GPKRHVQ4gxGXqa59WWyDi/SCoA4hVDC20kllTK4/z4gS/\ndP9iIZA8dNLKWB6Ugzi5HZi8Y9gP3wIWN/Eqp2nnBtFTVCy31zfJ5S9qnp4v\nRyrqrQTv+LduL2rBScbnyOdaQK63yLvVP+aQN41yvqvVFJ65rivbM25dtG7o\nDopOn8Qbd1jWCXTrO+UROOinKVyn05gu8XvuN0Csngg3E7E/y2+AvvmFDTbr\nMkrj4lqr030A4loaE+npbdCxOy62Nz6oSp3pDZ6CQRBRz50IOlWzh6GF0xgO\nYguF\r\n=vS81\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSBzmJ0mEFdUkInWe85CstBV2AInhgIdhstoeodN6pMAiBgutd5OyjRwZ9FqX2f9XMZ/4OsgLY5PBbhaTi36BpSxw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5-alpha-0dcf771.4_1572564469737_0.6176734740421626"},"_hasShrinkwrap":false},"0.6.5":{"name":"graphql-toolkit","version":"0.6.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.5","@graphql-toolkit/common":"0.6.5","@graphql-toolkit/core":"0.6.5","@graphql-toolkit/file-loading":"0.6.5","@graphql-toolkit/graphql-file-loader":"0.6.5","@graphql-toolkit/json-file-loader":"0.6.5","@graphql-toolkit/schema-merging":"0.6.5","@graphql-toolkit/url-loader":"0.6.5"},"publishConfig":{"access":"public"},"gitHead":"d93b7a6241cc532aecabaf6a2030e60b8dffcb7c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.5","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.18.3/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-R91sX+uhmyxCRaUBopyP3khrhTPp0uoO4aj4mTMUgJwOY2j7sSqSL4wTOFMTg1G6th7wvK7786bs1M/PPtNJqg==","shasum":"71608312b2bffd448e85f0ff3d00cbc497272351","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.5.tgz","fileCount":8,"unpackedSize":10566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6WWCRA9TVsSAnZWagAAodkP/R1iOBC6H7eOWSHlTg2Z\n/9rG64lLZXZHyN7PBNDDn3aTK+uxyf9D4sRrbTMuQEVKcMc2s7Kstz1IxDYy\noDRMlBru87YSKHQhx6E91yWwXc3N9WrzISCmfAYBGX9UXovCDolFrcu5soz0\nbCQ5IAVIn3iwJfnDy3PothO2qOH89Quu6pGzDNjnG9zrLI393t5cdyvxvJkO\nlTNk5wfsyo0AKOTAINB0jdJLeZYHrkDCXOGrZ6GKMPoszUKS+mLEK8gQDtvx\n5JaoQY6KusRCi5Ojnk49unkdhUcJaHHF76YnsWdGhg8GEPP03KOW0xb6AvDX\ndYjIOZwa4HW1Bvkex4RsxuTxCh835d7m30mdWpc11zXgrPwXJ2GK7w+yt4ba\ndlw1YLaPoCRyr8RScIw+XV1q1l/PvWRGs4vyhGdWlEVQK8Jl3wTQ0JFQwgol\nWcZ1A34szo2JE9GQS/vgpSwt5TebTgiYZuTHvNWBcW1EZxACLNJiV9Zfm8Yn\n33Z9VR5nwvyhglzqHXIm6GX22ld2xOn+GD/wGPtHUEpw6K7YL2sTugSnXOxN\n3pJEESuFiIaNVTm9H1YCQgTG60/6V2bM65M1zO4nbr0tkVuLTU7EE8o2+8Pf\nsStx6OgqU7kWF7ZImxq8py5ndt2VVKcZcMtObqBqmNhWXgR7NtlC08OAIZrG\npNXM\r\n=DWQ8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfLaCGriQpH5ydlEo/CEev5IbShKY90nVd3c61yNS5RwIhAMndeFY/+xKMyQoFbZJApwI1SN6+11rlEmYsY8stHJD3"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.5_1572578710119_0.6625707657368611"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.6.6-alpha-d93b7a6.0":{"name":"graphql-toolkit","version":"0.6.6-alpha-d93b7a6.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-d93b7a6.0+d93b7a6","@graphql-toolkit/common":"0.6.6-alpha-d93b7a6.0+d93b7a6","@graphql-toolkit/core":"0.6.6-alpha-d93b7a6.0+d93b7a6","@graphql-toolkit/file-loading":"0.6.6-alpha-d93b7a6.0+d93b7a6","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-d93b7a6.0+d93b7a6","@graphql-toolkit/json-file-loader":"0.6.6-alpha-d93b7a6.0+d93b7a6","@graphql-toolkit/schema-merging":"0.6.6-alpha-d93b7a6.0+d93b7a6","@graphql-toolkit/url-loader":"0.6.6-alpha-d93b7a6.0+d93b7a6"},"publishConfig":{"access":"public"},"gitHead":"d93b7a6241cc532aecabaf6a2030e60b8dffcb7c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-d93b7a6.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-8iordIHwjcnZNqhYe/mmtqcEbiJck5w0YV/REwTee4eIzjssgnZbJpWCT29mtCCz2Gq3GEWDuzcDR8QjCxBEHg==","shasum":"367e2ad7bd948583d60b5576bcb469c472042731","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-d93b7a6.0.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu6ZeCRA9TVsSAnZWagAA/g8P/jLnjYrXOISlX0qacSbD\nb1V4L5JJ/JbWsOgS1JOzBaQ1BVCcQscGkcZHdYgeyCN2ujYJcEnqzUEL2204\nmuy2t6Vf4+zKd+QEn7Q0QW2hFI5bnsI0HGDQIbHqwUTauYrjtFqdxmx4GXG2\nMhN9/rY9+gnTqD6/MhTGCgmFsMSgY6e0Q6riwAKTYzdOBejNml3Na/92fTpK\n1UucOZW2HdpWimHhhihK2uKHgyavO8PkZAXRuU3CPHkkUZUwaB1SYyaGfZfe\nFcal/2EgPzSK0JC+T/Jajin9t2qDqaqzVT5iZaUXlWopAPE1HBNHSNsK4YdF\nk6lp0M43+UAc8As66qkM4uqI9gpsBqH6WwxFFaHVLsFi4fq0EDoP4qrzZO8U\nktNGCw8KaQn44rBWQgTRRaY9Y4Fj8jzOMHpTe7DI3SBpIWDz8a0+D3cCbRIi\n2x9nACMDGZKneze6KVCVzsiWVbq+nxH4TMJ8WPjheb7/4FXvlMG+/LWCxK5r\n1L4lsOzSmoT0aFyijd22IS01U35QaEGGaK9RSKDAFXuwy6K0nqN9hvNZdHR7\nHGW1WEP5sKjK0dZAQoG1VKeC532aIYAjm+InG/5Ehka6T4f1Ew094cj0LU5h\nYmwT6yXlaTL/cEMVkl18rhEH3VLXVw1IjUKu6ze4CyU3bdbAKeyYFqwITrtm\nO3vy\r\n=0hHq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVxBui2OzXZu6rdW4QseHZ8IHTbBel9PEWRAtvy14AWAiEAoRbFb4a931N9NDGhkwWhwu8dlhl+K749AYmOd7IdeiA="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-d93b7a6.0_1572578910352_0.7189145136683859"},"_hasShrinkwrap":false},"0.6.6-alpha-99c3442.0":{"name":"graphql-toolkit","version":"0.6.6-alpha-99c3442.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-99c3442.0+99c3442","@graphql-toolkit/common":"0.6.6-alpha-99c3442.0+99c3442","@graphql-toolkit/core":"0.6.6-alpha-99c3442.0+99c3442","@graphql-toolkit/file-loading":"0.6.6-alpha-99c3442.0+99c3442","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-99c3442.0+99c3442","@graphql-toolkit/json-file-loader":"0.6.6-alpha-99c3442.0+99c3442","@graphql-toolkit/schema-merging":"0.6.6-alpha-99c3442.0+99c3442","@graphql-toolkit/url-loader":"0.6.6-alpha-99c3442.0+99c3442"},"publishConfig":{"access":"public"},"gitHead":"99c344207f7a53a34fc4ea5965e94c369fc9236d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-99c3442.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-1LwvIz3spNTRUqYBYsc3eRIwb/enzMZLC59+VHvnmQYAsk8XRjRZ8uHKmb2Uhve3AuFlQe7PG6xDde+gmD4Vrg==","shasum":"5dbc42091637dde104249d45eb6174eb62d1111d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-99c3442.0.tgz","fileCount":9,"unpackedSize":14890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu8kcCRA9TVsSAnZWagAAzvUP/0yLD6zU9k7cM0bQ9lXp\nCduLhEOjOOjXh7EdMckp1pE5+32qwMmCWCmkMaF6mzZf4mQ/AJyTklcL/zmr\n/QzrHNXHFQJ2uqbOeh4KM8TvWG8h7ZXXQOR3uztlWyr+9YrmZgK0yFD8I4U8\nA7SyRz5jSHqvpZvZ9M+uAFmFT+ZCYJs2UGsGVpYWw8mgCm9EGTXRoFYYawSE\nKKMNDxKRrS/+xgeoTTrWt/vDJrZZBw1BWqWJF7jq+bolh4hZpQjTVMiGWsnH\nTrkDP21A4oCiGSeGGfvjXgDITYPgmK0FbXvLrTvLJXdDQmwHPWzCu2WC7aoa\nO3NRPB5gw2BGcn+/swFSOetFVjlPARrintEK+gACBNdEVx4uCSYvE4XtUNK/\nsrXKmoYDCtN6EdP/Q2ozFAtpnHf5sMVpZsyg1aEbh0k39mhftQfZh31SbYxM\na9GyPrxXHEIcShMg9+0wQ45Mgw6Ls6UAMYQ69NsrRIlbg08J1mk3kOkROAQD\nZ4gkg2X6XzZcDdD0vUdSpJQFgNbHRfEVf1yHbkjs83QqCM61Oh9JRFlaQgVJ\nXenrKGhi5VWJq2BHa1fwOoQ7h2VnRxAp3rNlAR27OzonltsJzDxVvo9aB0oY\ndLTp/DnXA2Y0teq3kxWZDHBBcx+YPCBSg2U6Zb9S9tJ5hFyInHaRHWoCuXb4\nwQbX\r\n=C0cB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2xDJj87Z9gL9PSuLxcg4FkQWZkjam4WuVV4fp2siWSAIgG+iepwHNR8xLSoZbC9oUphkM2avEjLUBO1J1SyAbN0A="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-99c3442.0_1572587804372_0.772491207713937"},"_hasShrinkwrap":false},"0.6.6":{"name":"graphql-toolkit","version":"0.6.6","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6","@graphql-toolkit/common":"0.6.6","@graphql-toolkit/core":"0.6.6","@graphql-toolkit/file-loading":"0.6.6","@graphql-toolkit/graphql-file-loader":"0.6.6","@graphql-toolkit/json-file-loader":"0.6.6","@graphql-toolkit/schema-merging":"0.6.6","@graphql-toolkit/url-loader":"0.6.6"},"publishConfig":{"access":"public"},"gitHead":"93d0ab1e4693b3417a98a53eb6dd14fd9a32cb28","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.18.3/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-o4uzDfaRaSZCWVo4kzqVGOt+P7vCt5vrTr77zwXmug05+2UeqAHsHqLb4uuTPyfp1Az28t171dcLdADlYeMYXQ==","shasum":"c5b7699a36f7bcc13729d393c0b9119b59fbbda2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6.tgz","fileCount":8,"unpackedSize":10566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9N0CRA9TVsSAnZWagAAtlAP/i6e3xfeTH5DQ/j5N2+X\nENdOxiJJVxGf7erE1lhv/jD7tdyDewBUivfGeLeANMZvlpPB6mTSrkLkwm6W\nKXYmzvhVD6jJvfG3MUjcsX0mfg8lDlQYIBMb87o0b7YvmSUtn5HYgK4gxMWm\nL4GBqttgDIOaI+tiBUfOyTZM7f4H2IWscU9JKY0ySzh3Z76of+LSC822guyY\nVBgio8Zlt59ZF7FGMwyORTC0/HN4ht6cGR7SvY71TGkn/STM2oB2lQJte8dn\nhPpCZvRV6TIEIbKBcHeTmwFLXJS1FxRCwYW53JNLuCp/SrSLcHjiNnhUwdu6\nETSzmVzJPwQZBfgxINg1zfYS9RrS9IdGz8EJOsix4sqSKhhoUjZBSYfl3KTt\nnpl3+OeKmmNDlIHrBTO5dvAOoP5nQ/IGcni9xRikuByS0uvZRYlVAFrI74fd\n5fZhfqvnn3VCOk8WE+I0ab564s+pUBYY4i9kaytQaU+qCJsJlksLVFo1/hsh\nGJCnVPBebXsyinyc9mY58vDQCYQ60NuVLN2rspsce/m3X3NGlotkXwWJQcHM\nJtVErR5VH0dv5V5FszFnG85T5EAVsrtI7u0BzwjhXjMp6I/A+WBOz4lUKk5m\ntjwTNQZfgiwemHqfmq9o3bVWr7rMfrME2az2mZFo8V2fbBhzcFMTyx2MHauL\nA+Tj\r\n=JYp0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8n/NmDzUHMzyMdL82uXETC7TJxWr+lksWHXH3JtgNMAIgOS4rWW334+gO4XpGyxcxDUH2nDx5m4qs3UOKu5L/SPA="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6_1572590452393_0.5765406093784973"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.6.6-alpha-2447d96.2":{"name":"graphql-toolkit","version":"0.6.6-alpha-2447d96.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-2447d96.2+2447d96","@graphql-toolkit/common":"0.6.6-alpha-2447d96.2+2447d96","@graphql-toolkit/core":"0.6.6-alpha-2447d96.2+2447d96","@graphql-toolkit/file-loading":"0.6.6-alpha-2447d96.2+2447d96","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-2447d96.2+2447d96","@graphql-toolkit/json-file-loader":"0.6.6-alpha-2447d96.2+2447d96","@graphql-toolkit/schema-merging":"0.6.6-alpha-2447d96.2+2447d96","@graphql-toolkit/url-loader":"0.6.6-alpha-2447d96.2+2447d96"},"publishConfig":{"access":"public"},"gitHead":"2447d96939c9502a6ae548405aab72cafb6d02ea","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-2447d96.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-O0G5j5ox+52cvzTLTAzYRSlkwdyMyWNmZPnH7xJr9aabbnIpDDXPLlj936Ow7T8oXpW7sggdjDXJC+zZewrATQ==","shasum":"565f14cfa75f97eb6c99fc2b0b8e6fa4162e1f16","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-2447d96.2.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdu9ZbCRA9TVsSAnZWagAA8ywP/1vr8FSlVeqNj3+2nomT\nLMduCia/71yeGkK3c/NAJzxVR1/ztlRSE5f+hWIQXe0tcpljWfK52nlZDGM/\nAl+ishvIDxtZM+verkC7mFaHih6CIIlVXQldNprlLL7FAdzs50vnQ1xXwWan\nUhVEHiDCOHklaZbCKKzMSvf5KJxL3rg0iqx8XNK7pvUMsPngPjxiEXoG1tdK\nbgHRwi9KuGY9WgOdfkwtofnFr91Q8wfQv4gQ+7s7ZdwBnxyGW+/EGNt6w8jZ\nam7hpSSiRz6mFJ7j+CXMf91aUbkkrXKe21gTMfMXxiGQy9FkYc/KspUOIgu/\ne9LS7NDu44GFc8Md4RfsckiTrNu57w7KM+tNEe05drIeTIwGkA8fLGJYi7/q\nPLd6laf6hg/Wcu/h5BsK2yIQF1Ovx0pSFjBv8JmAqzP7jsqifxLVcLS4sir2\nTE0b6MtAuCJLEuekV96685N05FeFkamGbMAvYeKcVXqH49qp3X/Gx3q2nqay\nunRXPK1hdMu4vi7D6OhMY21znEbtF9a16JsaIGNKJ7uPzXy80jV4UcUox+fr\naaKusXNKFNPanrqq+LdOguIZbrxXj7i/5/NvvOgQ3WMCzXFP55P9P4ycY5Eo\nfOlbcaUczD2mWQCkf11mRZWfe/NBX33G2R1S8fIU61DHRWEuQV2q6PURIKE6\nxvTc\r\n=2EoT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICGLEIwH03aaezaaBeAGqzC1ix+LjYosrkpbOlEH+629AiB+Pznrg1PdZxoPCRJ5A4rVm2RoL+bvQP2L37t2E/vRwA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-2447d96.2_1572591194866_0.9920289329073937"},"_hasShrinkwrap":false},"0.6.6-alpha-370de1c.4":{"name":"graphql-toolkit","version":"0.6.6-alpha-370de1c.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-370de1c.4+370de1c","@graphql-toolkit/common":"0.6.6-alpha-370de1c.4+370de1c","@graphql-toolkit/core":"0.6.6-alpha-370de1c.4+370de1c","@graphql-toolkit/file-loading":"0.6.6-alpha-370de1c.4+370de1c","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-370de1c.4+370de1c","@graphql-toolkit/json-file-loader":"0.6.6-alpha-370de1c.4+370de1c","@graphql-toolkit/schema-merging":"0.6.6-alpha-370de1c.4+370de1c","@graphql-toolkit/url-loader":"0.6.6-alpha-370de1c.4+370de1c"},"publishConfig":{"access":"public"},"gitHead":"370de1cdba50db5b7db1d4e6b91ac2f6bd88459a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-370de1c.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-GvdCM0u2n7yn8PaZ2cZzyVkzrIFzCeLBNzvWiLtM6tNUBA79eTPFCF/7Lx3KQVxrxFZJzR7d1VX2c5PIlPwf9A==","shasum":"da3283b28d2b0c046926755fef433b88d363c279","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-370de1c.4.tgz","fileCount":9,"unpackedSize":14889,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvFy/CRA9TVsSAnZWagAADxAP+wbCIoTcvOqmbL1z8COi\n4xeOmkdPJ0xZE0kiTmLOWymDrE0d7/zpKiFX5gm7tW315oEa14g69mpCF5nq\nNPKzKlxMRs+cRvYEyb2tYGSYrhzXjJwGhKt6j3S6AnostEPSl5CsIh9h6RzN\nTf+5b6Bx9S3PhUd67BhDrHa9sCM8gBUwcUQT2Wrf8XrNLn0PU7E9osxRaYQ2\nZDz10mkU9ReXrwAnlSrJI8DAienZoQsdXvcPjF7ttaB0cfRJ+oQCArQidSjQ\nDArLjROmi0Cx7xH2/fc/asQnpaK/8KAGcZ/bouYsleT8PpglWIRGnp8kPKwG\ndxmPlTDe9I0to1R7wEcsJgK8qXTJcAR5zx6DI9mPgYw3yfB5leazIYSAauYj\nHWO9BT0GKW1tblaDNSb6A19M3o0Mm4daqyzJncVYHmktaCh1W47rF2eyZ+rb\nZTgJKrHk0FBbyFNkQiLbiX8vzQ4sQgzNp7RIKxJY+xzWrk8jsCfhlo1E/6ps\nahg1f2+n6mTWtaQq3hhSFaNlV5XpqvE/zMhNdN7OCP5ZoNHATfYowRNBrVGW\nJlsmwo0siLIAbRWuGDArzE0NdoGStDdxR49a+Y5+9nKasWVwPt87uvMIC31x\nyGZpLSPO3ubXrQrRDlKu6C8pUr6okR6z1z2HEBz5y3pdIoRq2BliusnM7TlE\nQOal\r\n=ao8p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOsjAlLjmHLKq9DdGWCmzcPyElZPC5H4CVXyWg4oRdUAIhAKmiTPQlTxlKOoLyvVv0KUqcQRCdKiiEmnkJANjGIGkX"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-370de1c.4_1572625598834_0.6002798565650489"},"_hasShrinkwrap":false},"0.6.6-alpha-c6a5f66.4":{"name":"graphql-toolkit","version":"0.6.6-alpha-c6a5f66.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-c6a5f66.4+c6a5f66","@graphql-toolkit/common":"0.6.6-alpha-c6a5f66.4+c6a5f66","@graphql-toolkit/core":"0.6.6-alpha-c6a5f66.4+c6a5f66","@graphql-toolkit/file-loading":"0.6.6-alpha-c6a5f66.4+c6a5f66","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-c6a5f66.4+c6a5f66","@graphql-toolkit/json-file-loader":"0.6.6-alpha-c6a5f66.4+c6a5f66","@graphql-toolkit/schema-merging":"0.6.6-alpha-c6a5f66.4+c6a5f66","@graphql-toolkit/url-loader":"0.6.6-alpha-c6a5f66.4+c6a5f66"},"publishConfig":{"access":"public"},"gitHead":"c6a5f66d176dd2950eee68c06080573175fcf42f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-c6a5f66.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-t+eW16C/WNtTThFtz0pByvh2lMJ2+wUGz9Wbvf4FsUSDlO7hAuU957DXhMElkK4ySNnAPh1nZMBSFJp6udnI9Q==","shasum":"fc0e995d4a5fd56a5ca2e7ec40d620c19663e793","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-c6a5f66.4.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvFzNCRA9TVsSAnZWagAAOYsQAJDx70fGixUiCLLTvSZB\ntBiH8ff56D4Q14XjdOt6I3QsTGML4AiT9/8s8YAsYDvHig8IzVWlCNwYY/75\n/BnhxSUxAdLDPUMvhjlfPs2CSTYI28FgpnEucwizNHZLR4VLNIr7t5Ai365y\n2p1sbgpSVh776p10Me61kWJQ0ze+JpxRwN4KnCh8z8F0o4Wkd3oTWf3DOk8I\nYhlZ5YeGbiqitD69gWxvIBgPKEWv4EkWZpiMKjwBUqi8VR5IUrk5lRmf10QK\nfLWbMZrclMxJ3tqxhHmKKQL5VsNV/poVkCXFwJAqu7w1rd+DKmYB8tswqC1Z\nDTdwmJSkWwGeuGNjhNJOo3wHC8ry690LtXRadtTxtBtrU6r6LA14URgRLCwb\ny/6JVybkMryskg97hLPEIQr28B39SFpJbf0AuyDVTvIxI3Ojn+w5w0CBVAHw\ncixvVW86y8p0vb697VPTdYfkB77/+sxtoQX/dxCL4ik+oau3p2jqasgJkzvL\nzeRFWh/dy4Gqn/7FNSOtgHonOiysfCkveskqPOlDv+YY4lr0O04/93jEG/VG\nlyaRyfhp/hkIiaJDV12qIjGO6Q39Vx/ma+oeQwMk741+ywewq/uKxoGRkfFM\nKZvIMpZ6+/d6t+5QCJLIHQZH0FzqrN78u5mk1U65EFrOwXjDyFTvUlr9bXTw\nAm4z\r\n=f7fG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXLz+pGbnL1DpJSmRETgXn5Q4EJgDLu6ss29HAA6s9TwIhAPLejHQqBPxrb11neG+h9oGwvFLmdayiAcADBvg23AvL"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-c6a5f66.4_1572625613371_0.8867129015828288"},"_hasShrinkwrap":false},"0.6.6-alpha-368091e.4":{"name":"graphql-toolkit","version":"0.6.6-alpha-368091e.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-368091e.4+368091e","@graphql-toolkit/common":"0.6.6-alpha-368091e.4+368091e","@graphql-toolkit/core":"0.6.6-alpha-368091e.4+368091e","@graphql-toolkit/file-loading":"0.6.6-alpha-368091e.4+368091e","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-368091e.4+368091e","@graphql-toolkit/json-file-loader":"0.6.6-alpha-368091e.4+368091e","@graphql-toolkit/schema-merging":"0.6.6-alpha-368091e.4+368091e","@graphql-toolkit/url-loader":"0.6.6-alpha-368091e.4+368091e"},"publishConfig":{"access":"public"},"gitHead":"368091e31e4f1e24f39f55987c3991ae272bac34","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-368091e.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-TJknbrH826gJU+x4afmQWfv3HjO8OV5DSaM0gfJoe3XwtUJ4fhCO9JFC6/5ab0faCd9UsuYdGLFdhDoWK1ksmQ==","shasum":"45873d04f185f1a862f71c255d0df544d8b512a8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-368091e.4.tgz","fileCount":9,"unpackedSize":14890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvHLICRA9TVsSAnZWagAAfOkP/0kJnNdMDHiTpo54S18q\nAz3a0Oxt/KqkGko7Sj/hEz2WSIEoIzJJ/gBn2HhwYAo0NH+LFmQp6PqVbg7K\nFexUoPs8lVQ1bbIIUgrsfeD91Cnq++yIpPIcozGeGVkkRLvI5VA2LFhHawCP\nyaTn2w2Li+PiQuyIGP3jrLSik+Ags3Ac7LXu+h3Ze1CBeCuilWVIHx/WjS/4\naKm8T3BpL1+WS600AcikkXIgMI6pT/moJuwr5lJzlU4UgQjbbljR45h8pDxf\nMNtMuwabyr95PR72HO5BACPhwTRueGsswIC5yI1pFUGaw5fl8/QjPB5uh7Tb\nrlz9MvktuVh1NgSWyW6CqGVxUCZQLLVjsmfUDH+buGCV4FOhbGKJxITYoMaT\n29R+BRGyRZZ+5ERK0huYdWPmRUClwPYvkp/sJfyBuaVbdEt1i5ybaojWjYQi\nJcniOja0oZHw+CLrcRW0GnmGRsdjSH/6iRg3H3n/ad0wq/QJIH4e/ZaJPQas\n+ON8lTWWFqy60W4wl3IdOXVsg4J+7c+Zk7x8DLeh9/ur2OLl9WgMI+t+7O/M\nb1zTHqJZ6/8twcbMpsh0ZBqasm0IC4WqgvX7FpugfzhCWxC2m22CYIX4bdDy\nUdTl+xM5Y/vmu79pSKiNTF9GP84XY0532ASowvnmK3wmHJA/3t1yW5O3X04f\nIscO\r\n=akmR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDTun2Rj/kjF8zzCIXk1NJ+NqtC29iR5sZyQo1WHwKwLAiEA+0TTiQOGZ5l2zMepz01ZcrM5jZSn0wNnJGEPBDcSens="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-368091e.4_1572631239746_0.45577036703443685"},"_hasShrinkwrap":false},"0.6.6-alpha-509dd34.4":{"name":"graphql-toolkit","version":"0.6.6-alpha-509dd34.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-509dd34.4+509dd34","@graphql-toolkit/common":"0.6.6-alpha-509dd34.4+509dd34","@graphql-toolkit/core":"0.6.6-alpha-509dd34.4+509dd34","@graphql-toolkit/file-loading":"0.6.6-alpha-509dd34.4+509dd34","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-509dd34.4+509dd34","@graphql-toolkit/json-file-loader":"0.6.6-alpha-509dd34.4+509dd34","@graphql-toolkit/schema-merging":"0.6.6-alpha-509dd34.4+509dd34","@graphql-toolkit/url-loader":"0.6.6-alpha-509dd34.4+509dd34"},"publishConfig":{"access":"public"},"gitHead":"509dd349f2096eaba62b8eaa6d47790b12915cde","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-509dd34.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-oIRVXP5yXbGzDscm4gQ9LU22FQvAaNtqa5uM1AYtP/R4L6rWWBen8un6evZNxS0k6rgAqP6c6++I8hxreqWAOw==","shasum":"ade29f62f4303b549cb8c73423f13cf0b0e4afb8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-509dd34.4.tgz","fileCount":9,"unpackedSize":14893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvUWWCRA9TVsSAnZWagAAA1oQAIa4P1Z0WroSSJ0/eVRS\n3s3W6jY64HmZ4AO/G61NriRyKx63aK3Zi/+wyGlIgj63rVREUQgvnVaNC8CJ\n8Nn6sAVe9z2r5ilrMPVgrL9p/8Xhs+EVhaqrNGbwCm9d+Bw5Ec0Wx8ecMP0Z\napQRy/k+YrVbHS+FPnmjBdBvDREaJ0z55YbJuz6rhuLt39ybwqB89CtX44EK\nn1FiLP8CZmjpN4JTf2s6W3qmKOWcC5mpoF88HLzev6Ajq8PHdauyuz66j+ho\nJE/jtmqi3C8Hn1wCYm+/KMtCQKYvZ2Yyu7uUFwqbIJoRB5J9V6DhtjQ/ZABR\nVi9wD6GUFLRBpuJPTEkJ+URnXV5O1hhmUNDO8e8uvoNsrbW/snkKbDWNnuc3\nxXkjFEV/LkEct+tEzUARdz3f2C0RRaFZqF+grwFnr+72gBlRSdFOG/QE30FP\nc+1BQxPi2CkvIM0bYnQv/+KC9pK9Hbqc4B4mNXg8+AbV2ShjCOz9xtOvm1HS\nORFmQdaldRqTu1+rEd1QOg25WEp4IEM9Cr2NggxkFer7NdQpxe20ggLriLwF\nrqgS2v930ptg8NX7jecqmk4nsh76VztzzIf3advJMwPSJ4lJD3ct520xMhek\nGUoP4eU+T2I3Bo4HJxXWSI6NkIP1JzsHd8kFQR4jZGfNYe0vSZ6K4Wjyo/WO\n/Izl\r\n=4R2/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE4H8tKvPMvB/4njfdwpba28UWEqj3PuUSHz3/AbvXqFAiADGeTUZ9jUdOZltFoC8LT8/CKDU7E4fA+Y6MoBg6Awmw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-509dd34.4_1572685205884_0.41252368714999865"},"_hasShrinkwrap":false},"0.6.6-alpha-38ecd83.5":{"name":"graphql-toolkit","version":"0.6.6-alpha-38ecd83.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-38ecd83.5+38ecd83","@graphql-toolkit/common":"0.6.6-alpha-38ecd83.5+38ecd83","@graphql-toolkit/core":"0.6.6-alpha-38ecd83.5+38ecd83","@graphql-toolkit/file-loading":"0.6.6-alpha-38ecd83.5+38ecd83","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-38ecd83.5+38ecd83","@graphql-toolkit/json-file-loader":"0.6.6-alpha-38ecd83.5+38ecd83","@graphql-toolkit/schema-merging":"0.6.6-alpha-38ecd83.5+38ecd83","@graphql-toolkit/url-loader":"0.6.6-alpha-38ecd83.5+38ecd83"},"publishConfig":{"access":"public"},"gitHead":"38ecd8334d280911cf2b8f385e8e4dac65724ba5","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-38ecd83.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-ye1Oc7jqGqSKuWzCD10xQ/Gd9eFOdy+wUcY68d7bLZmKAbvxQRum0514/c9iWCRlZmlBUs1tMx7D9+SJH38VSQ==","shasum":"d4ce6a67945fae97ab6116292c0daf5a3ae1400f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-38ecd83.5.tgz","fileCount":9,"unpackedSize":14890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvUWtCRA9TVsSAnZWagAABu8P/A03CXM+MvZC6lQji3E5\ncwuCufPmOt2kbDtFfA5MxFvANhsNHWjxl3Ud95LJpXd9JUOxjWXHZEXZtuwT\nd8bHz3H99pLnYrM9ULeQu30Og72O7TP7F6p7cFPMUEHBOzhmK2x0qwRtllOn\nUnFLJclIT+hnwHy0hIpVNaJ7n/DJccJK9/oSicLsv7DiiJ7cQSJssySmVCl+\nN3O2UNAptKeDHB3dMZ/yyPLfGp38QkjAt4Y2upa0mfYdVEl0dv+vUnvySisL\ny2Fnqs89YL5dhbK6txKakJenvcRh4G9pIklh88xRoORiQ5a46v3fIdhOSoEP\nIm3HSnHWsxN52mxX6WWDHSl57JFUb/LlwCt/aWujwbW4eGJInYl66iQ5ZPb5\nceKT9wJ6gJBbh3Avs6EXLC/OkQik82+lbNsy8MWS+9S5nZwSbv8qXk3rV8Ah\nemUW8zy5iGzmDA9jGf1wmp7vjzC7TvBMYzih5s3TjpFhFT6c354nxIhbOfr+\nZSxq0Wr8ZZXK/f7HfiEgjlOuVzswRBZOmGdJfDvIIU0Dz0Xx7hGMH90AUymL\nLP9vzMZoHSmdQ48zaLGWTNrnCn4FQy0rfMqHEierqre0bMOpuiDXZBG5Y2AJ\n78laY2BEytnWqOZcZvSlHYIlrDgWuzRckqmYsACqk9yuu2Qcuq4hn0kMlAGH\nq1zg\r\n=/F52\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUM4JGZTfLgYsec8wTblTQAfkJZPnHxFeuDixPlJMcCQIhAKTzrbzKV5MAGMnMO+ISVtpNOfHROu30pScJxlGo6Fbj"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-38ecd83.5_1572685229268_0.04989379135562144"},"_hasShrinkwrap":false},"0.6.6-alpha-1babd3e.6":{"name":"graphql-toolkit","version":"0.6.6-alpha-1babd3e.6","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-1babd3e.6+1babd3e","@graphql-toolkit/common":"0.6.6-alpha-1babd3e.6+1babd3e","@graphql-toolkit/core":"0.6.6-alpha-1babd3e.6+1babd3e","@graphql-toolkit/file-loading":"0.6.6-alpha-1babd3e.6+1babd3e","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-1babd3e.6+1babd3e","@graphql-toolkit/json-file-loader":"0.6.6-alpha-1babd3e.6+1babd3e","@graphql-toolkit/schema-merging":"0.6.6-alpha-1babd3e.6+1babd3e","@graphql-toolkit/url-loader":"0.6.6-alpha-1babd3e.6+1babd3e"},"publishConfig":{"access":"public"},"gitHead":"1babd3ea08460d0d285eb029d93d0dad5fe61097","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-1babd3e.6","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-CqQIXtbZY/s18q8cXxLgGqbP+kOhcAgpfyQZYAXtgpIKHW7u4SDk1kdOOEDAEvnvcXY1h6CaJ+GL677dDv4EBg==","shasum":"5dd2cd19f5fb67745d419d9930e470f68c109a0a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-1babd3e.6.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvnUbCRA9TVsSAnZWagAARAMP/3nQOj6B1EMxtyUsQpvR\ny7Ky6CR2xmiwPi7XqHz3gFYpa88FSercc1nfSKVzfP+EGMRR+37mktmnGbt4\nrvb4rJwFeEdqhjyiBOvBq9y6pgpr0CzgnkJ173NrYIMeTMzSTu7w7uzEztlc\nAk0ki+ETjdjpyrnpomTtW2hD5m9eenE8ODPP8zceYj8uQAZqDmZDVi5Z73iV\nU5ynKTmwrOiL1ho5RoXtZaKBWP/REu1QmU9gTdz12J1erneMYqo7kxWS71fp\n44kOlLs+7Zc78ahQ/qJ9e2ojhtlYykRtGuGc7HU2mkKO61HhFoWsOEFuaYxI\nM+jI9I3xI5Nt/t8FnHL92TiEPZvHTAVsYreI3JBuzIV5pKiLLGSrdAxKN0U7\nlqO+wnJ7ecqZX5GMvn3Q30bz4KbhKP3igC2cwGwTcqFF7ichdVVYJcNqBWwq\nfhlnRUsTZQ9DB58Ww9y+OTDvPC3HHi/CjSOtGxsmsN4HgCclMYkC81A9lVEU\nYBAOFWxEKzM8m1Px7yZ7JTvWV/Yxh1Z+YP0z/emvLJ0ReAO1BasyDD9CEskT\nUxNuROTkTFBAlMmiNoivB4d9CrQQw65qhn5VGvLqktGk2evzTCCMGEs+w2Ab\nQJ5d79x22AYza/F4kbHH3246ZKGuSyheHbHSLmQa/ra4NGq5yyiet2lJeAaD\nfTzQ\r\n=ykqj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/Zs6wRdHiHfriPyyH0euKReT4xFrfzLrEvLPr0dDVXQIgEw+x8+N6oUvksboop4RftB+SwsI/4/MRrN+X2zmiFLg="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-1babd3e.6_1572762906637_0.2618399765182038"},"_hasShrinkwrap":false},"0.6.6-alpha-46e0b8a.6":{"name":"graphql-toolkit","version":"0.6.6-alpha-46e0b8a.6","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-46e0b8a.6+46e0b8a","@graphql-toolkit/common":"0.6.6-alpha-46e0b8a.6+46e0b8a","@graphql-toolkit/core":"0.6.6-alpha-46e0b8a.6+46e0b8a","@graphql-toolkit/file-loading":"0.6.6-alpha-46e0b8a.6+46e0b8a","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-46e0b8a.6+46e0b8a","@graphql-toolkit/json-file-loader":"0.6.6-alpha-46e0b8a.6+46e0b8a","@graphql-toolkit/schema-merging":"0.6.6-alpha-46e0b8a.6+46e0b8a","@graphql-toolkit/url-loader":"0.6.6-alpha-46e0b8a.6+46e0b8a"},"publishConfig":{"access":"public"},"gitHead":"46e0b8a70226958b384e77a352518742cb93f914","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-46e0b8a.6","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-nOxAPSLELsFWrxqYX99Nx1uiUick0ADpmdb+2VuzJJONoA72FAifcjKBvcxsUoa0K3p7fH079crJCV4LmU2qpw==","shasum":"df09e14d302ec7295f7f76218a7dd03b4462d0a4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-46e0b8a.6.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvqeACRA9TVsSAnZWagAAi24P/i6F/HvEYa5HBFk4by0I\nJYiCKQXQS9v2hEijxiS0j4S/nM+CD1Lg/qZYVE1gHFXWtQrlogKv5mLg/bXX\ngIh39oC5U5DPJkUzEVbqHH+JEtPhVjudmcttppUnBYEfDIGdqesmU+mrjOL5\nih9DgROLgvN3yg26qSHXWExcovlDhk+88ja4qcfgMTPmT4ndFIGsXW8XcnR0\ndQ9sopPPUFPVTjhIrydcuhBlHaBKIDA7eUwFoIRd+I2PBReMdycMIo+bDK5m\n2n8JqBdwc1/0+eMuGeB0dVfY+9w6IorxKLxf1U2cYMxWIdFl/134gUzGwHsi\nXbYpX0ZMtk0cHhaCA16ABkPI/3mnCdLDHiGmKJrAxIOpF8gn89XVg/C9xDXi\nvHEnMzF0XooUPxT1DfTSfBnyNR3qt98MS4o7oo50IJo/aeW9iG5VzmHEwWkC\njyTAy7SqWc2E9fog5h07VaXbGkADB7lldJIre2/r8PYdMuJDvH2tUH/hg/5B\nA5aOJXDvzjQvCbGLRxkhjnynzMGNlpj13Rscm8tYTRDIPjRDbkNKWKMviy5d\nl+iQ5qsTuxwnD6ojU8Y/CBaguPwG0rC5rqx4MjRwE3I+8NbHN7gQ9q9+dIlt\n4c4eFsv+WVWsBhq6UnZltXwJvpJ0QhcGuyRIqOLL3Exawfbz/KlwNa2CDC9X\nMmZ9\r\n=juql\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3huA94W0pn9WwwJ1mEO9sxXrLEzC+AJsGnsIQD4Dw6AIgWXv77sZ0JMSd8evxK6wJA3NpWmsKFsGMNVRce/AYMDI="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-46e0b8a.6_1572775808340_0.41167553115764965"},"_hasShrinkwrap":false},"0.6.6-alpha-e6acc23.7":{"name":"graphql-toolkit","version":"0.6.6-alpha-e6acc23.7","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-e6acc23.7+e6acc23","@graphql-toolkit/common":"0.6.6-alpha-e6acc23.7+e6acc23","@graphql-toolkit/core":"0.6.6-alpha-e6acc23.7+e6acc23","@graphql-toolkit/file-loading":"0.6.6-alpha-e6acc23.7+e6acc23","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-e6acc23.7+e6acc23","@graphql-toolkit/json-file-loader":"0.6.6-alpha-e6acc23.7+e6acc23","@graphql-toolkit/schema-merging":"0.6.6-alpha-e6acc23.7+e6acc23","@graphql-toolkit/url-loader":"0.6.6-alpha-e6acc23.7+e6acc23"},"publishConfig":{"access":"public"},"gitHead":"e6acc231db1b6ac1a11aec33a1ddf55f0f45337e","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-e6acc23.7","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-kbu2pjkTJsAoW2sdWshkzpeffV1O+LGUTA6J8QRi6wAJpWyKqxjFV5CmgudAAffGIuNrW5ihaOo6k2J5LUtAmQ==","shasum":"d8f060878101460cbba97ed181ff55905b91b3dd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-e6acc23.7.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdv4j1CRA9TVsSAnZWagAAsgkP/3B6wpOFHnpBDNGVUWsK\nsBvUbkGg8mhH5DEry12f+YEZ7DuzUwuHcdnXkYNE2yaj4XKyRhjRNpgo6qaU\nskQZowAR9qElXecEANw5+m77jIoc5zCNQZYc/w3uYIBdFi8hS4wlgXaV8RKk\nhs/vS2A1GFBfMXCYVi9NXU7sI9En1HBff1/xU2vWcbpHnFJsFeuVDFv7YZGU\nFtLSa1TET7Yg6EeEk3j0Xx0/MhYHXEhKPAGzK/FklUzz+evk0JwHJOb4cayx\nB/T+b7Ohfh+Hq4/d0tV8hX+CEvMlbmmKUn4LyK4NKAhFPu+xiD8fj5eiYoBP\n5jb4HWRKwXvs89vVpe7Z6gqnEWU1QaJy3fKPz/flnO486AtrEXrc+TCUBB/K\nCsQjJKY6j4jn9gePNE4sQpF+OT8+uOCF71/SHVg4WOXTYtDA4bPWtweh95Co\n4lRIZbVQRgHKMp7vojgUpIlaojY8B4vEFjymkjmvFNXWJmTMOz9tzKZGEWpW\n1Ff5uojgM1ASUta79hx9FpHS49aw9vdP/q1h28hmGMjMSwtNZXfdEfpDKEK4\nOcnEsY0gi/3BITlI5LYD308yHJXWjGwCRMx9qnOJA37JmQj3XZyXTfdJJ7Q3\nuiEFySOiL7U8Mo31Xz9XiCLUbNYt5FNXbDw2m/hqGG8U+xJKI1iVN/ele81P\n4bLB\r\n=uPn3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHMClnFnc6hFLMtoaEQqE7EaJhy6gFbNuZ0tnlRT7mUQAiEA8Sk7fOXi9AfPZpjNpLcUvT49gKAu0LXUf7mPkV8nG/0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-e6acc23.7_1572833525390_0.9818347569882133"},"_hasShrinkwrap":false},"0.6.6-alpha-fb57c4b.8":{"name":"graphql-toolkit","version":"0.6.6-alpha-fb57c4b.8","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-fb57c4b.8+fb57c4b","@graphql-toolkit/common":"0.6.6-alpha-fb57c4b.8+fb57c4b","@graphql-toolkit/core":"0.6.6-alpha-fb57c4b.8+fb57c4b","@graphql-toolkit/file-loading":"0.6.6-alpha-fb57c4b.8+fb57c4b","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-fb57c4b.8+fb57c4b","@graphql-toolkit/json-file-loader":"0.6.6-alpha-fb57c4b.8+fb57c4b","@graphql-toolkit/schema-merging":"0.6.6-alpha-fb57c4b.8+fb57c4b","@graphql-toolkit/url-loader":"0.6.6-alpha-fb57c4b.8+fb57c4b"},"publishConfig":{"access":"public"},"gitHead":"fb57c4bbba05b5d7ca1a82f183e2af4e27f08d64","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-fb57c4b.8","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-C0NIMMqCgubMjkNZUdx5tEYAedOYLrlPimRN1VDryx/g+mSQ4WdPUn52sMQXTX7u1Ts/cbAQvQBRJyGrDwZ1tg==","shasum":"eac63cfff6c5f2ceaf38d6587a4313eafc9e249d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-fb57c4b.8.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwACxCRA9TVsSAnZWagAAg0oP/AoZAGZszDwnxhYA+4zd\n1l9psAUEOMqKs3ID/TGfUUEPISFGT4HHpfG8mm9WmyGBaXNOUwhFLT/VPFed\nmF52gVODgZSj0s97rBzJ2qLSaDwgxBqwfOKnmUVyew/Y+Bw4Pkoxo/CPNqtw\ncXZK7/KTYpSi+P/gedfI6aN0YBIpC66m1ZqkcGCy5SDf6mMHJhfGvyrSvvlV\n0PN4nPJVNqG94/UgdBII1S7nMbdtV4E6/7vO9kNx+VMzn+UzWPdxIsBdJCvQ\nBTe/zzR9rR+qh2lfA/kE4BiaxoGUuZs0x07h3hKy+3YaZuHat3wnNXHRsy+S\nnxN8SxuL/UdwuBaosoBjqiI6cvHd/4E8Bk+QLUDMZfpmbWTg5ekFIyox2p90\nrbkAFQsO/RyASmkjPtpchmtHO/Y0t6IHODR2tYG9ZtedufPjW/wzbh4d4TGT\n2GN44BQVZX5x0MVcWKoNQrCk6N9Cd/99M5gs+GNOgk695twU2DeJxQtQ5plE\n5eRAmyzXbltBCrm5EYEiyP5vAgEhDMH1MVUYRLK5Cnod7ictQc2hay52zqmi\nadohCskbtnko9v1B//szSPPRKxTxWyKUZ5hNb4DbmCfDEUUX765kOATMjKZO\nSn79HWCkEjgtjRW36OoSZ1gU7GcJw4cnn2XU+0mKvThAAucu26G7DUCqpf50\nKMIO\r\n=LbPg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnrteF49fU5YTVLyGD+fU2fdCanDCaqmYigikm91dbDgIgFlpmLotjRJc6kQbZBoqAn9K0z97CC9LWFEu+qbwo6TY="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-fb57c4b.8_1572864177182_0.8138344174518515"},"_hasShrinkwrap":false},"0.6.7":{"name":"graphql-toolkit","version":"0.6.7","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.7","@graphql-toolkit/common":"0.6.7","@graphql-toolkit/core":"0.6.7","@graphql-toolkit/file-loading":"0.6.7","@graphql-toolkit/graphql-file-loader":"0.6.7","@graphql-toolkit/json-file-loader":"0.6.7","@graphql-toolkit/schema-merging":"0.6.7","@graphql-toolkit/url-loader":"0.6.7"},"publishConfig":{"access":"public"},"gitHead":"307f72f2ec0382ce1fa172492da0bc6f6794c58f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.7","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.18.3/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-CWrmwGeHFRnYwnxuEiviGCkffvF2gBw5euMo7qMIjRLfKIdM0KsGP8ACsNNi9sY21+iRmUxR+Qem1VKENcxMpw==","shasum":"a49a3a1696869203cf3c540836de48167132b491","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.7.tgz","fileCount":8,"unpackedSize":10566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwRHdCRA9TVsSAnZWagAABGEP/RPE6Q+UtvZ7xME73reL\nAvua7ZFV1oHO5xBgQkjgI2ZMe79yqmjvRkmgRzXX9/EoFNrSf/4OkNGli1d2\nDzUxQcPfY4cuY7E+39rBAayqmJkLcvjRiv/pmYJ8/1h0NQMGkbnBGEd5RCqY\noiEJRHIhlJe3IE/RvrmUThiHI/foJtD60qtD3rA79hWNNwXQf28xNq2gklec\nFWNJkU40bAyyl+9SuRqBuW8cIy0jnh411DtPVuPgYiwb8ipf1kxMCy0tjL+V\nmvBPBIHFSGj+RAVyngQhSD4BwwCeyH48ggnnHUSLL0cqQauOYqrWKwJ0amBw\naqzxozKRvXHT8pnZ0bHVV6dyh5M0Ds+CEOVje6rZZimuZTz0v5cK11j9ZJFd\nfQQUXDmGhJDKSmYcq2pbNVaiXJd2XcjRgBphKChmwexgWh7XAp9powqxw0UF\n2hPjL59D4p2JCl6pkb6F+9WDC0MtwLMk9LHl3fqjseRBxjqG/8zhWyTJY5qg\n984xD0oHYdQOuewfzH4tIGzFGcgH1Cj3klMqSVuWQiaUeDVGvqxw7r6wAK/V\nbVxkBTR1rd2P0wpm6erbGW/NYxfnaAteXkDy/i9oAl+ocdhFGQ9bVt1pih5b\nrgjrPnQ7CDxJozWrIHQ4muZ+a4ctBL6sT6Hofiw3jC6RS5JUfCxZ7WlsKVBm\nX8si\r\n=IySA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcDLQC4a/2Y45dPcaqXcWz9xYtwnuY77tuOe2Opt6GJAIhAOXwdzH+NzzAJw5XYsXgBnNBt1CuOdr/eonq6OUxggwv"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.7_1572934109291_0.9239330545931195"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.6.6-alpha-0ac8bb6.8":{"name":"graphql-toolkit","version":"0.6.6-alpha-0ac8bb6.8","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.6-alpha-0ac8bb6.8+0ac8bb6","@graphql-toolkit/common":"0.6.6-alpha-0ac8bb6.8+0ac8bb6","@graphql-toolkit/core":"0.6.6-alpha-0ac8bb6.8+0ac8bb6","@graphql-toolkit/file-loading":"0.6.6-alpha-0ac8bb6.8+0ac8bb6","@graphql-toolkit/graphql-file-loader":"0.6.6-alpha-0ac8bb6.8+0ac8bb6","@graphql-toolkit/json-file-loader":"0.6.6-alpha-0ac8bb6.8+0ac8bb6","@graphql-toolkit/schema-merging":"0.6.6-alpha-0ac8bb6.8+0ac8bb6","@graphql-toolkit/url-loader":"0.6.6-alpha-0ac8bb6.8+0ac8bb6"},"publishConfig":{"access":"public"},"gitHead":"0ac8bb69f2f8c6d0f54125baf903ab89768bbde0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.6-alpha-0ac8bb6.8","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-qLLimy4QPCjodFcYLbN4jMt9vttGlxuYXwPMms/qwnGdnv2iipwBM2iEUoliW2EYFR6+t/VPZZ98oqf+38LgYQ==","shasum":"ee89ff293028112bdeed02b3b28fb5d2f2202840","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.6-alpha-0ac8bb6.8.tgz","fileCount":9,"unpackedSize":14890,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwRIoCRA9TVsSAnZWagAAJ7QP/00meAVfwYFSuel94nh0\n/mK7HTotUPyLs1+eGEx0p/HyKPS7+WcwQea1LmE2TU/9SkZQPh4G3QZ6vgu2\ntNTFMCDhjmIbs33IwHJjczdDVaLpsCnDrcQ53FDOVPZawzhN/aNrTopp7CfE\nMCmcB4uXcRClxNK8OpMfdk3/dgn8nOD/F6CGREtv2dGiB3U9SM+97WsLCSCm\nz/Wth5tVh+uKPLdS5v/mn/5U7mILxonmo0eS2e5D6bRs7fBrLGlB3q6IsDy/\n5uCcKWOq6Pqg5bQWZOHb59fcARhLyrF4iudXEx4TjGvLGl6FckAJmj4YMHxV\nMIMvMoGWtrr9i51Q36QqnlIYVkOS1rbBzxweD/O9fS+gmK8xKIJkg4KelffP\n1gv8eR41Bi7eeicOWO+gx2JIwiiqhd6hRfInm1b555FkSlKl5NJI4yhso5Ly\nvZisAu88l8f1EMOFLLTZyIj6iSPgs0nbQGJXAbZpgwvpjRuEuxItSoLcNYte\nuF1SqmUU1s8USWwvgIdTP+BTaet7ZVP/Qgpv5Uecso25TiGI2g9pIBu752S1\nDQyIm0+HuHXcYc1/bUCseLg7qVBn5pHI/jXSOs2nt0ABL1STg57Ustj+Lvua\n4RAmrrr4AXmZBHWDfsXbFPHmvnkH7YEUC1ZARsLHg8EZYVdeI9tdqYVro6Os\nGOZt\r\n=aOxe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHD158xGoHBWadJaUci18gIGa20leyixGqVnlZ52D17WAiAxryLQdsYe6rllvNXkUB+Wv1NlI2S4GuypI25CiKC1yA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.6-alpha-0ac8bb6.8_1572934183936_0.5807174894985463"},"_hasShrinkwrap":false},"0.6.8-alpha-307f72f.0":{"name":"graphql-toolkit","version":"0.6.8-alpha-307f72f.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-307f72f.0+307f72f","@graphql-toolkit/common":"0.6.8-alpha-307f72f.0+307f72f","@graphql-toolkit/core":"0.6.8-alpha-307f72f.0+307f72f","@graphql-toolkit/file-loading":"0.6.8-alpha-307f72f.0+307f72f","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-307f72f.0+307f72f","@graphql-toolkit/json-file-loader":"0.6.8-alpha-307f72f.0+307f72f","@graphql-toolkit/schema-merging":"0.6.8-alpha-307f72f.0+307f72f","@graphql-toolkit/url-loader":"0.6.8-alpha-307f72f.0+307f72f"},"publishConfig":{"access":"public"},"gitHead":"307f72f2ec0382ce1fa172492da0bc6f6794c58f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-307f72f.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-+kn+5c6K7U8p4yLYBpVt5TavANxG0yxwq+GpCN/XzbLz0RhWBJ9TM6okq7iVh+MKKLYs8WSnlFGpoEB0IuZgaQ==","shasum":"36f6b5bcf55bd509c62e0f25afae903366fb89cd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-307f72f.0.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwRKYCRA9TVsSAnZWagAA5IAP/0meDAhMj3xh31q+vWLV\nYfL+j9LctpM8Id9Az8Wpj/4HuDjSJcWzqKccD2ed9/NJ/n3GJs4o996rOX+V\nxaNuFTIY2g7Lo9ITWKm8lb7Iy9yIk54Mo+eT1moU9kRC1E0hgr6ibjJ4Nf8w\nXRUozJ3QUywKlcw017WIvivhtZGFiYry+m55pdz2IgKlrprMGq68hiLVkTsE\n3QpCdLry27GQvQKayw8uZPxpqhNiIgBbW7zlNek1vuJqD0keebXYxZC5sf7z\nFp/JruGr8LAYIyCQeWc14mkrVO2NcubCE1SoGDbxR2mGsrQA0BbZSjAVfl+w\ndY/Ez3dCrqkb6P6677NBTGBVyOp/gd0nkzi6362usl/F+pW33j8mjULbqz70\ntCwO4eOBBBg9KdwFIx1XjkXXd+iIFan6fJ5uRXQ123UUhASpixYnLlvoVO/O\nMzozhFHHj/q40J1AdXErja13vffGgSXBbv1PX4qehasCLLYhkQPHzRY9zowz\nGD4LcM1tpJhpyGfD8qc+QaGtPBX8HQkSH2G6r2k5hCSo9IC2dKXTyejJUpkS\nSNw1Oso0Zk+1b6fTM6oQUwiZvCBacNWuDol9Bb4OHYO29ujbBUbfzCJniA29\nSIHDB2j6nM0OY23Ku6d6o9AYMN6FPM/8Iju7/7f4WgDiGWUNpEBhY6ZRkwg2\nqPob\r\n=dsN8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEbNXO4Psnxuo+9EATBYzX9jurErgF6xc8mPV5fS3XTHAiBEER3M52KoM2z8+fcV1n/6cKyQP/bKjNREgNhSNAb3gQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-307f72f.0_1572934296285_0.20570331596252034"},"_hasShrinkwrap":false},"0.6.8-alpha-45cc0ae.0":{"name":"graphql-toolkit","version":"0.6.8-alpha-45cc0ae.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-45cc0ae.0+45cc0ae","@graphql-toolkit/common":"0.6.8-alpha-45cc0ae.0+45cc0ae","@graphql-toolkit/core":"0.6.8-alpha-45cc0ae.0+45cc0ae","@graphql-toolkit/file-loading":"0.6.8-alpha-45cc0ae.0+45cc0ae","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-45cc0ae.0+45cc0ae","@graphql-toolkit/json-file-loader":"0.6.8-alpha-45cc0ae.0+45cc0ae","@graphql-toolkit/schema-merging":"0.6.8-alpha-45cc0ae.0+45cc0ae","@graphql-toolkit/url-loader":"0.6.8-alpha-45cc0ae.0+45cc0ae"},"publishConfig":{"access":"public"},"gitHead":"45cc0aecae2ebe50bb40cc275ea98549634b2355","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-45cc0ae.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-/D5h07QCwFMLLX1kqkN3gXEkGaGEZ6INN3ON709adCISsS/DM7wY519ZnOfEktfWAcSIJEZS6YdEZsiJU42lUA==","shasum":"4bc320ffff102ab333fadcae1ceddf9122e68d84","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-45cc0ae.0.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwaPnCRA9TVsSAnZWagAASFAP/2Y/MmUn3fbFVk/FiX2X\nHO/Hi66lHUXLazhSf8SaMPQjCJu3+AXRd6qwlY9rufO+RskV1CuzO9fdq3la\njMIL/patvdnFUQJUi5CEzPt+YO4M9a3PCIjDtelQRn8uDq9QNBsjzGHxG88X\niGbW0NUdNWZzeAnuXBctajW4+LXma7KjCew9lU9qdFHFe8mlJ9cupEXtWHc/\nf5+qRPMaqjOT7oJrhY2qia3KbMzQbdKjhU+lksMnpxGTsOUvaXnTx3qbUjix\n+CygKpoIURQH25ItcQuJI+3c+9JnhIIAcIqHqWb2cH6qmUWs3dreUgq7qF19\npjWr8niQ544LvId7ll6D2sOQQkj+6YJDwuyP72Vs54t+u7nfvsIHHC9Y+dTH\nnX5BDLy8be6rHqef0T0yOE59lC5WQ1qhZC1NAQBcZXkrkQItAEvnT3M4Ce+9\nthPqC7Rz2vZBYWVbFYlwZS7dYxdPcLLcAAaBJU7l+9RAIS+OzJN9qXMnj1lY\na/WGY9nMGuNlgv5xWnizM7QAQhiVyl4tmFQifmWDJJlRYzeAvmpu5aV1HT3o\n7vxqL5+SvQnsi47On3gtIkPkGI36NJho8WDrzG65JNxB42bTGs8qerWQJKCs\n3PQlfs3pafZDC6T5rg3293i2nqpOx3nJ5l7RPqNwcin7h4/JbwPO4iYPX334\njwIu\r\n=ES0U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPhQSK3AR6Ur5P43xbW/8t63kz9pQESg0tEVCY64tgDgIgQNxR3MNOVwx5Xwd70BMtdc1dvPg5NIdmf4Wf3SaRKGE="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-45cc0ae.0_1572971495064_0.5834897049290315"},"_hasShrinkwrap":false},"0.6.8-alpha-ffaed82.0":{"name":"graphql-toolkit","version":"0.6.8-alpha-ffaed82.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-ffaed82.0+ffaed82","@graphql-toolkit/common":"0.6.8-alpha-ffaed82.0+ffaed82","@graphql-toolkit/core":"0.6.8-alpha-ffaed82.0+ffaed82","@graphql-toolkit/file-loading":"0.6.8-alpha-ffaed82.0+ffaed82","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-ffaed82.0+ffaed82","@graphql-toolkit/json-file-loader":"0.6.8-alpha-ffaed82.0+ffaed82","@graphql-toolkit/schema-merging":"0.6.8-alpha-ffaed82.0+ffaed82","@graphql-toolkit/url-loader":"0.6.8-alpha-ffaed82.0+ffaed82"},"publishConfig":{"access":"public"},"gitHead":"ffaed82b6bc78c9abb8a6897f27bc969d929b547","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-ffaed82.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-BOWtIPRl1vMBhAuC8p/+AJ23eRe5J7nOH3C5KLTRV1vmVNxIVxpX8Qn9318JU7iKAumPSkTiXUO+r2omwPgI2A==","shasum":"828cb564a74dcacfec452359347ae2a70026300e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-ffaed82.0.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwa+TCRA9TVsSAnZWagAA9qYP+wRsMF20vq+Ip2fRTzzb\nsbv2CAUv8M5LEfxVnU1d1uVsK+ROl0Ne47rh+62upPnZIb06gKCY/mFoXtmJ\nce4b25o3upKsgfbqjg6z5VaNmRe7D9SJLs05PFDMCdeBrg3tMchtcRnSOysk\n9uxO9Yg5DklEfhI9HhPQ8aGrSPLrnwIrk1Gi8t1BryIDK+KwNDUN0wrRqxKJ\nV7SYDWDLT3cpBItZ59/Ot5hIQV6diwDtoCYE8NuWyy/by6LOiKthq+JW1FWI\n7IR+utcw2DH1JwAqpV5j0KQ9WcwTi8hL2H94f5Jn/jmxBGxBUf/hi3mZzXgD\nNfA5OiVQlW8AXxVV9cClszLiegpE4QoHOW+chsIboTUz8bqT/pUFTyyx7GL2\n88WcMaQBlr4CgpiAE7Ryn9g050smkVXCE2V/SqyM2AWUKJghAV+E8RGdGfrr\nwULNxfSSOwQNiLA2VclYfHv2FReAlzyvXwn69Zzt0bpmvKUnfuLuQMGWFwT/\n33AN5f3yBaIggbutxFydGTcdvh1JNOFHweR2Ljn5aBq5KHEleX2nQQI59gwe\nUZxP9Bp75B4RB9f3WhTiP2ECHPiayg9z8ibGpztj66Oh9huqcgCNRX6PMi2U\nYeksohkK+ao6GaaOVWWeSe9gn+HTHR2iXuxMTQrW5I3+1tpgFb95/6bMMDU2\nzGS8\r\n=ZpsS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHavHDiDIPQmuCeAUHtcrAWkROEGJpkbJYAD8t9eL1QzAiA3/bHPNfCocIIs7Kxgn3dUeYZbjVAPJ+u8W+3PPGHCZA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-ffaed82.0_1572974482756_0.3907004455572618"},"_hasShrinkwrap":false},"0.6.8-alpha-0aec269.1":{"name":"graphql-toolkit","version":"0.6.8-alpha-0aec269.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-0aec269.1+0aec269","@graphql-toolkit/common":"0.6.8-alpha-0aec269.1+0aec269","@graphql-toolkit/core":"0.6.8-alpha-0aec269.1+0aec269","@graphql-toolkit/file-loading":"0.6.8-alpha-0aec269.1+0aec269","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-0aec269.1+0aec269","@graphql-toolkit/json-file-loader":"0.6.8-alpha-0aec269.1+0aec269","@graphql-toolkit/schema-merging":"0.6.8-alpha-0aec269.1+0aec269","@graphql-toolkit/url-loader":"0.6.8-alpha-0aec269.1+0aec269"},"publishConfig":{"access":"public"},"gitHead":"0aec269a77e1dd82cfaa778f92766ec79f019717","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-0aec269.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-0QZYgSDAjaULw288W2dUXr0qi31tMnlt+/280po6vEAWBP1E4WtkhFpFK8KE81tCzL/cCgH38RiF1Os1kEECsg==","shasum":"11c52dda665fbde3951351af3f166b7510fe0fbc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-0aec269.1.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwa+9CRA9TVsSAnZWagAA1K0P+wYQYEZiCfUX79iflaYF\nbC2kKIwMAdb0EMvmvtHh9Mcoe4lph/SDzTxZDqDsw9WHVQUoPlKqOQ/jbV85\n/HOUWYh1s8V4+PVNwq90Dca7Hb5vA9zOuOid8/qaj6T5zOHz74Ur3/XOelId\nYFoorO3qXmpYWz8E8TrjnZ3EgFKPJhcHJWZxoAdP3r83VZUVFkVmn+Mmpowk\nhZ/FQJ17yOZ6l6X+NXhE9jZHtYk5eKjXosIJgHxGKLIEreA3G/hJIEX981iU\nUHmJrhIdTffecvM+2b2iiBte4GIvvtVdR++pdsJ1oKB+/eeQ0tYT6GUSLJsp\nanreL/KSiEqHfoqyLLkpiQar+603Am+hx4voha2nOnlgAVEltERHEPWuYGpD\nuqHPVRq1zX0r/wzX8M2iT9cbjH3bW46rmVNyr4Axdi7uunkvu0TaQJw0K+KK\naPkuIjUaoDEkHD9WjOb1w1ekUnI2SxknAFMr7x5LVEIaLkctTgNrvR+2W1wD\nmPxMLN/hwwgRwUHndug5d4FbWMAryz/c5i5euPvrhN9Le1qs61TXY+BOi0AL\nPeWhmVcn7+gyGpJDur+Y0kKPcsrvDOhEbTONE3MFCvWMXN2ZxFirj+lgdEKA\nVx9V1JChFDsUPiiDENljSNBASVfVnjwfWhmPaSz02lsbtQjgtOwpvJ+UbJVs\nMML/\r\n=ZmcP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBp2H1Msxo74OVk5G7JhamjXNwUKkxY2xzChtgWyMf5bAiEA45D3/gOX5pdrbLvJaav89+sgF2EnxoyeyYyG+3igAGA="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-0aec269.1_1572974525477_0.46176941037828567"},"_hasShrinkwrap":false},"0.6.8-alpha-e3bc204.2":{"name":"graphql-toolkit","version":"0.6.8-alpha-e3bc204.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-e3bc204.2+e3bc204","@graphql-toolkit/common":"0.6.8-alpha-e3bc204.2+e3bc204","@graphql-toolkit/core":"0.6.8-alpha-e3bc204.2+e3bc204","@graphql-toolkit/file-loading":"0.6.8-alpha-e3bc204.2+e3bc204","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-e3bc204.2+e3bc204","@graphql-toolkit/json-file-loader":"0.6.8-alpha-e3bc204.2+e3bc204","@graphql-toolkit/schema-merging":"0.6.8-alpha-e3bc204.2+e3bc204","@graphql-toolkit/url-loader":"0.6.8-alpha-e3bc204.2+e3bc204"},"publishConfig":{"access":"public"},"gitHead":"e3bc20463e0959d7acc7658a3e42bd04c68dd25b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-e3bc204.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-fVfyfidoUn5lhBgQIq1TvEIdBJF0fZLQvegfqMff0h7G0ZHgflqrbd201arvhgIwZq27JOh8JGictVnsY3hCIA==","shasum":"21f6d4493a4ce73d157e3c74792b104df615d203","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-e3bc204.2.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwbw2CRA9TVsSAnZWagAAMbMP/0f1kO4lqlbD8ncxxXS8\nVMBB9epHqDWkXU4zqr1+y8wDCt70JUOojfVcQ9KK6eFRQIdTphTQ7vMfa2Gl\nanVkmYKZdcX9WpaYkqth9O+FEsxbvPdY0wRXcW13QtcDBouckGC5SuC3UiGU\nb1hlFjo9YWMzEmAqLvwNbigV/J3rrZ6/DENU8xmxhSKn4ybXJlD7cFDSJWuH\n8myKdVoAkkQTiEarSDRLer1XoaJDFdsUmLTWfqLN2Oj8vQ53RUAntXzENOQ4\n9CTTs1y9+Yy7aEwZ1q6elbGmfyy95tQCHYPcmZBi6r5AWGDBBHaYcrmMMamy\noEMlEi04RNKvrMZhNMgqqBEdSrX+cHo6TKj5tQAWzK4Tn7J3Jdh2M7VPHyoW\nU/ps/YB4tkZV2HZ75VDG2STqKoLnzQwGGOQHK7ANZ+MfliOR5Y/i0OZBadwL\n/MoHrtY8S819/AgCxDiEYA41C/pMC/6c887pkL76k2CjH6vYTe9TRUO0jzfp\nCUR9VEYc2ANfhhe69XsKutEycxOxMPJhF6NjS0nsKvDPRc8ubuoBfLu81vJ4\n+bypCLBhLyt/Q/cg+3m5T78+iR+hf6Xlg6ZSknTiQjfdRp0C5DxDw0FWDNTX\nNa7WBXuGtQ4KC4QfnnPEXL8KHI0B0EdaoLpRj0G+CC5UTxNMKApHud/sOg7H\ngFXV\r\n=Av1q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHyTB6CPN4kwmOzys54wKeHKhjPqcGjGK4zS4XeBWTlRAiEAnqmZanURUtg/a1Gky1mI4rUvSxEXEPgsWAy/hlTj2og="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-e3bc204.2_1572977717767_0.9577428832458514"},"_hasShrinkwrap":false},"0.6.8-alpha-f3332c3.2":{"name":"graphql-toolkit","version":"0.6.8-alpha-f3332c3.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-f3332c3.2+f3332c3","@graphql-toolkit/common":"0.6.8-alpha-f3332c3.2+f3332c3","@graphql-toolkit/core":"0.6.8-alpha-f3332c3.2+f3332c3","@graphql-toolkit/file-loading":"0.6.8-alpha-f3332c3.2+f3332c3","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-f3332c3.2+f3332c3","@graphql-toolkit/json-file-loader":"0.6.8-alpha-f3332c3.2+f3332c3","@graphql-toolkit/schema-merging":"0.6.8-alpha-f3332c3.2+f3332c3","@graphql-toolkit/url-loader":"0.6.8-alpha-f3332c3.2+f3332c3"},"publishConfig":{"access":"public"},"gitHead":"f3332c30751caf83a4a8522b2497e6f8407f6a63","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-f3332c3.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-pk1d1ahl9NCGYk6AVvBgqAu5l2//7mJDRIIqUiDa/ZJy9R3xpi6e+mfTrslN0o/x3in6DplnqN1BjV8sPx4bpg==","shasum":"1a751764e0ea6f0132ef500299233913baaaae2f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-f3332c3.2.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwcUOCRA9TVsSAnZWagAAWvYP/3HpWT7wIQLiHAdJ/WIh\nK3PatY7K5xjJLUrbefB7phIAkjTaNZtyqI2VSdu8o/W4uZQxI/kz18zxwcet\n6+uZNIyU1rWjKYS9GDaZ2YHJiqKM2pfitgx9+mkwSKE02A02DqRmMJ2oIyDz\nGeZ1v4oibxFObkRSqbvIGOYsBKd8cNqcDivrOK0t4ThXCWeoPRfgUnoAQJd8\nxvXzu/ZJjYYioBSAxQVE6j0Bq+A1sMwI5HdN/1k4McpZy1U2zweLQnFw1eUQ\nZPUwFX7yB1aVIFaEq5SnsOl3x1j6G101Uh6S4sdbXxS4fn0gp+HI2r+NfWSO\nykYmYWYpPSFTsRAhma1QRmGwVYHnuHsQQjr7ib5g3QKpqTTC/H/QddbL28eg\nB0y0+ZjHzUWdh3ALVGFB/B/TsCv3DkAZEkimP//M61FRV1fPVDa+uMslrEFV\nKVY9Qyqtmp6KdwXvOFMCklqmZ1hGbjTuFdvzUChDh85X72EFAvA2aUq5lqvL\nAul3sxPBYNRQ6aivk7yKaLlrKAkAgu+LsbyhlCkfKv7i013l3RgDm4mD8Gzk\nBTvUftC3i2grsYK+ht6J7AOfXOtGRPkpR1xP/BW39hjpmsZ94TUpOzLMIyWZ\ncOWvieYNgES9VQr88V6mqQXXdx0FDVD3NcqzWRH+ZSYZYU6z8Pme4Ae4LHqK\nZUZG\r\n=yhF+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE9QwSAUyF21ofd90NlaO799gp57TDDSLP0A8/f09/x2AiBD/5J95n1PTjeZsMhvbMe7EHoHAy+8Foovbnwa0XYw6g=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-f3332c3.2_1572979981455_0.31485343955863665"},"_hasShrinkwrap":false},"0.6.8-alpha-23bbb51.1":{"name":"graphql-toolkit","version":"0.6.8-alpha-23bbb51.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-23bbb51.1+23bbb51","@graphql-toolkit/common":"0.6.8-alpha-23bbb51.1+23bbb51","@graphql-toolkit/core":"0.6.8-alpha-23bbb51.1+23bbb51","@graphql-toolkit/file-loading":"0.6.8-alpha-23bbb51.1+23bbb51","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-23bbb51.1+23bbb51","@graphql-toolkit/json-file-loader":"0.6.8-alpha-23bbb51.1+23bbb51","@graphql-toolkit/schema-merging":"0.6.8-alpha-23bbb51.1+23bbb51","@graphql-toolkit/url-loader":"0.6.8-alpha-23bbb51.1+23bbb51"},"publishConfig":{"access":"public"},"gitHead":"23bbb512598c95e67ba4476ca410e7049655db02","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-23bbb51.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-flg5akN0v3E0N3eKpafNl5d/WBshplCp9yeqwKbkmYOghik6VllDeKI4Kbm+9Q4IGmemG/LKzlmV4vUQ/3BRqg==","shasum":"10eec562694ec9b46b6ff9dc7b37846dff061fc2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-23bbb51.1.tgz","fileCount":9,"unpackedSize":14892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwdGQCRA9TVsSAnZWagAAxnIP/1rzclJ7OX2X4inEhhFb\nUkLYdxKG1PcqjhTMEIPFNaQS9QZyX2Szr2tWw8NTqHQglCydWo2DHP8xO+0e\ntUZ614igau2/RNqcp1f+pxZdYZI2AFHXfR736T+ZoQe2vXYl3DU4BYNwwA+e\nCbUFJVWq6/VV90wJroDzgjrRkjVwIFpgEhifcCX38x1ppfaLXNibl5+hQv/n\nyoOfU13n2hBQBPzY3++bQQRlHIeHpEhona3SzqDMXPqvwTUCMzN1Q0BCW9ds\n1FPFHGophMUaM8sUPgSoW1CkRlsez66LS8mIMise7oJ5QS4q4TvVHJAkoI8F\nICpdGFLrajCwM885kym/intKwwVLxEWTCN5e+DZg91IoAumAuxy53mY+q+RP\nMD7dyYpYyDVIQJmw0GgiLXKZi29+Um+qvW8l9lMQvVjsq7lxUocdNuOBZdtK\nlLoQflCg804sDG8lBNE8VM5ihRg66S22ul09RryYsDH6gf4An5VoTdFxuPb+\nx/BDkBzKNt6fIPkQUmeqUo0pn59dl7ERCNi5h6YM0dI6MyQ7bu1CLQYETEsw\nA5SAbzSm6KpvrVwtWCUt3pxq9bC5DWOYgmUex5uliwQM/QXcZ3QICmBkN3gz\nvQOLCrKs8A9vFAw39KcciG4w0j1MM7WEAyBXZZ7iPpsYspKtu8SJuSN7P5vS\nXEQU\r\n=H7iD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE4JAWdtVXxC1DB/JcePdzYQ7wtWKiJjkTDow+mrumRqAiEAgoaS2WPo+lGzkOeiWwWzvLiiJHNj4ua/ZZamGBLO3XE="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-23bbb51.1_1572983183826_0.7524857206259159"},"_hasShrinkwrap":false},"0.6.8-alpha-a0567ec.0":{"name":"graphql-toolkit","version":"0.6.8-alpha-a0567ec.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-a0567ec.0+a0567ec","@graphql-toolkit/common":"0.6.8-alpha-a0567ec.0+a0567ec","@graphql-toolkit/core":"0.6.8-alpha-a0567ec.0+a0567ec","@graphql-toolkit/file-loading":"0.6.8-alpha-a0567ec.0+a0567ec","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-a0567ec.0+a0567ec","@graphql-toolkit/json-file-loader":"0.6.8-alpha-a0567ec.0+a0567ec","@graphql-toolkit/schema-merging":"0.6.8-alpha-a0567ec.0+a0567ec","@graphql-toolkit/url-loader":"0.6.8-alpha-a0567ec.0+a0567ec"},"publishConfig":{"access":"public"},"gitHead":"a0567ec3a48ffc73f84c69a7ecd25732d3c9c650","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-a0567ec.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-e+VfvEbd7YfkaFQHA2NtHTZbHiO0OtzuoFUAcqheyvwoMHYmOOe9ZeaW3Xx+LoQh1r/CshlqMxl5RXbDbbHRCg==","shasum":"3bafe891d87abad31f4380ca11da37c18d515f4a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-a0567ec.0.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwdtqCRA9TVsSAnZWagAA+nIQAKAtrdEUmbs182c0JggB\n7LJsLBddn2C2HxWHc8jPwwSyvETLEJOdz2yiHFs9RjIqJOqfvUw+r9+slJFk\nWnTC7NlA0jOfG0V4ZIp4kC0nWaLQ54sln4dEBup31pfYLEz0p+cPVv15Bjp0\nZ8zg5xwTV+zQPF+dHtRWj7I8HSsZgYdYYIHB7lSYDni0qARQzROvvANRoEZZ\nAVXa/5madl+jfPxnKDY11ftxslRz8N1nOHXbM7WTpxaC0Do8ZkGLqARpHmFg\nWIwAAijHW+qF0Tz4vZINxVVunP7sCjkwCjqfHAsJPfPt5mddxLASHT+kDvn8\nzNNNJkbtZW46Z7hrdrEphSIlnbRbwO3ycuauFwotdYf61n9Ld80qakj1IjEE\n9hMCAi2ACEXPRVOE5Xh23J/QBya9SWJTBeMG72ZFBTLOeIqsYNnTZ6OkJU8D\n1nLeuu8eNB+hURrrih6rsRa8JbYMJcQoeM/bf0duQvyCC/n7a7HJWMQperqo\n/goAB9gMllapCjbNaLthgSi/OKnAtJK/UI+lzaMgw4m0ZNkKkROiU456Rikk\nMX+8W3PjPxokrsQ/ZFSpevgKoEUIHem/8bP88rywe93RJoHF/Hq40OMMon8Q\nnQmaPaBgQjHhX8mj177E/QrBXal4Q1C27lYmuekJ9u01J35cxO6GvJvQhUIg\nyy24\r\n=hu2z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClfxhS59UCHqxk3vxzifzJggxDgwaYM48h6FbO+qs91QIhAK9XCKD/uRGFo+cQ3effG/Lsau5chx6k8MKPBE/Lq6Ns"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-a0567ec.0_1572985705862_0.8601001758251396"},"_hasShrinkwrap":false},"0.6.8-alpha-53e458f.3":{"name":"graphql-toolkit","version":"0.6.8-alpha-53e458f.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-53e458f.3+53e458f","@graphql-toolkit/common":"0.6.8-alpha-53e458f.3+53e458f","@graphql-toolkit/core":"0.6.8-alpha-53e458f.3+53e458f","@graphql-toolkit/file-loading":"0.6.8-alpha-53e458f.3+53e458f","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-53e458f.3+53e458f","@graphql-toolkit/json-file-loader":"0.6.8-alpha-53e458f.3+53e458f","@graphql-toolkit/schema-merging":"0.6.8-alpha-53e458f.3+53e458f","@graphql-toolkit/url-loader":"0.6.8-alpha-53e458f.3+53e458f"},"publishConfig":{"access":"public"},"gitHead":"53e458fec79c8c8142c60be8fceb9b033b37ffce","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-53e458f.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-NYOFyqx0DdlPrwY9/0G8j+SJ/NutgSM5qX5b+zavswgvuNSol3T5dkig+lKK9NMJLekT3LYann1GbBQ4Zr+/Fg==","shasum":"8afc055c644c3b338566ec4f0f0799efef4a3316","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-53e458f.3.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdweocCRA9TVsSAnZWagAAYMkP/3l7h0MuS/gAcz6gWfBl\nOBuV7UHMLmxy3ifOPHcU1NHN/onxl0qt6m/NYV/esNznFtTHuf9iYMovDtya\n7wWJthNwHYMgcFwBsGjRGcIWq2FPxZYY+/FwndqB+ymhSG3mGVIeMEYLnsdi\nnTJxva4UcADoG3MTF28GmKsMuOO63oBKSu24Zgufj/6Di0AWKxTDeLS23yXf\n1h98uiWWnMqr7g6WF3cq7jKzfT45T1XBUvs5urp6f1CuDX3QTkE+BeXq/TUg\nnvXYrToBtWxP2wdrexqHdhEyZa6LXiLari/PDieIGRovUzpdtaW5kPGMm+pW\nAR2QRKdK4oc6+IHwPUQEjsNj4H6nXmrsiwyAkZ2B6ouhOSfux+WGnItjR8GQ\n7xSnmwtLn54SUSjarj92ZaI5Q/4PDGdIOjdFtkv9lXoLg0aSHwjTxJziyRYE\nsB3sWyEwO4qL1s04TdpHRX/2SkE3TL3i/odrOdbwniI1XKeCfr6xpm0lMk2w\nt3YubGt8CGER2eQ9I9JPVPJsprNZMmL+pTuMrK99/GxysrFhg0eeX+jV8YDT\nNNxmqIKHw1khlW5XYrJQ8f/3Enz9GwgmdNenGXLQX11XkZW+T1GrDn1Whwh3\nDBMio6hIE2Z7LfVF6B89iEPfYPJlpkkxpuRxI1vYt8ZUtf3rK0OdKIwueQSk\nxBp0\r\n=XzkX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC5kIA5jcXlNd4FNcm17c27XMPCFAkGoqa+8kirir4bRAiAelwPfRUGk40syCUyRFHWkWgWC4a5KmfJBGhc0LLTxZA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-53e458f.3_1572989468063_0.07839462709110423"},"_hasShrinkwrap":false},"0.6.8-alpha-05dcd9d.3":{"name":"graphql-toolkit","version":"0.6.8-alpha-05dcd9d.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-05dcd9d.3+05dcd9d","@graphql-toolkit/common":"0.6.8-alpha-05dcd9d.3+05dcd9d","@graphql-toolkit/core":"0.6.8-alpha-05dcd9d.3+05dcd9d","@graphql-toolkit/file-loading":"0.6.8-alpha-05dcd9d.3+05dcd9d","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-05dcd9d.3+05dcd9d","@graphql-toolkit/json-file-loader":"0.6.8-alpha-05dcd9d.3+05dcd9d","@graphql-toolkit/schema-merging":"0.6.8-alpha-05dcd9d.3+05dcd9d","@graphql-toolkit/url-loader":"0.6.8-alpha-05dcd9d.3+05dcd9d"},"publishConfig":{"access":"public"},"gitHead":"05dcd9d3d32c19fe54d15f3b4e4f8f50d9221e95","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-05dcd9d.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-RMxMUm9qZSsH2r5lP4FCD/Fl6fA7D1xQzPm/buU4Z51uJRu3dxG5M5eZBPxjyBy0j/rfcDdmLA0tal6Xne9QBg==","shasum":"ec12392a2a2d06623585b87ead6e55cf53cac483","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-05dcd9d.3.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdweppCRA9TVsSAnZWagAAAkYP/1qlfJEK1y1oaNP0xc9B\ncFJ0owQmgrRf5vzWJYNXfm3DqojuFh46NCKhMBhD6Yxz8rQ5GM15/ploMcm9\n+/YMKSdjSPaVFpNrz53hWt4qDddZQrlOwKwhXNIphKDDDsCnofv0z8WvXjZH\n1mXk873qQPiBj8sLeRlxOzcKGRG14dISO9od426NIeTY3pRH3k1VamNSXxCI\nuN+//FoVQPMSdwnBPNAWdATFMnSD8UKENXlM5lC+Z/CjLWQhACOgendp/48w\nmvPBqYPEgqLzw634K8kCXg0SxfNNao4uoooUKBbWz81R48axS1ZJ2n06I81C\nj/qCoueEzWH3ijKg6E6arkeRx5vEwry8GHkKbCrbuuAo4XKH+I1vwy/YyxSY\nHf4d82YkCl09BPY3ER0EHbu4WhzUVkv9dqu1gY/6s0KKLe4xYJdgMdt20/pq\nY9yqbacuPKCnc7NQ4cCuGsJ6Yk1NqiDeX3KCppaUkw/0lLkSpcC3rvg0sNzW\nREUmMAV0jIic7ItxU/wUAAMf8+LJN+LIHeLpQmGkS165Fo3A4+JK7AN4FZSl\ngOXz4MiA36QCcRCrjyfIERUuA3GoyMR7haQDmV/MSByVl8yl+wupHbu2Ol5S\n0TnybT/0ct43PA8rAIblj0NoqHn01aDt6pQNJUJeHt9Xl+01zArZjvBq5LD7\nQo3d\r\n=31ME\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVUpewM6MRj7kVi41vrgfyEo+5puV561OZUXyU12/KVwIhAJVCqTztSyLEEs6p1rBp5x5T1aJ4IfBEEaacP5lAJKoH"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-05dcd9d.3_1572989544819_0.9007489099539794"},"_hasShrinkwrap":false},"0.6.8-alpha-d7391a9.3":{"name":"graphql-toolkit","version":"0.6.8-alpha-d7391a9.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-d7391a9.3+d7391a9","@graphql-toolkit/common":"0.6.8-alpha-d7391a9.3+d7391a9","@graphql-toolkit/core":"0.6.8-alpha-d7391a9.3+d7391a9","@graphql-toolkit/file-loading":"0.6.8-alpha-d7391a9.3+d7391a9","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-d7391a9.3+d7391a9","@graphql-toolkit/json-file-loader":"0.6.8-alpha-d7391a9.3+d7391a9","@graphql-toolkit/schema-merging":"0.6.8-alpha-d7391a9.3+d7391a9","@graphql-toolkit/url-loader":"0.6.8-alpha-d7391a9.3+d7391a9"},"publishConfig":{"access":"public"},"gitHead":"d7391a953f55890c4b87b844f3b0f9557c65a443","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-d7391a9.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-BOkPzOVehvpNeIU7PVOgDLNtmgty5PbKvo9iNQqvIfB3InWUO33lFQEQsS80aJxRXlwpd9tN7n/dCYS7viCWDQ==","shasum":"20dbf47e14b14817ff3895cd7d80b903ab16e08f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-d7391a9.3.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwg3uCRA9TVsSAnZWagAAmNkP/3kY6/ZfNHqAWtJN4SUM\nZnKNIWXWJ3zZbKktSMoAMK1IFeq45etdDMY2PhluTRwxtBA5/xrcNurbCcc5\nb8K5CUWpQMPE7RySo02Ss13NEyOT7FOb3d+mndjwpGuH1XNlDYYJHug0RqsX\ny+uRDoqWDXtVC7oma9GWfE79idDYJ31ZzQWtHvOiCRRRsRpEyDFWDRruZPU6\n3DzJmKx+HkeWhDSefFsSzqnZ7KnjcmF4bt6GUijpwz3TeCBCMMUBDZOJyxON\nwkHtI3WKpxO5CXip0Pn8CXOtV4y+aMEYjJmYjVosiToGORWEHF5GaCEoyn8k\n+pyvuRAo4BWb1LuRh0036MeJ5ThX59e1iHKnMWhfNybA7w6qZf2goHYQNSKX\n4TdhV1F+Xg9U1YaaZ9O4wGNkIzjDM23Eq+gtTG//znQbPGf6q5Wcsuy3Cz0j\nHskBmp2bNodDRQhWL2GzVBululvhZvk7oKbTpQwBPGGlwZpGG9FvEfpjnMzA\nfiHPdPjWz8F1xG4Gnpbcq5v14bR0Lul2UHxy3t0ipii8IixBXxaIMaz9+VAp\n0owuUM+RzpoBn1fpyq/cnrnosT9G4MFOxzH27q1WoCjbxB99OvKnt2kBTJ8F\nl0dzdUvyHUKWbUSH0LpDh1/JKEJqcJ4mZL8QmR8irU52HbhjAglmIosMg22S\ndXl6\r\n=QQ8C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIf9ovP0D33SLh6p+UnQRyhNHjZbh1Qp2xbcp2pf6p1wIgJF1HZ+uDG2qU+EE+VzGhfUSkvxuYdhBDmmzHDgaZris="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-d7391a9.3_1572998637671_0.8331672295738426"},"_hasShrinkwrap":false},"0.6.8-alpha-dfecdf9.3":{"name":"graphql-toolkit","version":"0.6.8-alpha-dfecdf9.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-dfecdf9.3+dfecdf9","@graphql-toolkit/common":"0.6.8-alpha-dfecdf9.3+dfecdf9","@graphql-toolkit/core":"0.6.8-alpha-dfecdf9.3+dfecdf9","@graphql-toolkit/file-loading":"0.6.8-alpha-dfecdf9.3+dfecdf9","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-dfecdf9.3+dfecdf9","@graphql-toolkit/json-file-loader":"0.6.8-alpha-dfecdf9.3+dfecdf9","@graphql-toolkit/schema-merging":"0.6.8-alpha-dfecdf9.3+dfecdf9","@graphql-toolkit/url-loader":"0.6.8-alpha-dfecdf9.3+dfecdf9"},"publishConfig":{"access":"public"},"gitHead":"dfecdf925edd7d625b88152dd9d0df7a974a7110","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-dfecdf9.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-b9iZfJr7tjl7pkuOVUuQjjasjGvZ2zNhVGhbzNcN7S7cRpN9cBm+kjDCVPNCBckrnmBG1+kI4KKYxYkhn0WGqA==","shasum":"89bd421478239cf1999e642d7131db144959f77f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-dfecdf9.3.tgz","fileCount":9,"unpackedSize":14882,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwkf9CRA9TVsSAnZWagAAwK4P/Ak+ASIoRW2Lqoa37rXu\nmvNo1UFJuOItW9GhdLhLnd/a6u/oG0gG08n/W7MtAIVqYpjAKQwoiYnxYFrm\nlf2RyHe/zVxAIC/2lT+NnnUgqJU+xqvqwIfqqeeaowBidpxpDdba0AE7xWq/\nNWuZPXApdd3+BEhIBHJ0ySuO/qheXzP/h3kLDhEtxc/KivjamdhFWkzdzWeL\ns2Gtmmz+8bWshESBRQ1gKc3ZfPJQ5+wgqGJSTsVnV4dmxB/BWAWe/QGxqRCm\nZt43l9ujVw7a6saXGwEQVpxvcayy4+7/gwsniNkQMxNocdncFD9zQkpZhb3O\nYBvlAVewSAZbkzCLIP3yBPAbMoAVGdM4v1slfwhZ0kp9ndcPoDJF/PQQS4NX\n5VRbKiEEgBAcxH9p4Y5+mAba3Y4G0DC1am5vJCWUG2HJjraxWREjPMiIVLdt\nv0TOpCnybGhaALxmXOhiQsJM7Du+OyOibFJzBcZx7+GLq8+Q4cRiIlOEr+oT\nKdEhdasff2EcN+EdPZJ+Fb1T8N0Mqykdi/h6t21RS61otfuP0OCv418u49Fb\nfe0qJCGkMsxG8We0JFPrcionhA/BFQDTiZhCV2QfkFaVvdPZXJF8vfU3+zdk\nwHYefFgaGwRpiPpz63eV3inkCCw2BQixOXLDJKp3JUSVKGPXYZ6gP2LbIC+I\nVoWj\r\n=+BuB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICGMsflr9wf6auAntetXXkkTnAvRyM1FjLYCuTWaLkp5AiBERgL3zZXOMXIZw6THH5TeKKbQ3X2ICMvLmWHdvBDBsQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-dfecdf9.3_1573013500676_0.6613654276365581"},"_hasShrinkwrap":false},"0.6.8-alpha-2cde5e8.4":{"name":"graphql-toolkit","version":"0.6.8-alpha-2cde5e8.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-2cde5e8.4+2cde5e8","@graphql-toolkit/common":"0.6.8-alpha-2cde5e8.4+2cde5e8","@graphql-toolkit/core":"0.6.8-alpha-2cde5e8.4+2cde5e8","@graphql-toolkit/file-loading":"0.6.8-alpha-2cde5e8.4+2cde5e8","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-2cde5e8.4+2cde5e8","@graphql-toolkit/json-file-loader":"0.6.8-alpha-2cde5e8.4+2cde5e8","@graphql-toolkit/schema-merging":"0.6.8-alpha-2cde5e8.4+2cde5e8","@graphql-toolkit/url-loader":"0.6.8-alpha-2cde5e8.4+2cde5e8"},"publishConfig":{"access":"public"},"gitHead":"2cde5e8f3f6632320d783b2bebf7b57e7274a778","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-2cde5e8.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-HLl5tCXjiZ6NjA/tOo4W7ZMBzrRrk7WTaqwf1J7IZYvmzD4HCX9mQ2oodN3J1PI4PiwATWZPUPSgZhiC/j0CHw==","shasum":"e7e78193995c36896c0c660f69f555c0e930b252","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-2cde5e8.4.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwkg8CRA9TVsSAnZWagAA68oP/i/geeiukrNJAvBSE63a\nhfUvtftcbp0d/jazd9Y17FBD0otIjwMdfnZZfBwkNFSAvY3yaSgZtLcGxFDW\noBnlOS4JZR2TzVi4kxJ9+i3tnRS5J53NT0kcL68P99hRPCMgtcnfSwBujcrT\nKzqrJzpVlyqPco2D7ElYDs5+452tnPuvm0zlNmPATEDni/EPZbccxKl+Dplq\nPwR+0A0AeRWw3f/8BnNJ93a7xJ136uh/BA753H4unEdYjjI7QSY7a04FTTih\n7q2oPG6kuocpSuj40J9yD1xea8g77OCJ9GqlJMUFQT+IyDKDNxKPspb3In8T\nTcJVmP1OcaLNHNNcH5DxQv0xDV9BV4Ha0IwCSyzge4q71N/Qh3Vu6bIxIV1C\nX8ph+gNy2Fi1e5ZKeC7GQqRaXwAeVuUdmBY9F0VMc3JwqysTcMISJZ58WKkd\nRt2stL68+1APQGpDl/+Ygmb6EaCnKjT6t+V8SvTtJjapDiFshZOsK9YmN1HQ\n9nJGQG4OestG4VjyLiFdbFp293e+OXOCghOJXAjWI2FKRKxMMN5iJIhx6YNY\nysJkQ47ITXBopf0QGCllwp7YBd3qmwVW9uogPABFOj4jNRMX/PB4U44hUwJn\ndyp4EVhK+XM/pybOFgPcycW5CrjDuTYFTYSGaA/zTg1LbpA/z0y4BSqm8bwt\n6qL2\r\n=kWdO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuUK+kxnnyZtOaqlBRuS6bE5xtsJsXACIwYZCJAmo7XgIgNSJzexLcYgTaucMmjHVWGvYdVP0IZvKlJur0DQgr6HQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-2cde5e8.4_1573013564452_0.8575881033189623"},"_hasShrinkwrap":false},"0.6.8-alpha-a3fdc9c.4":{"name":"graphql-toolkit","version":"0.6.8-alpha-a3fdc9c.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-a3fdc9c.4+a3fdc9c","@graphql-toolkit/common":"0.6.8-alpha-a3fdc9c.4+a3fdc9c","@graphql-toolkit/core":"0.6.8-alpha-a3fdc9c.4+a3fdc9c","@graphql-toolkit/file-loading":"0.6.8-alpha-a3fdc9c.4+a3fdc9c","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-a3fdc9c.4+a3fdc9c","@graphql-toolkit/json-file-loader":"0.6.8-alpha-a3fdc9c.4+a3fdc9c","@graphql-toolkit/schema-merging":"0.6.8-alpha-a3fdc9c.4+a3fdc9c","@graphql-toolkit/url-loader":"0.6.8-alpha-a3fdc9c.4+a3fdc9c"},"publishConfig":{"access":"public"},"gitHead":"a3fdc9cd16e3e2d7833d663fbbe3ab860162f668","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-a3fdc9c.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-G1mDQym8iR9TT0iTiHKrLBvflocwAC7NcDZgfoR9Fsdk1vrY5vGcJHOA1DGQrZi5PF8+Dhvl5c/dwlS1K0yO1w==","shasum":"a9a0daa6ce703e12f3039cc1b17b1a469b7ff0dc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-a3fdc9c.4.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwlBzCRA9TVsSAnZWagAA2sgP/1TAzJdMJkK3WROpFMEx\nXC9LUoozAdU2YRkHe3qQ2yVO9d/DZkizCfDkiAkIzOt7jx2F+J+HWF4V+Yjv\ns+m9whcaQdLTdHG0GMRvXnacN+FsLpG62DWIQqsYL5iVfHYs044c7sPJ6Ad6\nWGEnFewM0QKg+WMDfVhENbBt40aDE4uXhuJMirk/hXn7gPLoSXrs8Q3wW9pr\nT9xkd4zZu5NiyhJoMgJ4K8aZiIDFsi2IaIEiIY5WHpquod+a8beH6BYxn1tb\n4v7fzcJksk6Ll9DSOKSmSw1rEzwLK4o5xfTIIR+ZxUHcQ8xUnqzyWsDHtqVB\ntNH0dI0h6tiitXwOmTga3/eo/ZCfmXyiMV6uUNZO3DylVN+1hynJKURZ6/xF\nB6iVvRkyTpAkHdeODuSQZ2kual0Vp+Poy1ULlXDmu1ijfUuqgro4sIiYTa33\n+MxXsIVRiAbKg1yC/3xvA73Twnt2isXSVqJSXd/8dAsy2Nq64uRjfDpyhhbK\nb8zh29vUNnc8SckUvlFjX4Aoow+dlj90Kb0s0xgf3IQ74xn5YwUtP+dF+ETe\n9nhTuQa1dpa4rSWGCABDrMfIrJs143nLe1HFF8mc5CWIw8LZzsfFL7YBH+KJ\nlf5KyTP8iypGUIE6Hmp8Q3mytd8UnzCK443xnuV92KT3KEWTL5p4DBkGEly6\nnNv7\r\n=7k6/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHRze5beHevAKvXu6uVcPRTuh77kZph/3Gxv6bJu2p/2AiEA2Zmvj6BL2aFCIyF3YkSa5khM8szuYXixfDA6as1/a08="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-a3fdc9c.4_1573015666412_0.11121749280537307"},"_hasShrinkwrap":false},"0.6.8-alpha-9874590.5":{"name":"graphql-toolkit","version":"0.6.8-alpha-9874590.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-9874590.5+9874590","@graphql-toolkit/common":"0.6.8-alpha-9874590.5+9874590","@graphql-toolkit/core":"0.6.8-alpha-9874590.5+9874590","@graphql-toolkit/file-loading":"0.6.8-alpha-9874590.5+9874590","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-9874590.5+9874590","@graphql-toolkit/json-file-loader":"0.6.8-alpha-9874590.5+9874590","@graphql-toolkit/schema-merging":"0.6.8-alpha-9874590.5+9874590","@graphql-toolkit/url-loader":"0.6.8-alpha-9874590.5+9874590"},"publishConfig":{"access":"public"},"gitHead":"98745903ebb2758d33f8ae0b47e0ff734e9aabb6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-9874590.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-kXPzvbuXpHG2TXYRH5KFMafO5JXLnIQIEGSKcR7h2jkxr8fSQXkveyYaUB9vlowXkF+wJ4VRLIUm7Qx8IQefLg==","shasum":"fc95f3495260cb1c4033cebcbd59a785d58f2a3e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-9874590.5.tgz","fileCount":9,"unpackedSize":14884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwlCUCRA9TVsSAnZWagAA/gUP/16xi1+I/q559j177C+L\nezXM74N73xpJEaCniAazmTlw85ZnQFi+E1AuAHnj+zA/a2rJUiSCzalHDqX+\nG5yXPXmI7JBi2cg0JwtYoF27U2x3Yt8jms/HFJwcap0uESUa1GuwHutY/i7T\nvK5lWXEGMnQnlE0zkt3eyOebzztC8xkZWkldlKnLCISO5XsuhxR6OyA+rPcu\nLXUQG8GFnW+zQaMMIxWCr5aBxQYaI7fi8aJEBuDqUKxkXqI5BMulDt/oXDml\nTu01fuYglSRWZAI/DS1th4AYYQNC7Mbk9FJtw6rWGIaqzzWRJdvX9JTHnatM\nfWzuhyznKQRkbnh7n80a/FnEHS1RcGBdCyWlp69b3O+K/LX0/6nsxWldrWHG\nj5vtfMoVsSgUoe+ccfJDF32Q8gOs1hpGi09cTeDMSF38PXbVEqvELnhMzJaC\n1iv10KUs2/ZQ40mPPorDTr60QD6szkPg4D+Fh9fCuh1v4xFGoK8aqSBnfXcV\nv86hIBz/Xz0qTCb0PqJPI1SZ9CIsQB3G5zVWpTmPE9sNiHhjMvktmhArwUjd\nW7MCWBNwnpGF5Nlr8hvgaeXCKcjA940blYHHpa902p04Jwc5kwOyKZseWVq8\nVxd4Npm4H0JMdjgnL7QPtMdTZoxoe7ok6BtmjwsPT+jeWQ6NRj8bLIGdTVu6\nikD2\r\n=8aSF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb6MAwZ0r5lLQc1mz/vLFOL8bOiBejYVLfpPELDICemAIgKQuE3ah/qDhLrOPYnaZjYL69ljgHnwBAroxxgrGKsVg="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-9874590.5_1573015700195_0.10084454473884619"},"_hasShrinkwrap":false},"0.6.8-alpha-caa2179.5":{"name":"graphql-toolkit","version":"0.6.8-alpha-caa2179.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-caa2179.5+caa2179","@graphql-toolkit/common":"0.6.8-alpha-caa2179.5+caa2179","@graphql-toolkit/core":"0.6.8-alpha-caa2179.5+caa2179","@graphql-toolkit/file-loading":"0.6.8-alpha-caa2179.5+caa2179","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-caa2179.5+caa2179","@graphql-toolkit/json-file-loader":"0.6.8-alpha-caa2179.5+caa2179","@graphql-toolkit/schema-merging":"0.6.8-alpha-caa2179.5+caa2179","@graphql-toolkit/url-loader":"0.6.8-alpha-caa2179.5+caa2179"},"publishConfig":{"access":"public"},"gitHead":"caa2179d2f2d8ce07ad8a7cde47513ac005e799c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-caa2179.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-XV3+mkrLmg7R6oDxLxPDmXGD+4SxiZUn+k0nNNlXdynHP40OERVLY5wIRvLr8enmZFNalGe2MF24JWfIGBEPVA==","shasum":"7d94f5673e551b966eb89a3595ce59a8a89428f0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-caa2179.5.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwlJcCRA9TVsSAnZWagAAQYsP+wTTxx1vENPUHVhTFDCz\nMtc/QL5wgSFzacxbaRpKPMPJGaI3UYk4K0ZsGPOMfQjACTmiOejEpcpZv8tA\nGz97sgjZtCTWUjIa/loElsr9sETpZuphomDvKWCEWWoRcxnmh/LyE5dDziDa\n8ca5vD7llzjfwWH34FHVn+GWOgoOvTF54NsAWYHlQfUzQ3pEgalq7+a5+ePA\nO7VurlUPsXUnjPgIEzq/Y7wpraj5lH8GjSjFheIsdVjkZ9yESb5MYr/Renz9\n3h+PRSmzKxSwOPz+/KppV0PSSKXA8YGuUKpPgLbWio1HdoSl2lD7uJGJVFTm\nipIKAIXBQzOHrlzux4wYZunGJbwMrlfbBsAFsWgTNLqEenKBzL+rhgoUNdoC\noZNz0vkD3Oee9snTT3ev9zaict9KqCiwK5uJL8JqmZkrX1YXUAuwg4zE/GQI\nFz0qGaE0cML9QqzDkWpn/CISeo/QpQb6NlJRwh/xNAq2VdAs2iXW/U7CTi+a\nD06hf6XALpZgI4LYa0Dh9RP/sJ+YJG8YfL6fYuh0VhdieZZGUWunzMkvoH5B\n2wRgRBp23CEdw+yWhHcSYWy1MfgWdrXqt3pGX8kzOCs5oMPTIKnkmkZW6wxW\nsEduhF7/x2ae6FtlEtevzAjvVsrxMdmQ/JRSN6dDkJNl7mUyHkxumkDQArwH\nS8Y+\r\n=2CaK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBSIlJ5LfOw3DS4w5db22kh25xiTGtFOu4sb6KMlSQJSAiAZwcmxY06Od6cE+nn0Ztz/WSfpT2KhaF05ERvqVs9spw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-caa2179.5_1573016155617_0.6305072480013489"},"_hasShrinkwrap":false},"0.6.8-alpha-8d0ed22.2":{"name":"graphql-toolkit","version":"0.6.8-alpha-8d0ed22.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.21","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.6.4"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-8d0ed22.2+8d0ed22","@graphql-toolkit/common":"0.6.8-alpha-8d0ed22.2+8d0ed22","@graphql-toolkit/core":"0.6.8-alpha-8d0ed22.2+8d0ed22","@graphql-toolkit/file-loading":"0.6.8-alpha-8d0ed22.2+8d0ed22","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-8d0ed22.2+8d0ed22","@graphql-toolkit/json-file-loader":"0.6.8-alpha-8d0ed22.2+8d0ed22","@graphql-toolkit/schema-merging":"0.6.8-alpha-8d0ed22.2+8d0ed22","@graphql-toolkit/url-loader":"0.6.8-alpha-8d0ed22.2+8d0ed22"},"publishConfig":{"access":"public"},"gitHead":"8d0ed22cd4d440d98f1819f2a45edfbd7003e252","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-8d0ed22.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-wQWhOujvEAGyCLFsJ+NSHeJ72yjpRVGcr+saxlZDUdhhN7l7FbpYA4ZySezfc0JpJD97wlO20CykqXH2yKPCfw==","shasum":"7eca122216806822de868a0fae03f3043ef97773","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-8d0ed22.2.tgz","fileCount":9,"unpackedSize":14891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwltrCRA9TVsSAnZWagAAaiYP/i3tokAkQVv9R7C3Q6rO\nxOiwa07YqS4HEH+9K24ivPU+zyxsU7rxkMXs01q+iXAhsiBCuXeklkBlJ3mi\n+rBeD4aaG+rXmU0g0MiFVS/sTMGarPQxlMzg3ASwo2Ytwb68fnTWcEAaLpyW\nSSK3OHfKVAZVuSO1Ag92Ex1Cf38DUaE+UE7/DdaHOham2r6aU0jqxzcjy1nP\n+dRr2OlJb8bW/djWMBd7bfBPWB9vLrgZpYGx6lnFqjF+gJd9Zt6VTHsIGXII\n2h/tQJhDe4AM1kfsjmRyWIN7yqtfPdLSuB5iTaZ3m6FBsdFPWAgbszKTJa+s\nRpYk1qFLgUdS81wIKNUhulo+ipO2uJfHML7VeEIaYTWOEVojZOyFOB7S0pJO\nkqjxZofX93N/0mReMCHA3Z410str5+JgCh9OfZmJ+Ak26OffFhOFkqmftl6X\nPqWL7kagAMAFlTDcTk8p2HATplqtkl4EYjnhWfe49RKwlalW6HR42YE3HKTQ\nf+utxqz/41oZi1jRwfqlbN534NgMBZGR7Ux6RB4CSyXVNn6b+3Hq84XFLVY/\nt+imqyIgkDLk7ooiBzgaiObMmYjB+mWaeH2U7XXQD2u6aErWov2ZrqLgvNeG\nI1cwQW0T7Zzw1BSAQyiQaGtjN6QE1x2L+3Y4Bo9CjC/4pBxyIMLZ/CohRJEl\noYRJ\r\n=gvdx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFkK9hL8jWy9RYozEelP5i4FdrobqDek6yc6siChhajgIhAMpSi7tjyaF+lx/YOkksj97GrRHMmG+EOmX+Bot8pupY"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-8d0ed22.2_1573018475176_0.33066491594915015"},"_hasShrinkwrap":false},"0.6.8-alpha-823548a.6":{"name":"graphql-toolkit","version":"0.6.8-alpha-823548a.6","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-823548a.6+823548a","@graphql-toolkit/common":"0.6.8-alpha-823548a.6+823548a","@graphql-toolkit/core":"0.6.8-alpha-823548a.6+823548a","@graphql-toolkit/file-loading":"0.6.8-alpha-823548a.6+823548a","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-823548a.6+823548a","@graphql-toolkit/json-file-loader":"0.6.8-alpha-823548a.6+823548a","@graphql-toolkit/schema-merging":"0.6.8-alpha-823548a.6+823548a","@graphql-toolkit/url-loader":"0.6.8-alpha-823548a.6+823548a"},"publishConfig":{"access":"public"},"gitHead":"823548ac4c662283b265be115dc733edd807a518","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-823548a.6","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-B6coJ42mD7tPj5Q0Sp0WkwWtakOXlMdQXLXWK4gpoiW93oIJIlA84S6gaLd/n1IistPJpZ+xJx69Ecm02zaT5A==","shasum":"5babf8d270cf1cd54b03dfe8b5d233e727381c68","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-823548a.6.tgz","fileCount":9,"unpackedSize":14883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdw0ZgCRA9TVsSAnZWagAA5EgQAIJgyyr0JgzM8O316/LU\n/1dPQUOgXDIOfTd4blDXh6WRhsYdWQ5Am/ILHWcv92G+cII+cswTHtcW+HVP\nPKeXDSUN++dz8vkY0Zax4fQv5DLrUJME3ODX51tdgyDmd85H6OEg7Q7B0r8n\nQwSJdt2U+hFufskTKaTAqZBJ7vz7nBvMwcTHD3TDguKQLn2NCyh09TGPaZ9O\nuOWyIW1nLAnESo8quZb0lu+KBN3b/3iJj9bzOP3lsQWFijGwzLgwxIWFbpof\ntYlvcYy6m+AKT7X/ssCxTqmPl2auUys1UDLqnZCyXOT2cqtE5ECv8YwGafun\n1JEwPB/0P+K51vD0Y8hDMEvRvvfqXyc6etCnQP8P9/SHxwchsBToU5HieUTV\nZF4WJ9ZN8Bsp4ZBE4XGdhzAuYYTkqMXu3rNgj+WwCvywvWjaJHHpsQVgB0WJ\nmLzQwJkdW9AbfsmH/OMpgP7ChBueF+siszkmB6J9uQRS9da/hLWQ6mRs6wD0\nGOo2ZU2A3vbksztHhOJ81EUMzVjbO8ofnSBW4IH7eGmVNf5PIMqwbTx184Wp\n/n4DnWnCtXx4z+zXVecvWEX9FI0ny85M7i4r6sl2A7S7vk+eNpDwHbhrrX+O\nC1v+8990sEtynbW2PF8vrVNQt0oXKmYYx+0p7cMpCkeDQ6yg82p0L9PJORLB\n/h84\r\n=L6Qt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICNi9BxrybfIbSMX1P/eILdx/EPdsDOGnTTo3dsjtA4aAiEAxyZBH7VZnMrH66gXfxvUI4UgWz4VN59V3VhVBuxe1ls="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-823548a.6_1573078624171_0.6130826164843717"},"_hasShrinkwrap":false},"0.6.8-alpha-0704954.6":{"name":"graphql-toolkit","version":"0.6.8-alpha-0704954.6","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-0704954.6+0704954","@graphql-toolkit/common":"0.6.8-alpha-0704954.6+0704954","@graphql-toolkit/core":"0.6.8-alpha-0704954.6+0704954","@graphql-toolkit/file-loading":"0.6.8-alpha-0704954.6+0704954","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-0704954.6+0704954","@graphql-toolkit/json-file-loader":"0.6.8-alpha-0704954.6+0704954","@graphql-toolkit/schema-merging":"0.6.8-alpha-0704954.6+0704954","@graphql-toolkit/url-loader":"0.6.8-alpha-0704954.6+0704954"},"publishConfig":{"access":"public"},"gitHead":"0704954d0f9ca7ba6b053281b48c696fa96e946d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-0704954.6","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-D07avM5NawH6fAobhAHols5YD1zWhlVP+qA2dAZe9JizJyU78xCVbv1oFvRxOxHYr+PS+qPFg6mkmfDVt68Ybw==","shasum":"f20d737a97be564c9d072d0ca74c9756f13c5363","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-0704954.6.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdw3rbCRA9TVsSAnZWagAAsogQAIvnrWNefeDj0fxfqGQu\njrqR3sJvm/dFd0YWgBaguo7Qidz0dQlxXaLJNZ7W+qf5eIErRwtoH6iQHZFR\nNoROv6jsH/B7l6iz/3Io0lSF4dHI26sxkIpIyM642u/aMZbCwyh02QshFVHh\n8/KMVRi6RnfgAWjO+yQiUTHYmCth8BqnfTDiEQ4hF/Kr4pad3WNoQO/cWxhp\nVbyTh3+jYsD88Rl8U+v7RgJ18NL+AO6ZA4famfhFMvTz4Vero5LvtzLE7h87\njKPIJOjaPEgWQ2pareXdQiLqME+aSZ+Qtx2fWu9jskrLEQ2KD5y08PYK6uHc\n7T65CM3pfo0i1qIJy8ZFg0qTFf+HIKBc8qc19Hg7MYaHkULlRkFQje2pVaCu\ncDJryBSKIASh3EKIh1YCZrvvjGq8gFi1E3Uh1FtwHlE/AaGKhSMzMHUJmxCF\nuFeYQ2CEM+VCkG8jq4PgZ2ybRCkgC/6YEfUBa7IULe+XkaNiPwBphIQWDFqO\ntIEAwiB/n55L55A9Fg8mYqovCA9r671oXqaJGvi/cobgDyXY6HTbqIWM4P9v\n1yxUnbpABZnlS6oFk49PaxIwvvAe68ocSC3ue5h9nNQNltB4WT0hWMUPFHtP\nl05iSl1DO63XjvRmmzZBNgspix2ih2YFXlkMYzYEmJRkCmK6C8flMr0TQ7xj\npaNH\r\n=b19F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWk7mxsXm4MnRLEW23tjTBo3m076GCMeXeJ0HruHx+vgIgK8OFKydgJM+LM5Rrd7pqiOPAfkLI+6dG0R9m80woqhw="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-0704954.6_1573092058611_0.1498429614535295"},"_hasShrinkwrap":false},"0.6.8-alpha-0fa63c6.8":{"name":"graphql-toolkit","version":"0.6.8-alpha-0fa63c6.8","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-0fa63c6.8+0fa63c6","@graphql-toolkit/common":"0.6.8-alpha-0fa63c6.8+0fa63c6","@graphql-toolkit/core":"0.6.8-alpha-0fa63c6.8+0fa63c6","@graphql-toolkit/file-loading":"0.6.8-alpha-0fa63c6.8+0fa63c6","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-0fa63c6.8+0fa63c6","@graphql-toolkit/json-file-loader":"0.6.8-alpha-0fa63c6.8+0fa63c6","@graphql-toolkit/schema-merging":"0.6.8-alpha-0fa63c6.8+0fa63c6","@graphql-toolkit/url-loader":"0.6.8-alpha-0fa63c6.8+0fa63c6"},"publishConfig":{"access":"public"},"gitHead":"0fa63c6dfa82e8aaab5850752a44a2883f3b3379","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-0fa63c6.8","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-jQCNsBHq/9d+qgFjxjr+dZCwpo4NNlHpAcWmvM57m5iot3EKkHX+EBTouxdk3dr/sZLo3MogAJW/M/2nsCLCOg==","shasum":"697ec29e339f791ba71a73e92708a684e873c9fe","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-0fa63c6.8.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdw3rrCRA9TVsSAnZWagAAy3AP/1wPNF8zwygGXeSKBD+Q\nnYV+YS7bahOaP6+zsTF+dfoUg5w8sF8O3z0mJp6VvflYmao1DQZO/yu3LQY2\n4XwlOim3uYhIuK9glJJKdkOhEhSWkWMJIx/fAffxaRx9pnrAiew52ta3ZC4g\nDys4MnY1ydLBxncwFD9OPB45hRMX9pQZCLIMrCgAQWwlBXJIpO6hBFJYddpL\nzOhTrdYMuXlHACncyqsATPSxfBZcQBCAj/IFyktndGWKiSpRe8Q85Unuiif9\nEGjbQjxAc7/o7Xrb8Ia1APgwyEpitpTIVBJhgseHAgywrf7aPDG1GhHQ+Sdr\ntGBjPwDIioEOU3FR8W/cHvwxa+BaEz0xwZBJPFd9madFVGNbQqNyOkviRvp6\nhlvgq/WNR7bgUjas8gNAmWt8ZhcDDuLZQvQdri4O+lwGoGaXalaMC8lwdJbJ\nlm5otXt0jUzAiTXGtuP5a0UPU+PJf/J3cFGsA/81AFwbKlBesfcUjsmH+asb\n7XXUix649udXJ69g3EPvjCWUwRJ+ao7shhOe8duGoVGxyZE09ZLotmYZbaFe\nzqVVNAdk1qKbOY4dfr9/Uc9xD5TViIQ/+oNwJOHuIh8EgcfK/ByVlFQ00nrK\ne9TzCxCyt7t8z7X4XluLHHtxZ83wPZ3zOk+WbzF9AGm3XjQ4jmfRE6xDljuF\nR2Im\r\n=81fO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAuolOpAiiNeETr2Y8hlfdvra6s4U/9nZrsA/E5oB/11AiBhOnT7PDGIuk+wEKSbYpFTREVQdhoIRFIKOvzCy79Nnw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-0fa63c6.8_1573092074695_0.4095182304714684"},"_hasShrinkwrap":false},"0.6.8-alpha-aa0b7b9.7":{"name":"graphql-toolkit","version":"0.6.8-alpha-aa0b7b9.7","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8-alpha-aa0b7b9.7+aa0b7b9","@graphql-toolkit/common":"0.6.8-alpha-aa0b7b9.7+aa0b7b9","@graphql-toolkit/core":"0.6.8-alpha-aa0b7b9.7+aa0b7b9","@graphql-toolkit/file-loading":"0.6.8-alpha-aa0b7b9.7+aa0b7b9","@graphql-toolkit/graphql-file-loader":"0.6.8-alpha-aa0b7b9.7+aa0b7b9","@graphql-toolkit/json-file-loader":"0.6.8-alpha-aa0b7b9.7+aa0b7b9","@graphql-toolkit/schema-merging":"0.6.8-alpha-aa0b7b9.7+aa0b7b9","@graphql-toolkit/url-loader":"0.6.8-alpha-aa0b7b9.7+aa0b7b9"},"publishConfig":{"access":"public"},"gitHead":"aa0b7b913da8b728a64cbd28374276c45df406fc","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8-alpha-aa0b7b9.7","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-eAH+mm4l55DsVl7Bdc9wPfWgoJKBwXvD/QshGn8dxQm0Cxzg7pwcPHVfd9RSJ5HBKNCgzrwdv7Ax6c/Bq3O3nQ==","shasum":"5562b2257a6fca5dc0ff8c649efabf0825459666","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8-alpha-aa0b7b9.7.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdw3r4CRA9TVsSAnZWagAAmJkP+wQq3+mcNJxTT3E8G1lN\nuqbKheK2SHKGQVmnURDJuZovAbCgfakeEUbZawr4ucl+UfAlvUl5N8N0eEUg\nGw7/0WuFiQJ8IZ6P0fYsFP3z8pMhsInXE/O5kMb6nx58i7UKYrAvjeOC30mb\ngpaBw5OuNMEajCt1UrmtTv9rhrQjAUUmwBQOIdSKCMzbv4bjxAMOc3tw2Pca\nzFm1Koro+E+cWtkuPTbreaifMahMxcw5+GmsXICsU6Qm/mFs5OK5bGvxfUU3\n65uOuZ86XNYwerWXdniKRBTbRqcJvf442OImka6AA8XFub4G1cJeky6amScm\nXgbeCh/d1wpUb9j8RZQ7zWfqKbJsDCiiqxOG6EEi0eh6wjal8zRJPyeAjtp1\nOwU5W5NXE4PW/c55cX7fEJrd3VNG9e9BCyD1xrBXoARoRkO7bSGU2rbKXi6f\nlzHFXKGV8okOGp49ey37Xzhu/mLbY5gweXkOtDbKxhQ4aIWyVpUJ9hjUmJz/\nz5lQMp8DYJCMvhsSXSVSDEcJ+JAGIeiEm/zo3GlNca3uR0CdwvSdpY7vKclk\nLbgaY/oniYQKz6c9Py+nwe4SiEOWulNBEaRFYWZiBspLgzfJXlcspnkX9mv2\nH8c/TBe3YRz0sKXkJYlRzJV/e8dizcXQzpZtv2FyUtuy8b9cd7G1cb2mP0lx\nGXrc\r\n=1hMa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAqB1ys5oTPNJeQOOaLATiiHmh4GWjUmcarWT02xk02FAiANXK8BgzE7vos+gINDy85taPJTK8L9OJC3OiFo1C4hBQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8-alpha-aa0b7b9.7_1573092088399_0.8737366846338495"},"_hasShrinkwrap":false},"0.6.8":{"name":"graphql-toolkit","version":"0.6.8","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.8","@graphql-toolkit/common":"0.6.8","@graphql-toolkit/core":"0.6.8","@graphql-toolkit/file-loading":"0.6.8","@graphql-toolkit/graphql-file-loader":"0.6.8","@graphql-toolkit/json-file-loader":"0.6.8","@graphql-toolkit/schema-merging":"0.6.8","@graphql-toolkit/url-loader":"0.6.8"},"publishConfig":{"access":"public"},"gitHead":"42f1597a036ccd8a247e633a17e02ad03656aa1d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.8","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.18.3/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-LB2KYZcRpvWHogloQvBesfOvBVZjKx0afGU5cqy5eXRDzcd50DC+dnJX92Nv9gqlQqMchZvw3Dpgc3TbIL+MJw==","shasum":"5b2560150dc1acc42fd277018e560562f92dba4b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.8.tgz","fileCount":8,"unpackedSize":10560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdw4D3CRA9TVsSAnZWagAAE/sP/1e26p4f4eG9rcF3ZX/z\nXEvuOsfM2MPqIpsRC7d6SLEIYua1M3MbwsrqnnB7WcfGLlXo1h8/btH170KU\nrxHkQFY06XuKJ1E2E/V639YdMYq9k60YfeEuTDp7Gn0j922Sk7K4ax/pORpM\nGqlMTOhuSWEulMJJLcWCqJpDHw569CpRQCeHsQCn9sWPm9Dz34BZTmrTUbxV\n1H+7+V/Nbyfi4uPofrma81tBCpIc6hC/Kd/ltyea8utxY+kTPQOuV+CKPd+E\noVAl3087UfdQF3oCmaZr5mSfw+w8OZsEixFUNrDZeCt1NADOSDxum1I1BsAs\n1HXp8hFxtdnoGtwBmVMon0IaOrVFd0yYTd/6D3LRFleHIopOz5r5P/cCQZfF\nWf0ZaEJQoBDWOM4Q9U0kx9Yg5hJQH5bJPcNI2FvMJ26rQj4AOMqqNHt2Wz+0\nHf164yJyKFM/VZdM2GgoERkLfx5jlyQFqWSH+a+UcNhZgh/Fy4+8zUoVZOvJ\nYWJKSx088rZJrYyDhaK0j4ufpNqr/9Fi+FjFPhlBcZsoBCqyMO+RNBuR0Sa6\nnfH35JXokju8wIi63PEw1zZ9pkN6zAj/QWEPliajiFqv5kZS5R/uman9bysY\nq/87lsHE9mr/yDO0/9gkyNjOXleaMzrB3ctEMNQx3wiw+4z25Zqr17wuwBVZ\naVft\r\n=t6SU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeJwSd9U764yw8MiukVSC3Jrc3N8E3J2tkZrUe/Rx3kAiEAptWS6QFkpSQH5fI0a0GES5cnAvQaFkJ83+Xr2IB+SCQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.8_1573093623296_0.7833804587405682"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.6.9-alpha-42f1597.0":{"name":"graphql-toolkit","version":"0.6.9-alpha-42f1597.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-42f1597.0+42f1597","@graphql-toolkit/common":"0.6.9-alpha-42f1597.0+42f1597","@graphql-toolkit/core":"0.6.9-alpha-42f1597.0+42f1597","@graphql-toolkit/file-loading":"0.6.9-alpha-42f1597.0+42f1597","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-42f1597.0+42f1597","@graphql-toolkit/json-file-loader":"0.6.9-alpha-42f1597.0+42f1597","@graphql-toolkit/schema-merging":"0.6.9-alpha-42f1597.0+42f1597","@graphql-toolkit/url-loader":"0.6.9-alpha-42f1597.0+42f1597"},"publishConfig":{"access":"public"},"gitHead":"42f1597a036ccd8a247e633a17e02ad03656aa1d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-42f1597.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.3/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-ajym7QVEBZmLrWG9v9GnJS2ciuUzcuZamJ0rBbVgclnU0r4RKSbUwDR+XjZIk/cHE8pUuEwbR/eKDTJF36rX/Q==","shasum":"0902fb64ee69cff02819f503e082927956d42f10","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-42f1597.0.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdw4GyCRA9TVsSAnZWagAAoHUP/0DxyTjnBs0bI8U0Tslu\nJk2zCiT5VAsAAejXB3cbHsdw6is1Z90S+Qn2U7QISO9aJ3jcIUxigrbXwt0V\ntV4miJS/BbZZy6NNBH0i1f+3vI0i5dsN8Yr7nYVBpl38SXmcdxBGDSk3urNw\n7781HrOhaD/qaDRze4KGmom9mmm6ECTSohYPO6Nbloe28Tu7m0HGFBy0HNzZ\nJtUHVMbw9pMXHL171XZLL6NHQW4rVPK8lqbqWsmZUFH12FwXjbAVoGUP/EHu\njGXqpKrSxEl1DdoSMx5/jOktZv4/Ga947jLZzRlvWyPVhB2mhO36YH2OjMKz\n633b7mloMfOHfp7moK+mVIdsmPr8V1/2thjK4HCTjd3bRui5NpXEkP1QJ/1V\nDC9LPlnFwwE51KzJ08eQah03370oDgXKBf0rvr3pG6YKEOiH5uDq7TCj9AeV\npn0QuHI1przZTqYo/6yvEGQiTBsAqxj19Twn5jJ4fkMgVmB4SwOIKfiOa7Is\nNcBAkTS1WhaFIaUBTXHvv6qRl785a3wpGQyjP9zjY7t3NWWoO5Ebz6MAlPAt\njgOo6uyC70SyftPxYZhP6T4qm//nPSu8GumFmZySHmyLDLwm//QOf2qqAyQq\n00Hz5sXPVsjT0T19OAfjdj2MTurp4yV7K4OLmI/Wy1gBqXjyQZCcCMsrCxNo\nDcbB\r\n=VNXx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkd5KwtlUo+0Y/zL2bRJUKdtsjJZrnnyeCftu5QotQ0QIhAIHdnS1opQlgPprU+iYrJJpBywRrqoH1pwH0G2luhgj+"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-42f1597.0_1573093809905_0.05031051263480957"},"_hasShrinkwrap":false},"0.6.9-alpha-719d460.0":{"name":"graphql-toolkit","version":"0.6.9-alpha-719d460.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-719d460.0+719d460","@graphql-toolkit/common":"0.6.9-alpha-719d460.0+719d460","@graphql-toolkit/core":"0.6.9-alpha-719d460.0+719d460","@graphql-toolkit/file-loading":"0.6.9-alpha-719d460.0+719d460","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-719d460.0+719d460","@graphql-toolkit/json-file-loader":"0.6.9-alpha-719d460.0+719d460","@graphql-toolkit/schema-merging":"0.6.9-alpha-719d460.0+719d460","@graphql-toolkit/url-loader":"0.6.9-alpha-719d460.0+719d460"},"publishConfig":{"access":"public"},"gitHead":"719d460beacee66f5224cd0b67cbbc317d19f2ac","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-719d460.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-XbXrv0P+CeNxDeim8cOH6TOIJKt4ihZryldr7CbRApWE5sRv2XGToaBXnEL+pidIi6JN+ETa3/9yZFejAPsJ1A==","shasum":"4688dc6028cbc3e9e98a06d5e15fad3bc3d4c9b2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-719d460.0.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxMyMCRA9TVsSAnZWagAAbHQP/20a3GV6k7Z6b4ZLdVoP\nA2840zOBjTRtsp+uU2xuIOvTKxT0UQ6QsDiPS04j009PskpnNdj+pSnWV8PE\nEt/AgMuC3VmzpILz7tyl+z4tI1heu8UpRO94AlrZv8vIE57mRngZZroI+Hb1\nrDBWsg+p/ITK5V+EI1/ZFeqGZtL7ZUjPwb1PAu2JFodGO98B42kRBMUqDv58\nHiYgemi7UugawGtfZr7tDmMinNS74cIwrILvyNTEHbqR6mtJ5Pw5rJf+S0AT\nHmcR+asXHJX9VKfS9r6QaD5J5X+qq32E8qsdDwM4KJTXU1W/BpXpdqCIp0Wd\n/xpN1OTYjEwwOvJlv4Y2NgJqboLQLRaWxTG4SRiK0PB6wTSJjsgJ+k+SG9lr\noo9yFYhI2JZ8lOQLYXjjIAORoLeoIaRbqR4ucK3yEdSPkcPfSvWwOhu9yHsc\nZPwXGpTRrLT0IVwPt5IJPfRw+fh23esS7vYPoPgRKNe4iUz84PDvTF1Bx107\nJmw2QbXGixy4AhnzGLupJPDxutAn9EzH7iRzZrfVz6c8wuu0aLAm8h8ndd/C\nLurXURjy6YiI2ma7Ttu4/oNW1jgs10j9hSsvcC0dkIOxamRykhoVZlWooxPP\n5/w+rH+P5KknLXbt663DjAi9Bgis9F6nRPCTTPoj5GJwozblnbUlnlxT7e7m\ndaiN\r\n=wG8o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbKNerISE6zCQUpomj3YhkEibUUWy+eVGd4ZcioU0VXwIgKulSEa5sC6ptZzIF3tO8aev4zxtvYWPJJMeXtQsIAv4="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-719d460.0_1573178508276_0.5267588410206885"},"_hasShrinkwrap":false},"0.6.9-alpha-022fee4.0":{"name":"graphql-toolkit","version":"0.6.9-alpha-022fee4.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-022fee4.0+022fee4","@graphql-toolkit/common":"0.6.9-alpha-022fee4.0+022fee4","@graphql-toolkit/core":"0.6.9-alpha-022fee4.0+022fee4","@graphql-toolkit/file-loading":"0.6.9-alpha-022fee4.0+022fee4","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-022fee4.0+022fee4","@graphql-toolkit/json-file-loader":"0.6.9-alpha-022fee4.0+022fee4","@graphql-toolkit/schema-merging":"0.6.9-alpha-022fee4.0+022fee4","@graphql-toolkit/url-loader":"0.6.9-alpha-022fee4.0+022fee4"},"publishConfig":{"access":"public"},"gitHead":"022fee471c4591e95601d78a803856af39ff93c4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-022fee4.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-6qzsi8HK7Zmb0Pyb/oaAKDsOOfA+PwLZ2z7oOsIJmP9SMTA3V+H/fergnTMtQ2SbJ4za+eK3z+ygooCCC8vWjw==","shasum":"f503d43b3e6be00f318425231398e60b4e38850d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-022fee4.0.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxNWjCRA9TVsSAnZWagAAjvUP/25lzV/xfofNSx2HJRO0\nEUxT+0mS1DsB/SbHi5ZD7vSgUcdw4kQkWhlrQC4C8HOPZ1Kf35Jk8JKxobVs\n2MyAMVUkf4BsVPg+p9qrq49EuJfn/ONI3I3DOO6KsgWUPWFPlYNMAJH/sRCn\nM4wDY+fBs4/gLgnc8DHljwc50qPyT7Jtx3OptcAABTyXUXeAENGUJe/8NqNE\nXWXY9iqj0zm54M4bVPEx6DKO12tThwJ+apXcvnu7E1V+VT5NXKHZ9cKUJ3JS\n6guD66r9vAgyLZ6QtsED560h5LqyH3wBmMByibDLtpAKgxG4lSa06iT+q5MY\nXPmgC1FBjMzSIiJLOwaUjOHl/sSNRM/2y9yq1l69pflQBv9fSGCeH74BBaBr\nKTB2RgVKQmKp+tCUjrdEjhY67MjvODF01p2xObUydvbdQKBsg/d59bvKxbRG\npOmfzyBd0R6+FUiecTJK9AYMvg08HhmXVsftOcrR4aD5l3s2O6akSD5evEc9\nHcBQebj7DE5nFgxPK3LeMG3G97ot1WTWyoOjXKOcFpcs1zCaIMW60YEAaknR\nJiYgcHaJclEGIna440anmJqX3xa1J06JqopVxb35u3twUeqt3ne/ytEbLIZ6\nMSuysiJHCk/IUDTH363KVxhk9HTotnuZuosmMZc+lPTPHjzPoKmciH2ny+dC\nsmOW\r\n=N/lJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDUSzxgZ4HvyuMaUfUQ1pctPGox88Oq0bwE8OXd/Tqy/AiBCFK5ytxHfzvph9SKeZB2pLD6WGvM3LC3ofxouMoTNOw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-022fee4.0_1573180835049_0.16894743787857713"},"_hasShrinkwrap":false},"0.6.9-alpha-41b528d.1":{"name":"graphql-toolkit","version":"0.6.9-alpha-41b528d.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-41b528d.1+41b528d","@graphql-toolkit/common":"0.6.9-alpha-41b528d.1+41b528d","@graphql-toolkit/core":"0.6.9-alpha-41b528d.1+41b528d","@graphql-toolkit/file-loading":"0.6.9-alpha-41b528d.1+41b528d","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-41b528d.1+41b528d","@graphql-toolkit/json-file-loader":"0.6.9-alpha-41b528d.1+41b528d","@graphql-toolkit/schema-merging":"0.6.9-alpha-41b528d.1+41b528d","@graphql-toolkit/url-loader":"0.6.9-alpha-41b528d.1+41b528d"},"publishConfig":{"access":"public"},"gitHead":"41b528d3431b778bbce1aa61526e5a569c96f07c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-41b528d.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-PuwhtW2Q4+xxgxYZjaqOI3AcSshVQoIbONRLer3FD0PY6JawaciCeRFaW+DTFftF+x+bGxBR1FYdDaGi3OzKCA==","shasum":"48065c43c76c0946c069311477205ab6f4c9c88c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-41b528d.1.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxNXsCRA9TVsSAnZWagAAtJsP/27OvDa5FUrluCtt2aYf\nyLv/r+dN+DYPgnBWVKM6k9d/odrBn00yLsyPFcN0X1t2hK6RzUKt3JNtTnln\nbsd91+KLSNBMtnJoMr+ZseIqs872G/+pJVaN6m2K+eiSVOtFTyLQdFNQbWtT\nOJby54iKQ+3QgF7WEccDGC+sSXGlNsCkLFwjV+4/456jwpjWLpRT0Jk8HFnU\nsblTvP/fT4FL2PvPoY8sKeZbKMkXyc2zcUDD0ZWpCOr6qN4GF5fJ8Cp6UEZl\nnEGIsADWLFWe3yYRTHqPdCAhnrNl+KVdBpN5muZCskNlLCS/19OJKxm+X9su\nWeecN3HXdbe6IZo1wm4fZU8mRxxK2IErRmKrSoBhtYyENzkSvyyBbXHtpwT0\n2W3AQsH70fYN19AnUUGf7/8xWY395vKDT49b/93nf7+pcstJX88SWlBSFcGf\n2H1z4emd9Plet7wh8qkggTrloQ6gO+GGS9XgS1Ljp3cLclViCGnEe1St/F1z\nCCbbGoqBpm+8vuE5xs0xkW4a45EHF3C3B41jDmKgF+7+ZfrWr+BabTI2lZVt\nT5nOtVxuy7FP/YReGVIfNYBPgu3iwp7zWr14uMs6UMhlmOqOGAh46zh7PAua\nvQhKkg1cUi/Ao0JP3xRgf8/KwFF3woeOr6pL6YZEKh5m8Bi8Iw+lcgNkd606\ng7q+\r\n=4JBk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUbZDIyYDIbfwGl6vqD3c7fSLlPTjucTTzIolE8RzP2wIga7GBa20Kmw92f6lCadU1/gOOCaROwOzD2OaPPXjQ4cY="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-41b528d.1_1573180907680_0.43964886901439604"},"_hasShrinkwrap":false},"0.6.9-alpha-6b332fa.2":{"name":"graphql-toolkit","version":"0.6.9-alpha-6b332fa.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-6b332fa.2+6b332fa","@graphql-toolkit/common":"0.6.9-alpha-6b332fa.2+6b332fa","@graphql-toolkit/core":"0.6.9-alpha-6b332fa.2+6b332fa","@graphql-toolkit/file-loading":"0.6.9-alpha-6b332fa.2+6b332fa","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-6b332fa.2+6b332fa","@graphql-toolkit/json-file-loader":"0.6.9-alpha-6b332fa.2+6b332fa","@graphql-toolkit/schema-merging":"0.6.9-alpha-6b332fa.2+6b332fa","@graphql-toolkit/url-loader":"0.6.9-alpha-6b332fa.2+6b332fa"},"publishConfig":{"access":"public"},"gitHead":"6b332fa7c7cd94bb3551fcf239aa692e4b220d6a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-6b332fa.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-Rg3Nu5nWe6nd/1QA+js/MuiyAvC37SlspWs6mU8lPF0RdhSlvGIgkWi+cNp8jaweZOJ3c1DBIV0Q2wZpl7+0xw==","shasum":"8fec14c51eb2edc981bd0197aa38f5d4187c7d7d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-6b332fa.2.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxfYOCRA9TVsSAnZWagAA7/EQAIpXRKjgcA9maetuJQrx\nzZ7EjYRCVgNp0r/HbtiWykMf5wh2drc1q56s5ZcMt2xQz8TiJLJYpzDcw8du\nZVdWBv82LN3wY3cpIKQ/JxWIbunlAwy994n6y4y11/SX5cy8zZC6RfWFlcP8\nzdnt7WeCCHdfZbklpSesN6XlF8GnNlvVEj4sJjX3AgMHALb0kU+Jne7dSCLa\nD5+KKNKdz+W/W88KIeZoaGAh3YpAYdYPeQDInCM/C0yUFQnWZvvauBTfO2ge\nZJyhSd1b76F55mm/DIv7tzA119HSKJfDO4p05EocxBM7HKRhWfh5qnhdMHpD\ntugzD54Yg8iMRrWmoehzlH7hCuqtga2PzLHMEuc7PA60jCcvWmsgyX8SvRdM\nqF9qmFBGkNUymg5e25fdniex0o3cbBQZF/EeO0Wqt6Xoeh346zeMHAIMPPAf\nmwQi9eNrSBOzdrnyraPKnlSXEtFLlmexEhamvsglSmiNDJjJTSiivbRo6x6E\nve3YzoUBqBVYKUKiwmXTe0lnyCFdqy+UXryoxhePDY1sq6L+MCBPAAPD07Te\nJy2Ek5hbBQjTXCcLRjVOWj1ly++p8n8+VT/a3b7GZvmx/5zfNV5qpc7z+9xn\n4scaWddvk0akri2gWwzroa2zZN2r5LkUeL3ZF1hIonMdoqmkmd7I3zmU0ggG\nXWAl\r\n=5P8q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtfgZLi57TmFe0Zpns1KcG6ol91VQQ5JM7+d6E8ufIHAiARFIrU4ZwJzYfCoZflbKz33/CHJr0qZNAfhXP9DuurZQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-6b332fa.2_1573254670235_0.8324037493897212"},"_hasShrinkwrap":false},"0.6.9-alpha-fc71c7c.2":{"name":"graphql-toolkit","version":"0.6.9-alpha-fc71c7c.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-fc71c7c.2+fc71c7c","@graphql-toolkit/common":"0.6.9-alpha-fc71c7c.2+fc71c7c","@graphql-toolkit/core":"0.6.9-alpha-fc71c7c.2+fc71c7c","@graphql-toolkit/file-loading":"0.6.9-alpha-fc71c7c.2+fc71c7c","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-fc71c7c.2+fc71c7c","@graphql-toolkit/json-file-loader":"0.6.9-alpha-fc71c7c.2+fc71c7c","@graphql-toolkit/schema-merging":"0.6.9-alpha-fc71c7c.2+fc71c7c","@graphql-toolkit/url-loader":"0.6.9-alpha-fc71c7c.2+fc71c7c"},"publishConfig":{"access":"public"},"gitHead":"fc71c7ca045626019dd61602873af2d52472dfba","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-fc71c7c.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-eBQWAmJR7qKitAp1M2XXQUXlb+7GZFAo9rBw69l2v9VaSnl7v5qHhVeP+zWQMoCkQrgMLA3ybLobrTbcv+IjKA==","shasum":"02e0e94b0a7cd5e3ff7174a7d85bd12eee1d0815","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-fc71c7c.2.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxfYbCRA9TVsSAnZWagAAPKUP+QGaTxuz9XL8zAeG/VQy\nxJtQsRtz6XQF3UuBiaMafWnIgU0tXKxlhRR6WYnv9X5Ss8A8ldY0TSV97dio\nebN2B9QIdimw5qpsc2EgnTmd4r3dT8nQABvSCVZ7OzQv1K/RnxEraa/kP0tx\nm/wjWoCtpics/UXSLXBQkqHJveAe5lf63o5MZlDZubHBnCdaNpsotMqVWLjw\n3HNWugPFdfqe4sHjZtPS1UoTACWzGk3M7nfKGSd9XFxWcQx1XVtD/8a1ywym\nAyPvqrssfWeL7LhkKIxkBBS1Vr2j+1oy6GpHziUB8bPKIges47cTwG3HKVt3\nL/t6TircQx9AMyTldf6HvC0lEYLe6JTu3hfmKJntLt54uQtXGOGD4jmnL+/T\nNtgSdmVsvY6OcTSCFWK8Flr0A8F0/+9Vjz2eajXCfEfULHmlgS8BewKkKoEu\nEv2s664q2zL+HOzHH6Lv/oiqagPyPfiMlDmqzdl5ZsJQmc7Hcn7nlNNU4F9u\nV1a0rgH+hX5Y8K8FfjHEN4xHQeFQLWYdvzrIAowCUFBUcDW5P7FiPcbcH8bu\nK9EJI+fYxXVcLYpoOz5tHh0cxukjtIokYB1DkJU5Tnu0mLQdgSwtd9aXdBEr\nqNb0I737MUvj89TirF4C5HeNrERH5eG+Ny7lEVLZIKDEX/fJCwTFNOgr69+V\nKgH5\r\n=a8nX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKddY2pQ5IL5uVlERRAnzTDc/Dh5DeH96n8A9dImKiHAiAamfyv3d44WyADRb1GpkfbEWC4vwP+N1Du/NYA0PVSUA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-fc71c7c.2_1573254682975_0.8518267959805153"},"_hasShrinkwrap":false},"0.6.9-alpha-c264b92.2":{"name":"graphql-toolkit","version":"0.6.9-alpha-c264b92.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-c264b92.2+c264b92","@graphql-toolkit/common":"0.6.9-alpha-c264b92.2+c264b92","@graphql-toolkit/core":"0.6.9-alpha-c264b92.2+c264b92","@graphql-toolkit/file-loading":"0.6.9-alpha-c264b92.2+c264b92","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-c264b92.2+c264b92","@graphql-toolkit/json-file-loader":"0.6.9-alpha-c264b92.2+c264b92","@graphql-toolkit/schema-merging":"0.6.9-alpha-c264b92.2+c264b92","@graphql-toolkit/url-loader":"0.6.9-alpha-c264b92.2+c264b92"},"publishConfig":{"access":"public"},"gitHead":"c264b92c8f84fcb7ebea41c382a4c2a765d37d0b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-c264b92.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-eaCdYzrQnkp9usThRpqEsm9RbrPM5Z9q2mRAYSaL5OMAoBPckT0Yq5ZL5ZdfEJcAeZWXIk4xNqvu7uuo8zoyag==","shasum":"fe12a3017408fd4347f675b8c8dcfe5939517508","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-c264b92.2.tgz","fileCount":9,"unpackedSize":14884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxgoiCRA9TVsSAnZWagAA/y8P/28pH7p4c/UzOACcgQ0P\n26HVUV7ewngoMUoa4kCijjJKAwAztngTBj5KH1zVWNHTrIt91/1gM+4KNC/Y\nWlCSL3bQojshF43isFriknS7PUHYf1PKNXJar0fYXmJEzoYucCta98rbS7iz\n+2YFv5CccMyMk2WLc8pEn964I4/fx6GFsYCwhDRon4dvAyh4CKAfTEX5kJoV\nHmdxNb7Dc2ah4Zf5z9LYjPMOAwaRzuGR62JZnIH2oSnXrwdS3NV00pwSFzQ3\nm/oz7Z2QTrdbfv4ESsJ59V4ZbfCBi2HGIiHnRBtY1z+P+G/LkwdpgWHPT2Vo\nARawel7GtbVJ1+lnizlO54YXCUNyutMX+caNMoNF1pw7eO88PRmmT5b5Wkos\nf5y+iJe/jUDaMbW0pVX8gIji5zGGGWW4ZGysdJxUVi43F5f46aoH/paoe0s8\nDc0OY/ZrmSHJzuQomQEfgKB07RQD9OZeYpxWr30/SgqK/ONkjpkGu/Xej+Kh\nPgwjGyoAD13rDHNQ/o6Oihoc5N3TuPT0x95MqwatKPrbY7Oibey9gp67VAbe\nTUx8hqNUGW4QWC4vSA2SNQYJxns0p7J/dI/dzI/xzSHn0GScbdFSZ26a9Y5I\n95ivKM71ojsRahg/PkKlDBM6dHUSUWMq8T3qQauvx5g83hH2qiDkUNCydCmE\nooM2\r\n=+SyE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH8Jx+RrBxbFVFw0MdScabMPkKTYrb6nVASBoWErOtJDAiEA9mn/HkHhBoo2RXohHfvhZC+SNETAI3uUeWrrEItN65I="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-c264b92.2_1573259809440_0.6718461849201445"},"_hasShrinkwrap":false},"0.6.9-alpha-310a269.2":{"name":"graphql-toolkit","version":"0.6.9-alpha-310a269.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-310a269.2+310a269","@graphql-toolkit/common":"0.6.9-alpha-310a269.2+310a269","@graphql-toolkit/core":"0.6.9-alpha-310a269.2+310a269","@graphql-toolkit/file-loading":"0.6.9-alpha-310a269.2+310a269","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-310a269.2+310a269","@graphql-toolkit/json-file-loader":"0.6.9-alpha-310a269.2+310a269","@graphql-toolkit/schema-merging":"0.6.9-alpha-310a269.2+310a269","@graphql-toolkit/url-loader":"0.6.9-alpha-310a269.2+310a269"},"publishConfig":{"access":"public"},"gitHead":"310a269e36841f943a0cb800e74150b648b94b3a","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-310a269.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-XP2uE9UjmNQYreR5ET/Vf8EfQCBA5RwnrbHShidXzyxxoEqhLMrHE48QcV1mcGxop+4MYLy4GF65rh0x+YlCjA==","shasum":"e93c257b5a5c9efdc04767cbd0442589e91cc6fc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-310a269.2.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxnz7CRA9TVsSAnZWagAArgkP/3j339Tj9nF645RKJCEm\nXtIp2VZCWC4PnMytZi2oePOENQFUH90UJRtAQ1fqkBgU/g1/VjU2Wyp+lhkb\n5r31V+JDe9AU7a6AV4Sorp/5L8OVgRy4MjwOXqa7yzp5H05g6l7FJ65fjp3m\nZBoY6k1XwaPQAkMQyLbb8oLxaS+gjpIE3nMFvMLn62G5bcsRXcx1s8RBxdZB\nbV47UypzDee3BIMKB8mYNgRSjVkG/yr6v2jbntlfaKwXUaudza+hbji/2DVH\nXWitdkjok1hL3/owZws7JBFDuy9xVK5Tt/1hK+fSB64L0X4gYaF79y7hqV3P\nMDyWlDrx502/Swgs6KzDT0YEZTvQiY/Ebu1SIbqhrOccuh4vhbZKgI07/j1R\nF8RwTdMrhYLWUpxyXC8Z48bUTJg/l2Fgum0JOcjUvL762FOst40y4dVpX4mG\nUYWJwQs0RsrDAtxByIzyHp9+pL+rgHEEsNmpG15wsYbiVf/1GVQkVhdda32S\nJLI05+Xl8edLjLZNm9gRmTv61Qb+UmE/DVcfXsLUVzxoQs0P6ADEYUEjRyuZ\nWQv5t0lkR1HFX/vRy41IqD79nsECZdjrrwv49w+k83LNLKJYreNOXPM2MgpN\nfpdh1SCWMwV2Jut6WBM92/s4fQdfBeBki3pWfnME4AyhfqvdawtTetUtNdZr\nGQM3\r\n=lppt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgohEDKF1a+ukLTWSBRrT35IhQH8GeG+RsepRLK6UFuQIhAJ+kUbnJHN5FbkgWu4iKILhaJRdEgn/kkgv3DPKiq1sn"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-310a269.2_1573289211288_0.782333697845986"},"_hasShrinkwrap":false},"0.6.9-alpha-f511e81.3":{"name":"graphql-toolkit","version":"0.6.9-alpha-f511e81.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-f511e81.3+f511e81","@graphql-toolkit/common":"0.6.9-alpha-f511e81.3+f511e81","@graphql-toolkit/core":"0.6.9-alpha-f511e81.3+f511e81","@graphql-toolkit/file-loading":"0.6.9-alpha-f511e81.3+f511e81","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-f511e81.3+f511e81","@graphql-toolkit/json-file-loader":"0.6.9-alpha-f511e81.3+f511e81","@graphql-toolkit/schema-merging":"0.6.9-alpha-f511e81.3+f511e81","@graphql-toolkit/url-loader":"0.6.9-alpha-f511e81.3+f511e81"},"publishConfig":{"access":"public"},"gitHead":"f511e818f5521cc2128b740721ceed7b1fceaea1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-f511e81.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-LYBSJpyPmIHJoiaZsmxeY1HaaYkU20lrS60OcNDP/qL3bQ6ZkycTw2TSAisztee+kiFM75wN0VW11ci7Cv4TTA==","shasum":"a2325f7e91a89055a49d8360062b5295848435ba","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-f511e81.3.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxn0MCRA9TVsSAnZWagAA/4AP/R509VxLpCw9+Hi564Tj\nhDJ8HbvGnX66C0xiMsQ9foFjlRk3AeeNOfmkwjWaA21BCAham53hBplqSdkf\nP0NLEFHlZ3hfkM1BtMP6ZgVGCt7TRjlL6WeIx1DzJFZ3DR84SSgp5f8X6f8l\nsOrkzGlv4fqyLuLG09Ngjjo9TvMPOjKB45z+9LRcST0c2owLqc/8W3llQqf3\nVQWQ1wGoyWORGvXtADvFEgeQnScYccpfs8OuqEEFSSfCO7FNeyqGOWedX3ie\nDADiaytt8Gqj8U2cR8OpFLj/ArL1h/TRlBBB+XRESA2U4Js1iNFvE0Z45wdL\nw0fGA5/2rjWHik4zZWk0EF5zhCWne/IfCMG3q+i9wkqnBF9whco59ZLwDUTN\n4BT6odz2PK9wEz1ua06j5z9MizDHnlyfu02mmImZugeh0CEQyAFaJgnPLmzY\nyh18d14SXDLvdd+INFbkCg/429UeO+LB1Cj10tKGgL6sqR/+jWTJltnZ/MNt\n3u0hZME9YnZeXiu4QHCB5XoVuXq0NaarSFCfajMKky7PDeTsI9BkENCjD5nO\n7af5ooibmPOyy9k7HWGHYkCIlEKaI/vj911UDYOuPXlCG6e44an2wHIXoH6o\nrK/oWwJHdWuIe1wSnxK1uJhCR8jNFbiPhXbAujZCanbsSZzoIc/f2JTW/Xu8\nGWF7\r\n=w6HE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEBRPuoWU2uDQ+11hcuKwzAyqXE0IuzDtq4hw0NCYIeNAiEAk7b9JppNZhPFX8LFTGkiSRG6stBzJjcw01+xCFfl/Kg="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-f511e81.3_1573289227812_0.12095827049992325"},"_hasShrinkwrap":false},"0.6.9-alpha-a5dcdfb.4":{"name":"graphql-toolkit","version":"0.6.9-alpha-a5dcdfb.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-a5dcdfb.4+a5dcdfb","@graphql-toolkit/common":"0.6.9-alpha-a5dcdfb.4+a5dcdfb","@graphql-toolkit/core":"0.6.9-alpha-a5dcdfb.4+a5dcdfb","@graphql-toolkit/file-loading":"0.6.9-alpha-a5dcdfb.4+a5dcdfb","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-a5dcdfb.4+a5dcdfb","@graphql-toolkit/json-file-loader":"0.6.9-alpha-a5dcdfb.4+a5dcdfb","@graphql-toolkit/schema-merging":"0.6.9-alpha-a5dcdfb.4+a5dcdfb","@graphql-toolkit/url-loader":"0.6.9-alpha-a5dcdfb.4+a5dcdfb"},"publishConfig":{"access":"public"},"gitHead":"a5dcdfb4e6291e83dfb0e02fd52dd413d594f450","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-a5dcdfb.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-BMIabInHwrjuU8JqKXmNriTl6zJ1zualnc615HSSKu1U5F/kuY1nALvIu/zzCxxZS8sv5AdxAV+NBwdoAA8ZmQ==","shasum":"2cc4e1c1555dd8eb8fe1436504f38f95cfc45bcd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-a5dcdfb.4.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxn1HCRA9TVsSAnZWagAAIHwP/iIzesktOsEDWfXWK0I0\nAbToQpt/DokBRkyMnDyjibeq8jpofXTDRVTGOjdrI6ITiqc4TmFlEcu3RXfO\nkvwEjCjerBryXdiyTgUSuyys2OA6lDRMA2gppQyIwpQo2urR3pcmPCPuB8Lt\nfyPPwvxAo054PhS30ko+2CYPmq0QkzzfS/DKEc3Joam6DKCxojARFmdcdr//\n24HyxQTiqIs5eELGtb9z+aytyVGhsNGTOS/GKewHkxcK3pYYt2VfDz7RjFSq\nexFlzwWtzO1NLY52ETDH11jzQ48vnBlWolNrFHNFALz3ZH4941NjtxSoau/H\n7Dl0ZozimMBE/MOYn5reMED/AtJgdKIt7GouYqRad+7ePg4kR/PuVPejEIut\npb69nhhQ/Q1dYHDCE5U3rsV90a64JONmADzqqBgyyldWKbREXflN90JoFcfj\nfyhBiqCK7Hv7O5kawQ9QewOYm+7B2bVDDbULPKfhK15ueDFAhi9wVXlGnLnQ\ng4atQxE0V0vTdGpJSPPEN2453mi64TL5qbxfU3W8lfarS0BFEcDVpQffZG48\nSV55ZpuXNl/Kc5hbKm2r+PMqQ9zPFyEKkIy9gwcjT+oMdmrwtQi+KsPdHvK6\nJur2knFErJFq+8QfV6y94X3YZCH/obmVcQpXrgRE9ztcG7Ktug010P5X2Lz4\nr37h\r\n=VIBx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEjCKATAoth06h1PnYJqjheQpSC57hEMNSy/XtZT/VXdAiEArtqxK3tIDAzSgIMCFhI3ln8wcgi231/TsYDb8r5auHg="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-a5dcdfb.4_1573289287086_0.39389649166342044"},"_hasShrinkwrap":false},"0.6.9-alpha-ae9a350.5":{"name":"graphql-toolkit","version":"0.6.9-alpha-ae9a350.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-ae9a350.5+ae9a350","@graphql-toolkit/common":"0.6.9-alpha-ae9a350.5+ae9a350","@graphql-toolkit/core":"0.6.9-alpha-ae9a350.5+ae9a350","@graphql-toolkit/file-loading":"0.6.9-alpha-ae9a350.5+ae9a350","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-ae9a350.5+ae9a350","@graphql-toolkit/json-file-loader":"0.6.9-alpha-ae9a350.5+ae9a350","@graphql-toolkit/schema-merging":"0.6.9-alpha-ae9a350.5+ae9a350","@graphql-toolkit/url-loader":"0.6.9-alpha-ae9a350.5+ae9a350"},"publishConfig":{"access":"public"},"gitHead":"ae9a350e0071a38e4c13dac6a560e348b53e49e6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-ae9a350.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-Uawxj78TTsiaQ9+eNc/8BrdGsybhygT9ytL/Oiv3PBSCzNDvtYo2NZiVequaG8ItjqRjyTYz1GgEbyNOrOV4eA==","shasum":"66dd971367aba42159a1686dc17712eeac5a878b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-ae9a350.5.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxrGSCRA9TVsSAnZWagAAeXQP/jXolH94j/g/4zmMG1ti\nzNm1nFRe0AcSMb0Fu45j6JS7v4fnxDEvFDfoEdTgUJttOPW2CJuVWKoS2RIB\n81xHMqfpIB1rrAVWyxBZhWfsU25M5v1JVfZOt1ad21DDdEDC9wWFW7HR7kdk\nv+VPfXWXoO3aua0RNR4XCcX4vyWzrCApsDXWL+8uXoWG/jeQfSLsgYI1wTn2\ngB8rGXRwWfPI7t8OqbNAWEmxwtEmg1+/AYdr45J+9upxJJkkIODNRFy0jyxh\nv7JfyoNoBv003yik7WnoWjFsjSDPT/gHK1zf72Ea2V0BQW39fmlO9DO30LnN\n7CRQxzYqgCnul23IRgcy9AgtdxUAOgPpDUWsf4fwOnQP+XNLrLb1mkgU5GQO\n7aVINhZiMRvaRomuIVc00OQ2LDJuGU7rcNkkxzCER60zqkk8Tk1p+stwadZF\nJpStjZnOmIPKXtTlUy1Dn1AgWgZADScoDs1crzzS7cOs1IhUHUL4YbIJi1KH\nzR+rPUHYMepNMLkwej6EESYw2IeTzWmwwxBh1UDUqDhNNySnEqzdbztudSf+\nyIRLNzuOFWt5DeBE2HMZa2o1tCuLICI8zkZehI3IvjcnVLn9Z/bvyLlnSqoP\nnzgA9v4v3lqRO/tUjRqYRYClBT17e4Vk82CQ4zEqWuk5WbqvYFkbs5xP20LR\n/YiL\r\n=sCOD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhjUYjdTvuAbPLRVxlQapuFsSgDDcjEL/7DfLMy06pUAIgcxN1Oo4T1Kn+y7J9jNJls+i7aBOym1+iQeqt/9sAq8U="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-ae9a350.5_1573302674302_0.9245810572146815"},"_hasShrinkwrap":false},"0.6.9-alpha-bb15557.5":{"name":"graphql-toolkit","version":"0.6.9-alpha-bb15557.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-bb15557.5+bb15557","@graphql-toolkit/common":"0.6.9-alpha-bb15557.5+bb15557","@graphql-toolkit/core":"0.6.9-alpha-bb15557.5+bb15557","@graphql-toolkit/file-loading":"0.6.9-alpha-bb15557.5+bb15557","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-bb15557.5+bb15557","@graphql-toolkit/json-file-loader":"0.6.9-alpha-bb15557.5+bb15557","@graphql-toolkit/schema-merging":"0.6.9-alpha-bb15557.5+bb15557","@graphql-toolkit/url-loader":"0.6.9-alpha-bb15557.5+bb15557"},"publishConfig":{"access":"public"},"gitHead":"bb15557deaef0c57d7a8845cb7f8ec4d138bb051","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-bb15557.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-qTS1C4lA9m/AevjDDQXjqJsypsMGOenCB/CDd5XNTfE1CCD39D+fEw6V7B5nH7i2mCZc/XtHQIJp/UeMfvS2hA==","shasum":"fa9f3fad36f176a527941908fef6a31a109a831d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-bb15557.5.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxvJdCRA9TVsSAnZWagAAf1AP/2YAyQdlA+nMOpwbxpPk\nmY2y38kapz4FSMuPaVtwfwQKM8EUPr7qPUd5QPUFBnyHBIW3cIsiqnK+Pc7T\nKb413M/7TivBEHszVWwbBRbNmIiqcQOXQLdGKP1XKZN0XilctIlmmDHSwFbd\nsaRf8bjiAK0HfiUlPwD6C6+rUI/2HEls17JO+3GqYoMC2lhgDg8nmbcMy3LQ\nThJat4+ove/NZynKKmK4t0oJC/tAeFl5wOfFcnrSuz6CetUSOKc3fr1ceze2\n/u9Yzfbz44Nm8LhKqpfJcttL2KWCU96OrXQw50TE7hFLdAryqO3IxMpOsOCk\nrFQQQNvHU+0ct67TbVo5PU97O+Zhlj0uMIqe17KInS/iQykDyZD0u8ztMChl\no2hDOo8guu0M+g4ko53OxdZsfK4eBhycsy6+w6BXkD5Bn2KkHyMMNbIUTvjw\nDbRsslZI+tEhq9Pz9KL8fJrwrTvOTPs3oD4ULQ6uPlRPkSH0z4anS49tAhR+\nKIt+fHzW86Y6Lhfr+PS56yAGS0KuLom6LVm7ueEfyjGcPXd5PXZJj4/vuoS1\nzvSLxaseirfXQ4uhYiw04VpTAgNzNgoDXQSk2AwCjJ/HcV5CH3MrCzk5Ed+3\nmxczYcUzItWurzDt8bd+tLP3LJNm8BY4E0Ly/3/Z52Oyyvn8Ia3WE2PZwX9c\nSqRy\r\n=3Zy5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf1NIonmDpeestjJgpkEBLimVP2r3Ml/BJfT8U8UeshwIhAOqN0bTwxiVkdz7kLZJj3lQNgDSMFxE3PQof0/k/bgRN"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-bb15557.5_1573319261107_0.9776968259711665"},"_hasShrinkwrap":false},"0.6.9-alpha-844b7a7.6":{"name":"graphql-toolkit","version":"0.6.9-alpha-844b7a7.6","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-844b7a7.6+844b7a7","@graphql-toolkit/common":"0.6.9-alpha-844b7a7.6+844b7a7","@graphql-toolkit/core":"0.6.9-alpha-844b7a7.6+844b7a7","@graphql-toolkit/file-loading":"0.6.9-alpha-844b7a7.6+844b7a7","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-844b7a7.6+844b7a7","@graphql-toolkit/json-file-loader":"0.6.9-alpha-844b7a7.6+844b7a7","@graphql-toolkit/schema-merging":"0.6.9-alpha-844b7a7.6+844b7a7","@graphql-toolkit/url-loader":"0.6.9-alpha-844b7a7.6+844b7a7"},"publishConfig":{"access":"public"},"gitHead":"844b7a75bd653f44a771521c11490fa6d9f2b92d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-844b7a7.6","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-eZrTP9ypOmuzfPuf0L9nNURUQnI42KvbqtrpF8d01AGeq/29IhjFnUGFmFy+QW4YHTI9qA55mW8pDiNK+qWf1g==","shasum":"364a7040f3c39991abbfbab4800d84b6f6549b36","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-844b7a7.6.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxwdaCRA9TVsSAnZWagAAs/MP/iF+XWyTqRz4pe8qa4IJ\n1eyAorSsNDdSo//pWvN1fCmw8suL9fM7JkgRrzIm5hQrA75mK85Vu97SJH69\nR0pBdtOYFtu3ME97m2UoYVfiv2xJw9g/U1FkMVT0/ttHwzF3Hv8vrWuE+MP0\nf0vX287ztnYraUqjDGysUxSya38gGYOkvxOKdAazatqdGzKVWTamL31Npflo\nzlnhHC+Mkq9c2TX2zpfkxlOsCUGP/RNTONQ70hNM+6a8rwLzsP/mdCdSxMpH\nYTsK7VpXdP0+ImqzRLmkyYGydNVbBiepnsPMX/VkzbjUXesHEZHKoSf67+xB\ndMvC1ad50xo1QGhBb8xu7krgC3PZIfKvCea101jN92kCMeAGuM2iEu27+byV\nji2GzLFAKVTD0FC/jldsP8kKG4VDs0sFCmx/1gyzKCOKSjuck/3VnUVBu0sm\ntos6bnmAXvAHWmMGW4i2D62CNJqnavEPhHRsRTzzf1yz6QmutNnPoNvrsGr3\n9NLL9cQ2LaMoM8HkyjCMqQmByLB1wHoBdP6kaq6v5ndLLDwrIdC/HPEILHHz\nwQFZHDUTp55pBsRgbNpysQXs6bEkKlLtZjKmmZ9kKz4gnbGLtlRSFH+hUVNg\nnI9AejrjbgfKTAVfGfKkH6Ba/hkGN1jnu9Vjhzex61B6WiVeuxOvZyvTpSr+\nuco+\r\n=HpD3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9MixMiAN4ZKyxYIyWBKSAqPmdePsexq8u1NyhkKw8tAiEAijXdYd4hu4wgbA67/EmFwgp9frgHBG6LBXrz7S4VCG0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-844b7a7.6_1573324633582_0.7932373102930907"},"_hasShrinkwrap":false},"0.6.9-alpha-7829b65.6":{"name":"graphql-toolkit","version":"0.6.9-alpha-7829b65.6","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-7829b65.6+7829b65","@graphql-toolkit/common":"0.6.9-alpha-7829b65.6+7829b65","@graphql-toolkit/core":"0.6.9-alpha-7829b65.6+7829b65","@graphql-toolkit/file-loading":"0.6.9-alpha-7829b65.6+7829b65","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-7829b65.6+7829b65","@graphql-toolkit/json-file-loader":"0.6.9-alpha-7829b65.6+7829b65","@graphql-toolkit/schema-merging":"0.6.9-alpha-7829b65.6+7829b65","@graphql-toolkit/url-loader":"0.6.9-alpha-7829b65.6+7829b65"},"publishConfig":{"access":"public"},"gitHead":"7829b651e6cd721298223ba686fa38ba9f13da73","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-7829b65.6","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-63yLfvGV8xOpOwXI2RLukzutllAPgEi/DxXupkADMFMd42wKRe8w98EmnoAwdXii52c7ZgFr1Dp6St5aOO/GIw==","shasum":"6bf1776fe04a5adf105be6ced44cb9790c445f63","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-7829b65.6.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxxnlCRA9TVsSAnZWagAAoyAQAKK8+UbRB3usYNNTONOM\n58X69ZkGL2ECqhr57htbmtWSEV48ytylEY8e907jOus874WXklWzRGadyKwY\nBS3Gz8utXpqhafzVJfKUu4OtU84Je9xJ2eoHiDWhk1CBj1T+KvX/Pq/AknAM\nVpaprj0n7dAPF6eiN+MBAB6HEc+OC1F3jhcaYtSdd12MDqouslxdhEMjaIT0\nEdpjYAYrIrAWIjRuHTx3rF/rkJgU+rRK1pPAsi55vwHkMb72Zcpg2eLCQXwz\ngM7wOAZ7BfXMyZlAehwvC9DNOcwkTgIve8kzVMj1j5HT5V/f7dS6uFSqp/Kb\nDgRPMcY7e3wUknnqPsZBHxYa3ZWGMEN0/dqKqlqovj1aU2cfowAUU0AuHS1z\nPK/Cg9tg70yslu8xqeZKVtJUTOiF80CpetJhWbndlP7Kt98VF5xzoYOuwMfA\nydn2VxdqghVWxVcDnyZTFbsfumUED9iKnmTsp8GUOef6uMOeNy80fvkM9Tez\nZtpLK+dDxu8r8N5vQ3lx23w5/ngMQYRqrE1zmBdNXhfL81U7LehS2Vcyl9p0\ncTeV87ELdynoJ7rBFmND8hBxNfa+X0ObiY8ni52P/fJuLpp/v9QC3cvBjeqH\nUB9M5WQYb164kI/i3xBRCIGDE4S+xrOv/lmLqITEojWS/kllbgvMjGtCveez\nToB/\r\n=+Kun\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjEGSYdFIq/PKzCuH54W6wcJFFWD5R3lQUwnQDQYGoAAIhAK5cRIifxXKZub3KihmXx3hh2645jOcvZdS2s7C1MYhF"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-7829b65.6_1573329381157_0.48569128101360404"},"_hasShrinkwrap":false},"0.7.0":{"name":"graphql-toolkit","version":"0.7.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.0","@graphql-toolkit/common":"0.7.0","@graphql-toolkit/core":"0.7.0","@graphql-toolkit/file-loading":"0.7.0","@graphql-toolkit/graphql-file-loader":"0.7.0","@graphql-toolkit/json-file-loader":"0.7.0","@graphql-toolkit/schema-merging":"0.7.0","@graphql-toolkit/url-loader":"0.7.0"},"publishConfig":{"access":"public"},"gitHead":"231c8a79f3a6de1df681a1f2ed0a48fdc433378c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.0","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.18.4/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-w4cKFJJgrPYDL4D9NjmT9Tkmq2VjV6GaSD8/RMAQjzjVwYL7JWn6pgC07HJ3kZuJzxSzmc4UIdxf3U8xQJynEA==","shasum":"de5eb8c9ed48f8e00aba0b0292b0747c17034e5c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.0.tgz","fileCount":8,"unpackedSize":10560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyrWkCRA9TVsSAnZWagAA08gP/2Ro7p9D0BM9oxoDqJQJ\nCQ1TwcjcEwecj5xnQKSrNkVMeOo56TJqlZMsZT7AZ237Auj7BnplUAb7s87l\nVHycWvrhWYH7Yhwm7jEFVg12j6pl6tKG8zEeoDQBxPt/lWOIM1Pggz69w2F3\n21QImdYSDxLANVucar2GTGdw2BksM17eOZv3PtT4imHCq50GI9qSX0bfGtr6\n9HXBBeWTfg2C7KD0JvrK82Mtcz9OFLVk25CF5l7oa/OLdV0NvA2SqjFGVevr\n1Doia4k9XUIuGAmUwJga4aO3OoIO+asHzqc2Ogd6r/jEH/Z+54UTI6oj4WRY\n2LtxI/DGoOgLRRItKQClJyFCwFCUIoX1nMGRmK0trjjtzCe80YDtE/SjYNuL\nsXCL92TC6EHtCLCuvaSUghXBP2TQ9YlAptSOA+Xe35aiB1w1jHzAScQbAhcr\nwNKnE8JumzeosksXKjkEvWmETnu+W+WldfJJaAg7nAlD85ZnKvZKCqSWdTs5\nrP1zMiJbqdWKZaFVJdmfY808xc1Bmned0W6ezmb76T22acYimFmghmwJPBTd\nmtQdFFP91JJyV2c4IqqPA3AMCKfjllr6yJxWdua0z/m9jeru9CJKFpm/nNSe\nSaTM24JiYv0R5TCLdCW/sjydEBDnJMTzf7mJJqnZ2/XDYK5TfKnXQ3+GGdY5\nL+o7\r\n=Qx1Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCB/35Emih/V0pqx12ztlBccDI5IKDQICOFP0HPKsb6SAIhAP1tOmB9JZw+53ixr6p9neueMNRGrpnWPfzkjxu/VvtQ"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.0_1573565859868_0.7560368015539718"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.6.9-alpha-2e7d252.7":{"name":"graphql-toolkit","version":"0.6.9-alpha-2e7d252.7","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.6.9-alpha-2e7d252.7+2e7d252","@graphql-toolkit/common":"0.6.9-alpha-2e7d252.7+2e7d252","@graphql-toolkit/core":"0.6.9-alpha-2e7d252.7+2e7d252","@graphql-toolkit/file-loading":"0.6.9-alpha-2e7d252.7+2e7d252","@graphql-toolkit/graphql-file-loader":"0.6.9-alpha-2e7d252.7+2e7d252","@graphql-toolkit/json-file-loader":"0.6.9-alpha-2e7d252.7+2e7d252","@graphql-toolkit/schema-merging":"0.6.9-alpha-2e7d252.7+2e7d252","@graphql-toolkit/url-loader":"0.6.9-alpha-2e7d252.7+2e7d252"},"publishConfig":{"access":"public"},"gitHead":"2e7d2521f2f120aba1286a5ac5bc795eb693d3e4","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.6.9-alpha-2e7d252.7","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-24ir9Yeb/qeKhsMK9RrT+NdPqoUkLyAcsj8B2CFi9e0uiC0CLfBQQNPHbtXHrXrr794DDqvuw3r6NP4QDbDVFQ==","shasum":"40e64a0b97cc4ab261a04ac8f82190f619777682","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.6.9-alpha-2e7d252.7.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyrXGCRA9TVsSAnZWagAAB2wP/jamafHJCjw4JAuJkEVF\nu4mihYSaeqEewPTNGgJgfMdr8b9iWQUUujSCKAz/DvOEkB2ZnkbQaRc/jbIU\nYkC+qcm8n6EB3YASmCdsHZWh4mdpeE6d8p9PsnGezrTPavWvOe+WLwGbAH1v\nc+F/PNerSbjtqqhpEGrNYX3li26+tgLBdlEE4Tse9byWNk1j3XYpZjwVlFTC\n8/1n6DaH6IB2cO/ZeGX2Gu2MapZjuVzz5+Uotnnw4SfQQt8YY/X3yj2HYOfj\n6o3bJW0a/tZPIbxUj111gvkuNiKu/bo+W9oXXsa7drfW+QWt2eiSIhF539EH\nMT14ub4L6RjU9sou6SPbb16c/2uYSaN9USbs5zToshuE3LBRte61FSISMy7z\naqfv9mag1ZYqApxNOzK5uAwcxpgrVeqjVe8sieMariMloeZeQvvPhLuvBMMX\nF8MAvLVjVTzot1GcURNgqEVVwe8G5TSdJISSSDuKlJHz8RPsYmuW4q7B4ZWb\nDmIxOBia/7Z0Wce7QfUL11iHBckd7EtseM3ExhgcwIhIGEbhgg6aXgUgMSXa\nAouUtkDUgNkW2sC384n3WNlVfsxtd496Res2eceMN+s1ALDj2sVF3qhppeL/\nM5dv3J6jYJcMjnhzF8D0pVLhUgoRUTZDIQ7c+vUHqpnMcpMUwH4ZVFqRJHi8\nHnFI\r\n=gIvp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDlpYBCLDbi/rD1npNllq6J9x2sXuZ86ds0jR3l5JIOQgIgGtqBPKY8Ik2p83dSpvmQ/cSc83XBT/2vm6VnCKTFagw="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.6.9-alpha-2e7d252.7_1573565893906_0.840460101385561"},"_hasShrinkwrap":false},"0.7.1-alpha-231c8a7.0":{"name":"graphql-toolkit","version":"0.7.1-alpha-231c8a7.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.1-alpha-231c8a7.0+231c8a7","@graphql-toolkit/common":"0.7.1-alpha-231c8a7.0+231c8a7","@graphql-toolkit/core":"0.7.1-alpha-231c8a7.0+231c8a7","@graphql-toolkit/file-loading":"0.7.1-alpha-231c8a7.0+231c8a7","@graphql-toolkit/graphql-file-loader":"0.7.1-alpha-231c8a7.0+231c8a7","@graphql-toolkit/json-file-loader":"0.7.1-alpha-231c8a7.0+231c8a7","@graphql-toolkit/schema-merging":"0.7.1-alpha-231c8a7.0+231c8a7","@graphql-toolkit/url-loader":"0.7.1-alpha-231c8a7.0+231c8a7"},"publishConfig":{"access":"public"},"gitHead":"231c8a79f3a6de1df681a1f2ed0a48fdc433378c","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.1-alpha-231c8a7.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-YENOS57ukonvgvCebWRUSSAkK+wY3Y0AFQDgYUJpOl1bSP20QGzHFzL4ftKb0/AjLqhr8aVFROy0uBIm26TPJA==","shasum":"1faf59022b060cf164aa1d184242147c20e72c56","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.1-alpha-231c8a7.0.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyrZaCRA9TVsSAnZWagAAOCEP/2LaZs/drIFsHyDO8rkJ\n5nxcVo8YJrEoytxiP4zNBb58pbdiSR2MjG6GeZ+moIifPjowhiAP68XbJGpU\nnVeRVp/dHHrIUuJR3+SFuZQhLmOW6EsSOOwzLsf5XK/DaNegcdaQQOuLPAgS\nW8XtrFTMe1Ofiq8XhLdx9v5SPiaNBXl+xg30UknnPfORewVYX/yuD4iPVBkQ\nzA84LRFMSqlCxgXqQ9TKw4Uu7SebPCYgcNuyl8nNZpXZ5OtrLUFgCfwli4sw\nC2ARCwv7B83J17+vzOLb5C8KIB1fVTwW8klMOVYLKfgUMjnZEV2QasGCscIa\n3OUDYo5cr4Bh+rqpvv5K8ybEVLnZu31ZWlBPU/upa7i5U/4biuRq5HV5cHVE\nEZq2enNAGVbJcTOJ3jB/8zJRs8u6+vW5ND2HtBDNovWJ8xo1jfbjLOQsRPxQ\nIJIt3Xg0ouml21FLwIb/KhmyroEP1dijVgQ8eVSxlMPGvmZvmaU3o6/Erg/Y\ns3YfQNEfM/bFYYWel2KtYsDKd1EFRYmqyCBSw27RkFhMWb4atwIGDB28nlet\nR8BeaVTEypMnY/g6R3pLn4MJyQqfD4NVbztCXhTZg7RSiZpEuvKN1ACbEMY8\nvNdIa0bkb0xlH/p0gY1Z2p+o/fGazKW395mULFcCYVE7BupMCY7zM3pGg2yF\ncYLx\r\n=Z4SN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFezOCGpDViJoejVD92dH4qw9Y8Su8yA+m32QnpOqw5IAiEAz6n3Ar9s4BBu/TxjFf5Scj0YPUQPZWkwsysrkHaQ84Q="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.1-alpha-231c8a7.0_1573566042354_0.9964222773565579"},"_hasShrinkwrap":false},"0.7.1-alpha-98b1946.0":{"name":"graphql-toolkit","version":"0.7.1-alpha-98b1946.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.1-alpha-98b1946.0+98b1946","@graphql-toolkit/common":"0.7.1-alpha-98b1946.0+98b1946","@graphql-toolkit/core":"0.7.1-alpha-98b1946.0+98b1946","@graphql-toolkit/file-loading":"0.7.1-alpha-98b1946.0+98b1946","@graphql-toolkit/graphql-file-loader":"0.7.1-alpha-98b1946.0+98b1946","@graphql-toolkit/json-file-loader":"0.7.1-alpha-98b1946.0+98b1946","@graphql-toolkit/schema-merging":"0.7.1-alpha-98b1946.0+98b1946","@graphql-toolkit/url-loader":"0.7.1-alpha-98b1946.0+98b1946"},"publishConfig":{"access":"public"},"gitHead":"98b194613b2569478bdf58d9c37a9b78fa43c757","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.1-alpha-98b1946.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-RvpQ9gSQiFf7ETnqPYc6440opJNDVoWG8DhNGAbggxNyZXn/sewjnZLAkdaFsF+JxYTqRDVO+/JD1bUVOt+GiA==","shasum":"aa6578a005d25ae660bc1277a8b1aa3cfedfdb49","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.1-alpha-98b1946.0.tgz","fileCount":9,"unpackedSize":14884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdytIjCRA9TVsSAnZWagAAvv4P/3Q6RVfRYYeuGDJp3o+O\n/tvJ5ZcCrZQB2elj+PDJLmWGs9t6hD6oOKflf0ym8l2ATdC5ogJu2ad6GUk2\n0thF1EpyH8o571wzSaV4CyjHo1q5+EsAMIkSdJgm4z0PBlKvSu9omTiFLrC8\njbvvg3CfJL0iHmP/l2ZsC9poIlTglf982F/whwX6AsE0p2aRsmoEfcHBp4JN\npGm4kseTuvK74yMRglLNNVC/uc/xfgJIRBFHdgnKuCBmtX4ZG8oFec73uhUz\nWJ2iqTIJryCl3MoPNDei3pKaKo2GHpXgLlf7XP3c9KEtrJfTwiaNrIDqYcGA\nSJs3wCgD/UWVJIMok6Q0yV9V6fH2r/0dj1hVtzNItKA3SCV8KR6GLzYTd7n3\nvT8RE2dKY0hf9OC9A7LQxKwChXZNY8XyTCGl3wtfovsBmd7dkh+lv1hGnr8s\naft41TePksxMChzFipwKdciYlNgZRt6G8bN+vdh+0eoBNteXal24c0oTIfdK\ntTykArvrb9/nYkx+EFDtN9rT5zp/C00YtNSucCPgM/A6Bb6jZ0ohgt8tuozr\nPTkOvCVv8c8l5ASOWZILOvIaScBifwlmpacmlw/7h3cJXNK/q74HsJ1F1GLj\n5vnGLHynzoSdQPysHmsrT3/4zHRWijFrrGutgWEhPfN24vYBPPTFY6mKVwuR\nLzgm\r\n=ZtKJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaMXenRgxBcrRD7biMVB38vtv8hYrjuDcgevbQV9VgrAIgYyTp58mXgcJoPUILVWIsqPWxVZKrL5cn64/JTV0+L48="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.1-alpha-98b1946.0_1573573154849_0.6177098135985011"},"_hasShrinkwrap":false},"0.7.1-alpha-797c3cc.1":{"name":"graphql-toolkit","version":"0.7.1-alpha-797c3cc.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.1-alpha-797c3cc.1+797c3cc","@graphql-toolkit/common":"0.7.1-alpha-797c3cc.1+797c3cc","@graphql-toolkit/core":"0.7.1-alpha-797c3cc.1+797c3cc","@graphql-toolkit/file-loading":"0.7.1-alpha-797c3cc.1+797c3cc","@graphql-toolkit/graphql-file-loader":"0.7.1-alpha-797c3cc.1+797c3cc","@graphql-toolkit/json-file-loader":"0.7.1-alpha-797c3cc.1+797c3cc","@graphql-toolkit/schema-merging":"0.7.1-alpha-797c3cc.1+797c3cc","@graphql-toolkit/url-loader":"0.7.1-alpha-797c3cc.1+797c3cc"},"publishConfig":{"access":"public"},"gitHead":"797c3cc5f7a7b891acac86eb599f8f80faba4bd2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.1-alpha-797c3cc.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-jjwJTtbdT6q0NCTBxNe4Th8tkoWKdho6r1aJYxHxtQovaUpXNqtKkSaxs2gX0YRGPH7M4CiamLDeIg0IkE9bZg==","shasum":"732d0049d2eee2c6a444064fb69be627790d4a3f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.1-alpha-797c3cc.1.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdytI5CRA9TVsSAnZWagAAgdAP/j4OyikPOEiVER4iwuRx\nLYdpdBNkl0l+TP29jA1qq4rDCB2RmiSpzQPm2C38ztYg6Hxxc5cQef+P+jU3\nlPex+uB1FeyiJPHDkVHCcorgaRNZuzlrsrNe/vZPcU6/gLc00OISSbQKKCh1\nkP+gM6JrZTxx1+pYa48Y6jOHozK+MRQ4B2MxJbV/q3I2R0xhEIb2YIZoxZ7q\nxl8KRnL0f6nQ6jlDBhNRohnBywE/J3JfaRgPc18lqlzrShccTzyM5ZaETgKG\n8GTPjx+/V/0SKYy1JsQu7043U8STJvyH5JGlG9ylMiCLxauKCMwpoND/13iW\nelb89uRmPxgw0gmi6v78e0SFQx55AphwAFQ4qesLvIHeQ2xuHQZBKzqTV9xg\nR6YA35cgtnyfSFpm9srQLPVCtwsJEPY4589qZVxwoInuhoy+qUDnFpHUbdyr\nlnG57vv2ZE6rs4XDbtp0twbQqBM9SHtFKb3z9qKHl8ajCLItV+yNn8xgBWFV\n/64bh3wHHLm/dhMe6qaRJjkd9m91iBKtzvuoCjurhDO+03Uupd6decW0yVh3\n9HDoaFg9KfTnbIz8/A0s1rm5tYOOsb+qi5SwBiRbs9cqXTc+M5bIA9Or+sUb\nAZO/xjqmjtaNfPgG3ojTfR/JaqbAkBGPvJ2dDw4kuYSvbN//Wk6vAZEbJ0kD\n9ZTw\r\n=WpNV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH0Q6D9iAVTE1L4MVTRO6B1DfDY1fGP/AKTLuh4x4JU0AiEA8JV5+Z1lmLG2nlugYSzBWK8UFWMEBOj7MhzJyuwGy10="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.1-alpha-797c3cc.1_1573573176924_0.8971250750360942"},"_hasShrinkwrap":false},"0.7.1":{"name":"graphql-toolkit","version":"0.7.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.1","@graphql-toolkit/common":"0.7.1","@graphql-toolkit/core":"0.7.1","@graphql-toolkit/file-loading":"0.7.1","@graphql-toolkit/graphql-file-loader":"0.7.1","@graphql-toolkit/json-file-loader":"0.7.1","@graphql-toolkit/schema-merging":"0.7.1","@graphql-toolkit/url-loader":"0.7.1"},"publishConfig":{"access":"public"},"gitHead":"0c3da6c10a43f5625f318e77aab31dbad571966d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.1","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.18.4/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-DzQ9LD6hXk84XPeWECAcJBqkKAiyAj8rAKfotWAwKzGCX6l9qvm60Ovs2vrKRklm1Af+nZBXBRpOcsKypQrwXA==","shasum":"043dc7fa13a9966c1453ed8fcb7a0ce0cba310df","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.1.tgz","fileCount":8,"unpackedSize":10560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyt87CRA9TVsSAnZWagAA7LMP/jsGgQtFm+TEZ07JAEWq\nl00EaoWJxOW71AVp7GjsebMjXu3K3HiAulIfXTbeSkO8ZhXKn0eoATIeQi2H\n76Qp5y6kMBfNJpsAmXDt2jnMkrscjeNyLcq9sT6G6HYE4kQfbYGffzQO7Osr\nTanAL9XZi4/nBowqgEnW6+/hm5tlINNSNJwPiHl45tgt7FRHItm5m/Ugqqw3\nbldsT90xuSs1q4UHUwdF5LKG59+txcGM2Hnn1qwmex1UFgh2S8Z8WCC6jPdo\n9Boi2vzWLrG1WwwBiEfGj1gF1/CCm/GypcajyEGfwQ6bHg2WWzjNe5Ueeqan\nZyDB9of6mNNatHlPSwR7mWUWtLivq/0mSjiYC9P+RT/O2NfTDKlcDX8vG4Ut\nLF01YXZfzwlDXsP+3UOETTftgkYr13IMhUeyLhKE8EutbCKfj4ApBmpr00E9\n9tdxDmIMFwcTSv9p2dAqbajVVV8Nf3G8V8JOZzLqkOeslIIdj78P3wW9QGN0\nQ/KKAT/bnS0e0zpHs8B3NLLtR7v/WESZgPLOC7kMR+/S8DjW+nTN46cLBkcS\njySwSDnF9HDx3x/7BaKxRTqlwkwE2AhHloHRQg82rJ/eBnoTVGgLFWBv8lZg\ndLlm/KYhqyU4uAMC2uuvpB2HzXXG8tYFU5UrDn3WEiPvgUjwq2XLP+FaXprp\nJ0nI\r\n=BfQn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGLXFDFlwoNGSdp6QjYfaUjzkQeE+0IubT3m2lHukalAIgdXcyoXNKQPC4McDDFkTyOt5RpsH/2bWGJcD1CVnui6Y="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.1_1573576500413_0.4993372505413538"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.7.1-alpha-8927690.0":{"name":"graphql-toolkit","version":"0.7.1-alpha-8927690.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.1-alpha-8927690.0+8927690","@graphql-toolkit/common":"0.7.1-alpha-8927690.0+8927690","@graphql-toolkit/core":"0.7.1-alpha-8927690.0+8927690","@graphql-toolkit/file-loading":"0.7.1-alpha-8927690.0+8927690","@graphql-toolkit/graphql-file-loader":"0.7.1-alpha-8927690.0+8927690","@graphql-toolkit/json-file-loader":"0.7.1-alpha-8927690.0+8927690","@graphql-toolkit/schema-merging":"0.7.1-alpha-8927690.0+8927690","@graphql-toolkit/url-loader":"0.7.1-alpha-8927690.0+8927690"},"publishConfig":{"access":"public"},"gitHead":"8927690e0ce3c6348b8c57023b94a3f822eef3e0","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.1-alpha-8927690.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-4L5zs2BhXRZOueoVHWxb2YwGh6EZJBaDDDFseR7wfKUJraWrPa+uotB9VPj7mUsRIJZ0X9DRSK8OGgFPR80Bog==","shasum":"e621adebdef0ff86fc0dd2dabe4b7f6594c0ff0d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.1-alpha-8927690.0.tgz","fileCount":9,"unpackedSize":14884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyt+kCRA9TVsSAnZWagAAMkIP/1J4Cb6O3by/exqnxeSX\nK1f2ZlQ7g52lzYzQiXYabbADWE8nwcqwHOOaPYj++fL+0XM77CJ3Yb4KAQEk\n2Shz/VaaStNSx8mEE8fC4+6UrhWCEaxhFhuFxQjBmEA9vn0smPbffpiUYWrJ\nmf83S5iVRYiQflx7qD13J9hmJvp+hnMEwUvjQK1FTdXk4O7J8Pe9j5TzEDAT\n2W/1kc6wPOeUmzu+ObOO4sYoDuM5sdPyTshiRd2IZ+S+GH6LdiBQrwbVYrs5\n/liagWXEZWP/oqgAPob1oFTgTRZMltPPLYh9937i8WsWOKTHfPJ8oO4yYpOM\nFcFWJoHvnkg561rqcFzVLjt/pOl7PeXJWgxksyYkVJWAvzpP4qpalSBjU4+W\noqeSfNA8mMM7iVeD5FL5h9Fk2rddZQX3igj2cbwWdGqWf18rKOq9QjR7OkzQ\ntulCLmmAYyqMqrgl4v7hzeZP9+l4owwkfy+CGrrmqkKCXcL+tBQ8gXcfmles\nq8TMVOUlJb+mmvD4mw9HNFk0LHfv+kddyzUp/IGidcFrJ/h2pvH/8JwC/50Y\nmzl4Ktn1m06/NFWgnVlZ1kviKFGPNMxqiyuPYMWKIlEp/ivNwqnVwdHMAeAA\nzT6J0s4KlKvq8tZRBb+iMoTh+GajJqt2DSGPvJ0YgabxGMvWVMu51svOJ8xm\nUxWD\r\n=OKpe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDP5WbqlWfqKk0GHJOSKPK7hEeSLJ/peZpoggF/SkkOCwIhAJ2B85m9KJQEaRhxJpI/rinp7dLaPqN+VIdxR6cM0Bqv"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.1-alpha-8927690.0_1573576612294_0.4821238284759708"},"_hasShrinkwrap":false},"0.7.2-alpha-0c3da6c.0":{"name":"graphql-toolkit","version":"0.7.2-alpha-0c3da6c.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-0c3da6c.0+0c3da6c","@graphql-toolkit/common":"0.7.2-alpha-0c3da6c.0+0c3da6c","@graphql-toolkit/core":"0.7.2-alpha-0c3da6c.0+0c3da6c","@graphql-toolkit/file-loading":"0.7.2-alpha-0c3da6c.0+0c3da6c","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-0c3da6c.0+0c3da6c","@graphql-toolkit/json-file-loader":"0.7.2-alpha-0c3da6c.0+0c3da6c","@graphql-toolkit/schema-merging":"0.7.2-alpha-0c3da6c.0+0c3da6c","@graphql-toolkit/url-loader":"0.7.2-alpha-0c3da6c.0+0c3da6c"},"publishConfig":{"access":"public"},"gitHead":"0c3da6c10a43f5625f318e77aab31dbad571966d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-0c3da6c.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-4Ot4LtK41SRz9jvkZmoQDrGeR/EoSFzjiLJYwQJNchYG0kV7/ugQzEuemDOcrXkjYEQakoMgCBN5/dVMYkO7jg==","shasum":"69a1fb8fa04b72aa47a5602353ceb16ae189ea7c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-0c3da6c.0.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyuCFCRA9TVsSAnZWagAAKT4P/A/sKPnnuRMWgsK2y1rv\n+bTaBilmvWNdMY3/3YVjyuMFdLVH7MRgs6Wg5fqmuzdMqPFUFck2yW5WDoVZ\nwWa6zTDIlP3GO8gBwMI2kiRZIOCUODBcvWART5IKWq8pVeh7EV+ILDB2sBOj\nGNO1+LcUVPrcy6D9/6wNHPl6n/xbaB1uvWCKi7fzWepct3Tzg6kRDXEiaZn5\noj5N0Mzo65xWh0p473W0Rp0IIusWrF/22kCyheHGGuf+YFP5Udf/nNuka7C4\n0PMe0ZISwzTQqQXj2fr85MdfMpqJcEo/6zqcEVQRxWEvz/GGnc3u7QsgIPO0\nEfaJ2vPK/kkD5qV57JXtvImkhbgPkuXrGz9VnwyoPry/0KrjW3dDhjfmfbvg\nhE6q8d7By+Hj7xTnztsIuRrT5cEPzrdvzhmQ7W962DXgFH6KnwM0JGSnxdoX\nwo8vK7XRM5/vWp4VRgf8IBxw5xa2y8UK/qpRSESFvVQP8Xt8ZBb8ddRtPLq0\nTYROvnZvXsfeFxb9DQdT1w0tYQzfEcuHvqlv+1bl77S+BeGjh1ZNE9v7APws\nCFcDe0vamX+f3SWMEr8Va2rIckrfGgZ6lPu4+b0PIfLCti0owKeB6bxXiTyn\nGdRX8LLkBErwivlVMl3Q6cZoPXwfkj38O6k/XTZgEdOlJSNCvSkDtiVU9+sQ\nwZ5Y\r\n=H8iX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIErPrlqHTgAbSQzvsF1j94CNd0OrEkjCw/YNW7h3dHJ1AiB83Gh/PY7qWsiOY5sLb4681AHJ+NB7mZfOAdLmWXNOuQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-0c3da6c.0_1573576837155_0.9412807369194858"},"_hasShrinkwrap":false},"0.7.2-alpha-f53817b.0":{"name":"graphql-toolkit","version":"0.7.2-alpha-f53817b.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-f53817b.0+f53817b","@graphql-toolkit/common":"0.7.2-alpha-f53817b.0+f53817b","@graphql-toolkit/core":"0.7.2-alpha-f53817b.0+f53817b","@graphql-toolkit/file-loading":"0.7.2-alpha-f53817b.0+f53817b","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-f53817b.0+f53817b","@graphql-toolkit/json-file-loader":"0.7.2-alpha-f53817b.0+f53817b","@graphql-toolkit/schema-merging":"0.7.2-alpha-f53817b.0+f53817b","@graphql-toolkit/url-loader":"0.7.2-alpha-f53817b.0+f53817b"},"publishConfig":{"access":"public"},"gitHead":"f53817b5c75b7d5476fd1a2ea7de9a9e5c047662","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-f53817b.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-h1TE6wNWOYkrUmpFfHrmsGiG+3/wPmkfLLXGo2oTbJmTQzU5HXEVXdgUKGX9NLViqa/t1JL/GsoczkWp2s/BKw==","shasum":"f372dfaa7e91eb554cef02a6822d9cf94b444353","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-f53817b.0.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyx0qCRA9TVsSAnZWagAAaFoP/3DyG3xVO0PuE/c3kfFK\nIeqNAkpGEOCcJRHCfI8RfS3hhg9sdgGN3Sj5UNf2SWciQT/D9yniwC71nUf4\nxAdDvc5TZrQZtWVoFjN2v9MTJF4nBae3wLdU54AMWAabV/vc88EEaPJ1wffY\n3p4CinM03ShX6tN7wpPOnbzQwEpwVhSsW4XVu4M1RIjux6XdPW0pIA/3jgpE\nDjd9LKi9t5nSg5SYL0XDYQbUJZLSv3mKeJdhvzDQ8n4HxO0QYubpCgcazScp\n8TQmPclNrnPftlE/6XxIA60uyGnvX6WimX0EI0Y7neCDVf4pBx48tt7zI+xf\nxFTqtDrrT1lxe4hTjLzCn1AvyXBWt9zHLohVOM4Uc4DkAmFO/EFhzk4NlGlX\nsFrIsXbyYO9F/fneiQvaXeC1LoOtS+xrhyWUYyyLSLZ0E/u8buhgzSA7M2QR\nBUFhW7XPHbzfw0LFc/UlHtOG7U2SMwIKTpdXOTdQLFBeQo5xbPfF7byCgVkI\n+FdAwZ/W+9J5ZGlwJcjW4mI6IwtM4DHUmOFPW8hVN/D9Cg3eausAFj1F+A0R\nZPa+mvcmT7ZLEVJdzGYEESWenph3zM2gNKsJQ2AHKGhx+PkWhlkVca2vH9Wl\niw/JW11v6H3bMtW0vrgsf7RCkBB6QIG7nQz3zJ2//C8jR8LqBrVx4w0/roAH\naoWH\r\n=RJ7w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC84HSTRrPsV5bltmTtJovHlUR1G0qTtPs/7NscnjAJ3AIgI3fIqW8tOUb2zr6C0zR7poyfi99e8y8Qq/RgbwQeYQU="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-f53817b.0_1573592361859_0.006108923268306254"},"_hasShrinkwrap":false},"0.7.2-alpha-df7711b.0":{"name":"graphql-toolkit","version":"0.7.2-alpha-df7711b.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-df7711b.0+df7711b","@graphql-toolkit/common":"0.7.2-alpha-df7711b.0+df7711b","@graphql-toolkit/core":"0.7.2-alpha-df7711b.0+df7711b","@graphql-toolkit/file-loading":"0.7.2-alpha-df7711b.0+df7711b","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-df7711b.0+df7711b","@graphql-toolkit/json-file-loader":"0.7.2-alpha-df7711b.0+df7711b","@graphql-toolkit/schema-merging":"0.7.2-alpha-df7711b.0+df7711b","@graphql-toolkit/url-loader":"0.7.2-alpha-df7711b.0+df7711b"},"publishConfig":{"access":"public"},"gitHead":"df7711b479b378b7ba143a6fce5d05a6c71c7dc6","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-df7711b.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-vwKEa9pQH/Rd+C5nT1pQ5or7d94B/Y2Vjin8xqmfgVSMKPfBiVUqSUq0tzLDOfNho5mSKuQ8MaTZ15ycGvglXw==","shasum":"249d2d27770c3cd06f3075bf7b64762d3b3298de","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-df7711b.0.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyx/XCRA9TVsSAnZWagAAkngQAKQNA4CyUJB2KQUkyI8e\ng4A2iNCRdr6PFMAD1UsdU7mQNBScUTqsN5HLHzA/AmNHmzzmcBh9wBY8eV1E\nF6UtbDOrdHosMD65I4aCL3EcXh9NCJaPLKqE7Am6+DLlTMcMp71BrZXDuOI6\nHts0k/axL9SVj+o+zOosL6WnpR8U+YYEsL9p/llCiLRPq9hJ5QOVlb8eD79A\nPl3P+BeGTr70sjuizYxCJL1Bk1b2ujupEVKKDdVOXHyCHcnr5ZyLaUgK4kq3\nDav9LrX/QUCNDMmgj9xhpS0qPXdTBxSj6UJJaGVIyP8V1/B5W5MC9tg4Eky9\ndlbA3iJLk3VTLAqqr/f2azH5vAr4dZbsECNPC+omE4ahrx2023hQmCIAi6Om\nXdTH8VwTLh4xrGU6tHkUaSfIFL0eaDjS7jCXrpInXlw6MskFLJSAI8bHXFGZ\naoaBZMe1TaP1JLlf5KsIxP3DO2xuWjlAwN3pq+TpaS98JliqgkshlAI+OiJG\nHNGxsS8p9B4NANUfWuT4d27w1+s+zec1962wWYN9W/TyFXJhzvPJDkSu2+gC\nYYltjD2/OiWkfmJi7ZsoXXtJyWcQU7MLrkCTIilfDlxKxqkWvztO/xfz1yFx\nU1VpAP6903A3x+XvFumbVEnLyFdHgfFE3q9faZzRG+Z3GJL7apc+Z7ck30gE\n9vyh\r\n=qKcH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdDgOtoXKetl5FquGeo2rF2/e9BvT3pJUt1Z0Qqq8/ywIhALBaucF+A9lbohNisponxyLWa26MIwBJaxlhIasimnDd"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-df7711b.0_1573593047322_0.2382643709366854"},"_hasShrinkwrap":false},"0.7.2-alpha-e352388.5":{"name":"graphql-toolkit","version":"0.7.2-alpha-e352388.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-e352388.5+e352388","@graphql-toolkit/common":"0.7.2-alpha-e352388.5+e352388","@graphql-toolkit/core":"0.7.2-alpha-e352388.5+e352388","@graphql-toolkit/file-loading":"0.7.2-alpha-e352388.5+e352388","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-e352388.5+e352388","@graphql-toolkit/json-file-loader":"0.7.2-alpha-e352388.5+e352388","@graphql-toolkit/schema-merging":"0.7.2-alpha-e352388.5+e352388","@graphql-toolkit/url-loader":"0.7.2-alpha-e352388.5+e352388"},"publishConfig":{"access":"public"},"gitHead":"e3523888530f73b816f1147a3d3287b9578e1955","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-e352388.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-+uUBnbGb6I2JMURl9ewOgMFA/AZ9QfNHUIjp33SqO66vnF9c4pIXxLgqcCFv1+r1KYii4LxlbZIHhc/e75Ek+A==","shasum":"476434e898208a28b25a6385e32114ed93ef899a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-e352388.5.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy7n/CRA9TVsSAnZWagAAV3kQAJZIidR6R6sRM0jDMfcG\n9FwvOnB17UwMmG3S3Asrpiy31/R4d9sXAIMzA/jTefttVMvBnOs9r0JxmAif\niinPFdUpwyO88YSzuDob+xVSja9+VRInD/SilAT5/tMd1tuMeM9cdTcBeNO7\nVKahov9Kene2V3a+llKFG5wuuMzTJSm0TwCOYJ7wqBZzbK0ePjZqqg0dsQPE\n9MfJ68kH+TOPLtpjaz+tZhnxqPKVcqjKWyEbJqJFGE+dOTwkVXwcfaHWKUob\nprRO6u6u5vGWiwBohCU2ChOhmxuRbjoR6mxT68CL5CvjuvURtr7T8xl1NIFH\n47UCO1bTzhz3V1U1giEGhUFAcSB8c7UpUgmhf943kPMnYo443+l7Q6mEXgFE\nZyss8ShZcV72Qw4hJMT/VBrEcHKa4gXyJd2Ivw3uEhQpXkKvTsTOpZ57oJzv\nGAvKWEnYWLPTdxqm/m9mGw4U1dpa1M2ZSYsh2Vld0fvrUHh4b+FJkCB9puC9\nHsd13nLcQwF7P/HN8NMFDAhISvUqNlA6v7NINVP/RWUy9GNSgKlpu4rmIOv4\n0dyTUiVVZO5jFeBuy/BIIEHO6t9K4f1/kRu6oQJTZ2bV/Ql6k49/oVGHGr4Z\n17mIP85R5subuMdIG9VVpRkkdZefCo51NNT5vWkWWG1mzTMAl+vJkI6nKc9H\nMtlU\r\n=mfMl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICNtfmw3KEtA74ic3ZoIIdKxr2JO4Z6CmfN6SXCXULHrAiEAjhiahFCKG250Gu+qqJWSBIe9b/gvF6/W82N32N/LzlY="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-e352388.5_1573632510601_0.5002988538160644"},"_hasShrinkwrap":false},"0.7.2-alpha-f06fc20.6":{"name":"graphql-toolkit","version":"0.7.2-alpha-f06fc20.6","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-f06fc20.6+f06fc20","@graphql-toolkit/common":"0.7.2-alpha-f06fc20.6+f06fc20","@graphql-toolkit/core":"0.7.2-alpha-f06fc20.6+f06fc20","@graphql-toolkit/file-loading":"0.7.2-alpha-f06fc20.6+f06fc20","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-f06fc20.6+f06fc20","@graphql-toolkit/json-file-loader":"0.7.2-alpha-f06fc20.6+f06fc20","@graphql-toolkit/schema-merging":"0.7.2-alpha-f06fc20.6+f06fc20","@graphql-toolkit/url-loader":"0.7.2-alpha-f06fc20.6+f06fc20"},"publishConfig":{"access":"public"},"gitHead":"f06fc20dd81b0d838462f719bf790a7744ba201d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-f06fc20.6","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-6rLcH9AOj309hNDs/4THiq/tsZryx0cLeevKetZLe6rCKRiTWUPurdONegdLG8eC5q+nawxY0ihPFIRyd7N6ug==","shasum":"032b44bb45683c68b2b0d99d8415d1b4b14617cb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-f06fc20.6.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy9WoCRA9TVsSAnZWagAAfiAP/0YNjskJzKzKQoz1IMTn\n2vyYvipCZYnCa8DJ+3X9sJeoMIYHQ9pUhdSBc6riaZSXVR7gWClGqpEQIc0N\n4FH1548iI8/Aw2Ychz2MlchnVqyy7WlsQw/g6jpBb0AKqC3KiMHJE3J05K/C\nVNRss0CI0FrzPZwO9IQSHgFwUUFsg1lMmivpvWNBhmLBGX7OXOzswCxIEs8V\nr2TBPnKdYJdTjKCed579acxgvNUt9TOzsbffYcgyOzlARWnjKL/n7tpxS6Hg\nMv4I7xwbaXEnMYsZppPnPHtp6+BXdZ5xZSIt+e7YKjUoW9oLfVulpuJUt80X\ngVVBkIzHqDjNWtGI/UQVZcWos1uu88FRavRpgF9hr/HQCMO4h7MF6pEE/OL3\nEtnKStWwEMy7214qP881aqWjh0PMzDHQnREc4Tw3oX3Nj8/Xad19/yNOaJCf\n0afrvlSX56a1+e/LV+h0lTLvj9dpvP1a0eJaVPgd55Ve3WMgYlBc7TS3Ddr1\nE91/JuVFs3gayEk7E+ai2BwHwADe1dmEHObNR1Dq2fBYPaUncKTyisGKQQpk\nSgai0iyeS9m8/NSzhpBJBczcGe5mTpkE/ENxKYX95wjCkvR+ap5Nc5eyxa6l\nnYnEGPFlMvuzb2U12KaUPUtUHEsUey9BxFP9n2BLDIKSi551Sv3OHVfLK/xX\nF1MW\r\n=CjuS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqhiSjlEdhJTtdc2LjcVbYvxcNT+yZ0El2JjwSrq9CrQIgC7lmEbjMAsNuYO49wI8W9D90VqhY9QUzno2yr5/OBj8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-f06fc20.6_1573639591927_0.5175052278186463"},"_hasShrinkwrap":false},"0.7.2-alpha-5567589.7":{"name":"graphql-toolkit","version":"0.7.2-alpha-5567589.7","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-5567589.7+5567589","@graphql-toolkit/common":"0.7.2-alpha-5567589.7+5567589","@graphql-toolkit/core":"0.7.2-alpha-5567589.7+5567589","@graphql-toolkit/file-loading":"0.7.2-alpha-5567589.7+5567589","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-5567589.7+5567589","@graphql-toolkit/json-file-loader":"0.7.2-alpha-5567589.7+5567589","@graphql-toolkit/schema-merging":"0.7.2-alpha-5567589.7+5567589","@graphql-toolkit/url-loader":"0.7.2-alpha-5567589.7+5567589"},"publishConfig":{"access":"public"},"gitHead":"55675890361a0f58d10bcbf0f38a8d798cc50186","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-5567589.7","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-r5HUEAEZwhsjJomVN/K/msBPRIfyUx3A/4g3TxSbFciR/4npJYA6lZj/0ALhVU7Td1HAUL6wJKjXPJnAANMyCg==","shasum":"209fe98bd4e00c4a25e8fcc625976fa3bd572330","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-5567589.7.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdy+IiCRA9TVsSAnZWagAAbSsQAJGsklNd8L1sOsFH/KxZ\nXXXPwFMEgpEZhUlQI2EUrCGibjDRUstlLZ0MNKUzH4Qvx5GK5ct6bCMpEoCQ\nzF6+M7PL6oCVGPGt6pNbHkKp283BuzKwOLXL9xeKcYIURRFWWJL3u8UqVRuY\nTc6ls19ERYS9BqHBotpMaFhTAwGBoSFlZ7Dh1XfXYaKv/IdvHJnf4cpZGJha\n8gcQ97dvLdg78JMfxmG9A06rbLIWfzKBKmHBCfdTLqQWyy1aEOIXNe1MFtum\nCFRh+kheulLJnVSjNIk+j1GMdcd+sjPsb+ECd3LZIwT62J8R8GQM8SXVShuJ\n0mAwAXPdidZ2Q6ckUmClymcZCGxI87lCQ9Zk21xRSuSJmS0qeg9PPfdaR9O1\nsPWT2l22brdq/xSLeWv7JOySyCFgqIQxyup9p1xnPoRCGWy2pOmvezAfJPV0\n/+hTs5XQn7HzLot0OLv73TjAcqhJU5Lw5q81edxLF6lVPtODldOxbR5RTciI\nITuF7iP19dw67DiqzIPW8ts2GHJPLWcsDPmw3zRAS4JppO66b/5i+orziHUI\nxlZSbBP0SxWw/FO5g8EG5x13rr+ukDiirU9gJ49y+MqWs89j/M/4koswDMvo\n7AY9MN2wjbZR/VCxTqL2gxuK5QRDb4NTWumSElcliekDahHWVDOH7ed/V5np\nfnYo\r\n=q+tl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjtgAn2OuHKjJSw8/5rbL+MX6AmdsuFmlpYSgLhuqzgQIhAPhAS7B8SZx1pSIOuHu8cgc4ebKPZ0TlaG0zyP7yRA7A"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-5567589.7_1573642786307_0.5349158027453591"},"_hasShrinkwrap":false},"0.7.2-alpha-c611149.8":{"name":"graphql-toolkit","version":"0.7.2-alpha-c611149.8","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.22","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-c611149.8+c611149","@graphql-toolkit/common":"0.7.2-alpha-c611149.8+c611149","@graphql-toolkit/core":"0.7.2-alpha-c611149.8+c611149","@graphql-toolkit/file-loading":"0.7.2-alpha-c611149.8+c611149","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-c611149.8+c611149","@graphql-toolkit/json-file-loader":"0.7.2-alpha-c611149.8+c611149","@graphql-toolkit/schema-merging":"0.7.2-alpha-c611149.8+c611149","@graphql-toolkit/url-loader":"0.7.2-alpha-c611149.8+c611149"},"publishConfig":{"access":"public"},"gitHead":"c6111491d882cc74696775a5da9d35c367a0657d","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-c611149.8","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-mtQkotli9HYzmdsqSNyLxdtvgYq2OTKTb4UIlelaAXQjqS6KMef+txgwzrLOeljWwvoObFQYbA9WRFB0zhPlsQ==","shasum":"f295d7339eb4a7b8fc922e544b05481a2d4827c6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-c611149.8.tgz","fileCount":9,"unpackedSize":14885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzAFSCRA9TVsSAnZWagAAFLQP/2s9EW0zKvEfw4EcJqMH\n6rhjWPt/Gy3qUuJP7yAGEUv2jas85AdQa7XZ+L4dV6vuxbIxBn6Chs9BwO+v\nUZD4E5XrCqyRyuJFYKP8KmlUjGwjfM2uhmY6RF/yZPodUW7xtMMXmAHl4OO2\niiXq6vTxgfgGV7mD3GaV/9KLFINA/UhI4FgKUIRSSQGuYcm2c6HbkCE6mp7P\nDZ0L4cBn6Gebk5bY47thYgd/2f47yVcvPrOqzuXpBmSmgy5oRTQsZuxBfzdQ\n74drdv4wjea2kh+v5nWCvL1EmF4fQG0BvlNPepPV1H7LW74j+lqP9zBcA6V0\nehSZqGjvCd4Q6YAj8aJa/Te7rAGiGuDShTz2HZoZEwiD1eTtA+XKLBqIQwGp\nKxw27zTi8XjXwIxNXGwSk46rt5vYHWwddM2ge33coAUrMjT19CXpxKXnubqE\n6g24SALouzLk1oZLp7ECfhKUxzHSXi1Da2D/hQIhbjx0s2M2IYDLqizDlIG7\nKgWvIc5AK6Df9TMhS53jWMlr1Zauq4VbHAHF88dhXFSzKp0rNq9ZlyOU7FqX\ntipeiS3YKzl/JEC6g9mMmMCaYaoBfEmK2Y+pOgESLX5sUIERuSCmOZM38BZS\nGGHSkCKJexWo0x1psLmBkXSXfxutlYHidh0BZJu+qHt5jUZQZD2aScF8GVe2\noc2f\r\n=xd66\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFfbCBDIgO1k/oDSwzIdQtqA16M+GQ2wbRhRvjVYkr18AiB+I4cZMFDfi97NLdsKN1gumQ8OIC5NIoFVSdgNsRTkIQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-c611149.8_1573650769845_0.19153327449492896"},"_hasShrinkwrap":false},"0.7.2-alpha-a224fc2.1":{"name":"graphql-toolkit","version":"0.7.2-alpha-a224fc2.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-a224fc2.1+a224fc2","@graphql-toolkit/common":"0.7.2-alpha-a224fc2.1+a224fc2","@graphql-toolkit/core":"0.7.2-alpha-a224fc2.1+a224fc2","@graphql-toolkit/file-loading":"0.7.2-alpha-a224fc2.1+a224fc2","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-a224fc2.1+a224fc2","@graphql-toolkit/json-file-loader":"0.7.2-alpha-a224fc2.1+a224fc2","@graphql-toolkit/schema-merging":"0.7.2-alpha-a224fc2.1+a224fc2","@graphql-toolkit/url-loader":"0.7.2-alpha-a224fc2.1+a224fc2"},"publishConfig":{"access":"public"},"gitHead":"a224fc202d7239b4fce607e738b39e904ea119e1","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-a224fc2.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-cN/76XmGdycDPbYjodfouPrQrbGeZ0klpVb0h4W6KmwiUp4Uy0GbF4ZluYdchOiY3Ijur0vPLWucj/Fm8aO5cg==","shasum":"374ddb4c01833643dd45960e61455a047de34694","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-a224fc2.1.tgz","fileCount":9,"unpackedSize":14887,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzD6VCRA9TVsSAnZWagAAyd8P/i/TTCj8Zhg+/42ND43S\nj6bSGzfj0gh4FvNgCcUZaENhpzl2vlGTnWAtsFC7silB6I2m7N+FlLTTM1nz\nXrbinq0c6Vq4bCMmq3Y1QzQegUY03knAfdIMwg7UQsXb5j3h21dDbFUSa0N2\nYXPeLn3wCkp3bGNW1kYcFHQDP1E2qp6UAcuTjBVWaE+J13jINT118M5h+u9z\nJ3RBhza99cnkhkfddxcmanOiyASMEMRkUnwhEUnsiFRa0q/jPMvlHAQC+Xkc\n5w2lNFzpFiDksVO+7OW/XGZGTIe/Fsjv6thTfJWcHe7spbZ408WU62FpJZSO\nCoyayTG177Lt+jvE85i00pciN3q/3Y3aWgjlCRaQYfHj4zfVcAJEANiD+MM2\nmiQKbI5rDLCPpQcCpaZu6T1FP4KE+not+tVbPU7SGFs1wmizZSDEPfXAQ2yF\nH+3xWTfFBtO9bH3TD6xOvhdKpjPEitaQoZb2VWN/AdkNQ1R/l4aEsEVtjK2h\nxkcBaAP8sqXR/ETWN5ILoy9QUxXwZKh/SKlAHYSUaN0dkNsRq9R6TMDjjDOv\nRSBAlDLNH4LLTbSFFM4jPZ+Fd7dYX9+RQJJc0UQAT8HqMqkiMZ39OjDGYVWc\nwhPas7cAtHx+S1VwKNg8vztI5xtSGkn9AGsA68/cs6tovyxzqrV1Kj38hYFw\n7EeQ\r\n=tycb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCS4UbO0e0R0EwStIeqXf5R2oSoxTJSmoYRgVv+KC8+GwIgDu4sz05S1WhShTY687PmlZtac5Hkz15amc7eZffc2oQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-a224fc2.1_1573666452832_0.27455230401538055"},"_hasShrinkwrap":false},"0.7.2-alpha-7f19650.2":{"name":"graphql-toolkit","version":"0.7.2-alpha-7f19650.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-7f19650.2+7f19650","@graphql-toolkit/common":"0.7.2-alpha-7f19650.2+7f19650","@graphql-toolkit/core":"0.7.2-alpha-7f19650.2+7f19650","@graphql-toolkit/file-loading":"0.7.2-alpha-7f19650.2+7f19650","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-7f19650.2+7f19650","@graphql-toolkit/json-file-loader":"0.7.2-alpha-7f19650.2+7f19650","@graphql-toolkit/schema-merging":"0.7.2-alpha-7f19650.2+7f19650","@graphql-toolkit/url-loader":"0.7.2-alpha-7f19650.2+7f19650"},"publishConfig":{"access":"public"},"gitHead":"7f1965020dfd2be626e95fa969d9fdc9ac15a5ae","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-7f19650.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-m21bgais9OHIfjSoevYMyG6MDLVkUrGgxZRdtiF+ivZ1RxyAjbmFYt0Dl5GXdlvm/MmolWwjCdr/l9pOdAt5yA==","shasum":"0a515878065696a74d218eabe1cc5cd7eac55883","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-7f19650.2.tgz","fileCount":9,"unpackedSize":14884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzGYdCRA9TVsSAnZWagAAT2kP/RxkR2hoojFousXKVf8T\n3PLMCFvX9xYojgkIUcx6hUXHuPQbO+oQNX+MzVIx5AJKmQ2rRlSpgmnsJiL5\nbASCcq8txBtpINDDx2za2uXg7GmoUy56UCzLHfNnY8sGFa7wvaCPb0lP7kRW\n7PYYzHVdxUKnmzU/4lUWV7sgbftFp/8urWhOK899Asmp2pWJdaoVF3sLVRG5\noQnEzbNagSZbF0JGisF2u2+rxR8L8A9RuzjogtN5/pzV9Ed8HpyDjYJk0OAu\nYozH5Qv5QcbGVCDurbmKNKnAMEd+dfUGI9wTEoiv8cbqlp9xB/PLQLOwb+KD\nSgDz4Ct8QXIY78thNARuxyYJqkDEII7JIDEQBLiJYuzzdcHt3b9WxILcvw5H\ne9Re7C8Fc9Vbo8Runwz+teW1ggnaLaswoIK5bHjyPAWF4T/lVSM/XbjvXE3l\ntAnWhwSnnCfJZ9QUDCKq0Uk5VSQGWYzZ218dm5+KP7k+xLm7lGSUc+s3q6xi\nZ6/WGeQcb/FoSCqd5nEVYnN6qv2PxioGjGwg2MIScO+F64bPB2a6SYfaTmH9\nkrE6tB2VJLXNuILIEtWEjrMfO2iFRAlLtmSQBYUXFpT/F9HXXoT38au2jeE0\nfUteo5F54wdULZLHuVNDhOVMPFrxDSi3T+pKbawYyBqFyynOrtMieWuC50qO\n+c/p\r\n=HwkT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIDfCm9h9lpxvMAnZWdh0T8X63VeMoO/vsJiXT0I7tXAIgKPTMrA/3uugf3a1ZlE1taqVRlWKNEa/hKAcUxbOiqg8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-7f19650.2_1573676573091_0.6099421776505793"},"_hasShrinkwrap":false},"0.7.2-alpha-d9ac01f.2":{"name":"graphql-toolkit","version":"0.7.2-alpha-d9ac01f.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2-alpha-d9ac01f.2+d9ac01f","@graphql-toolkit/common":"0.7.2-alpha-d9ac01f.2+d9ac01f","@graphql-toolkit/core":"0.7.2-alpha-d9ac01f.2+d9ac01f","@graphql-toolkit/file-loading":"0.7.2-alpha-d9ac01f.2+d9ac01f","@graphql-toolkit/graphql-file-loader":"0.7.2-alpha-d9ac01f.2+d9ac01f","@graphql-toolkit/json-file-loader":"0.7.2-alpha-d9ac01f.2+d9ac01f","@graphql-toolkit/schema-merging":"0.7.2-alpha-d9ac01f.2+d9ac01f","@graphql-toolkit/url-loader":"0.7.2-alpha-d9ac01f.2+d9ac01f"},"publishConfig":{"access":"public"},"gitHead":"d9ac01f402eb7d4dbd3eabee6678502e9ab8b1e2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2-alpha-d9ac01f.2","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-TwsIlzcsH/hEWxvp9OcSPGsfDo+LVmCF4lT204305wuOtjrikyfJVwnX24jMR4jGq4CxQn1MNX43AUJCXNQZfA==","shasum":"12af5130b6c028da5db42293a99b65851c1b3f35","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2-alpha-d9ac01f.2.tgz","fileCount":9,"unpackedSize":14884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzGd2CRA9TVsSAnZWagAAGLcP/AiMsXK4UP5ZASGxSARo\nJFQRE7PWMwxtqy72OldEBW7LllnH8ClITeBU6pkQfA6sBtR3o6XqW7kiBSKZ\ntU07E43fQpHDryQnPOq1khPcTHX6xQn1LX0XZlE8xtbyUjFQvBZnkGfp+y34\nvbXo/a0Mt38sgRDpe4lpxfDM3dq+cXZrEYstBqi4ussIJK7ww888tiDPePv6\n+9exMlYI4oQKCSe6Pp3hnSy5B6u8qB2D5mrrc0267dhaqQNwvKdwry3ZFeRa\nHC1e/CfLCI2Vn7C/IMj/579TbWnPn/uqpRoyb1yrt8bpMAAlr6I5IVmcDpZj\nNJzfv5DfaIUaumHP8Vv+LSjGyVNeq9X4l+2B3yNLBfQFPeirBCsp/5KpQifB\n7h9lw8WEWjLqtTeNOYSnkDkZ8rqi7AUlqBnItgfqXBQVnfjEL2cayvf1bi0V\njNVmErP5R4W0ltMjlcrXmE1q/vXKaJHF3DHyIlqWMnfuHS4vUnLoTiOZvWUD\ncFwThjoB2GQ9ubhCP66thxN2v9cwRDvBLC5+qeFv2ocSMhQslKz+l2+8E7eP\nYsqA/7e4tNwMNgE/9YspbZgOHEMIZr/5TkuI1f85ZKG5Bqra/KB/I4M/nIRW\nYM/3qDLfqdHpyMD+/ppql12XVoHdB2s1Vp9vxQ8AseGB40FAgO9Or64JW5hL\n0DAg\r\n=Hzed\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2MagjAliiqZhfvafm0AYTNZHqGJgA9JeUC3RrmsRE+AiBCt/u9+QxlIe//uqFk5myFrXK5qpaNnOtZ/CPgOfs6eQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2-alpha-d9ac01f.2_1573676917576_0.9099521174945975"},"_hasShrinkwrap":false},"0.7.2":{"name":"graphql-toolkit","version":"0.7.2","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"publishConfig":{"access":"public"},"gitHead":"62f00e20b2cb6cf9bb0e900a9e2c15d2988ca235","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.2","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.18.4/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-Mwoc+72RwFYhiFagMqW0EaUrX8m3W4CiXsMZngx5g2PiwKggUKZeXimvWdPFDQAEoJs7s3RmijnUJbu/DQ5m9w==","shasum":"29f9c31aff93db8de84f073965375fa8cfe43af3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.2.tgz","fileCount":8,"unpackedSize":10560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzP5vCRA9TVsSAnZWagAAm9kP/0ZTTOweAW+3L/C4efU5\nqUoWUTYM6Jv+7cKtJOJCRVIssU2hiAQU8khGT+VRSQZJZAe9IMICFF/vFmL/\nU30k5mUoS2oPk02SfrFljM5x5+Tnabrl0D7ca0PL6x2F3PZiKET7tANBn5or\nL47oLycuE5SwATf42Etny49Nf0WDedw0x4Yb2wONmXVw88aabpvtKDt+TVFB\nm89t0UdnyXH05KtyVALMS4MBnJL4RtJfp0HXtxr2uTT2YIq/EXfl8TDauEAb\naSggwnMCf+eBvvq1PUStWu+XWNL3bmaDHcNLCa9YuRf/CdQElrI1iBU8I66V\n1nw4ffdDEPeoX/jGfIDVozkChXCk+EnuMEmDsL94fYEOGYHsJP5BKi4wkvCk\nIQsPv+qPYYDzeub1Oxa5Dz/fMNDJAS60TmwAUeR5LH8suTyzeyzASNQcnMwX\nQe6H6gsUofeb0xAw6BweDkSnoTzpQe3YQAS3D+UrtkafkO65gpd4IiwhswSq\nyRArSXzUQdCeG9EJwsjJR06C02DnhpdAZCIuz7X5GsQalwFw7WiwFmfHYzdk\nWMQhkzqjJS3nM+rMIXqIYwaVFe4WqZi1RCub6IR8+DsecoQDnBLnu5BcW2v4\nlxQ7AKbdwMtWCwuPMupfkF8Dg0TL2rZSZpudDR6kHz5oH2GSq1mGcrCjxBvh\npmfz\r\n=iR9G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHksf8Zmfo8MDFpXebZZ8zmiYA7HzaJ/43nKzQPk95khAiEA1ZIDHNG49prWHTAKNQEfxbX/X4ctN3S/3++RAWyi25E="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.2_1573715566636_0.7593657160536194"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.7.3-alpha-62f00e2.0":{"name":"graphql-toolkit","version":"0.7.3-alpha-62f00e2.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-62f00e2.0+62f00e2","@graphql-toolkit/common":"0.7.3-alpha-62f00e2.0+62f00e2","@graphql-toolkit/core":"0.7.3-alpha-62f00e2.0+62f00e2","@graphql-toolkit/file-loading":"0.7.3-alpha-62f00e2.0+62f00e2","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-62f00e2.0+62f00e2","@graphql-toolkit/json-file-loader":"0.7.3-alpha-62f00e2.0+62f00e2","@graphql-toolkit/schema-merging":"0.7.3-alpha-62f00e2.0+62f00e2","@graphql-toolkit/url-loader":"0.7.3-alpha-62f00e2.0+62f00e2"},"publishConfig":{"access":"public"},"gitHead":"62f00e20b2cb6cf9bb0e900a9e2c15d2988ca235","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-62f00e2.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-Y8TuRmS4aBKoC8ek6b+5+BQrYnPVvikCkRhk26ut3eI3en+SF/tkFyXVYz5rCZLJgwuF1s++z7DyZfc1PxE17A==","shasum":"77df7fd1bae92d52d122e89e4a3024e7aefef7b8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-62f00e2.0.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzP8iCRA9TVsSAnZWagAAQtQP/Rt/cLMYrA25yS2t8Cx9\nCkv5ptT3CVECDWRQY4AL+DLO6z0yitncWxDeUWORfCZTb06wNRileb0qzNyr\nNYQqqjkW2HYwIUWgE1TOvwQszuxy7tq/+UcnYebR1kO7eXsI8EDcgZly0KaF\nEN0lSUfGpBBT6m1rk1B3Gwu75U9KkSR0Lb8PBSviA00OOcKjswxPy6AUp4JR\ngsv3dlDpvZ7hlUfP+oc13rEDT2KXix9Fxc6C6DP/VSYGPxuxYDKIfcovOhAb\na5ci+aCYH0KpPK/Rf7tbuV3KEtj2q2vKfzEH4okg8qR/XRzlj5OCuTzVmXwK\nwh4q8ZBxEiyyUzZtkrggGTE8NVby7ww0EbQjE+GeOXpLn9UKbYZ+DqO3ylua\nydVMzkNCQc1GhHx6SotJ7ZKa0HaJcFlfaX8FLyvpPl2Hkn6tldaJMisnyokP\nbDIK8UxG0ZE3taJwbEowKRm9mp+K+fUwwM2sUb5kstwcEa9QZvT/SeqVGjPo\nfA7TkGsfr2KendVoN8NuIm9yEMSSmI1LYFr4y0OMGTv0j6BbA0I83KsSo5IF\ndhbtMK/t6XYNZNmRlAE+XRETl0jeC7UT0psPllEH/ZVt1OVC2nOffegO8CFN\n+XJJB5TaEdzDV59IcAi+Qurs3lzCoo9Q8IrFV2Tm2tpc34Ej4k8WZBvyahY4\nkQvX\r\n=Flyj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/LZChEZRw1IO9w/3J3i6FfiC+Vyqy4kMrvXmVePYtgAiEA/XSYYnf6mdPZ0DJsM4nbzohWzLsl6mbi+16P9iHBWcI="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-62f00e2.0_1573715746256_0.9340645770565965"},"_hasShrinkwrap":false},"0.7.3-alpha-3bd402d.0":{"name":"graphql-toolkit","version":"0.7.3-alpha-3bd402d.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-3bd402d.0+3bd402d","@graphql-toolkit/common":"0.7.3-alpha-3bd402d.0+3bd402d","@graphql-toolkit/core":"0.7.3-alpha-3bd402d.0+3bd402d","@graphql-toolkit/file-loading":"0.7.3-alpha-3bd402d.0+3bd402d","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-3bd402d.0+3bd402d","@graphql-toolkit/json-file-loader":"0.7.3-alpha-3bd402d.0+3bd402d","@graphql-toolkit/schema-merging":"0.7.3-alpha-3bd402d.0+3bd402d","@graphql-toolkit/url-loader":"0.7.3-alpha-3bd402d.0+3bd402d"},"publishConfig":{"access":"public"},"gitHead":"3bd402dad0905971cb975bf1d7566088c806dfae","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-3bd402d.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-UuS3L2PTZn5DiyF0DbE1d+68YhEBtke1p1/S3DApfqzGTrs8mwYITWNDm1z3Pf83stGlrnllVbGkXmlrW4SpqQ==","shasum":"0b0342a6a2ccd7455a7fdc4560bb1f8362541964","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-3bd402d.0.tgz","fileCount":9,"unpackedSize":14884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzwg+CRA9TVsSAnZWagAAMuMP/1bMuayASDphxON2gPuv\n14DQFx8Hr3uCeuYyJ2XcQiejS39bjE+78vSt6hnlfHxWWsEbMQxZypHQgq3H\noMcNxiz2g5tHhh3DGtfxg9Y91TocOKKBFhN0+KGa7HcrvyQaB4+xET2YTLBK\nlyVhUFCpmRJ2IOhZNNsnBF8b8D9zBEJuQM5w2eIcqLdSptsfQng3bfDh8qP5\n/KsOTOWyY6Jy/SuO92wE3h6dsZbpljq9liKm8N/Goy3vf4aiHMR5TGdhY2nP\nm03DaRwJ2a2T+whQa+OBtII6Gr1XBlQehMVYt+CSdB++q/qU22Cz6pDa8bmo\nMjI1stXJJOOE8t6P20TIo/SrDubeVYiz8F0aZLHTXcSCRZpdCShtS05xZOZi\nYnt+JfAqJaNJBsXt9na+sWNCfG3AJrZIQU/PvYPkG8HINQun/P1fvLjIIoDE\ngxVO0F3uJWBavjnvFoMkBb3LKYsp69CzAR3CLtPKXcv+ei3bbLWCbZNj/mAx\nbjNasjqPHCmjf8yj+2Hp24F6zdIrMKhcjUKbES7WAn8TPz8uFtz8ZkBfT72o\naJLzlB8PZ/wekxiO2MdPklFw0OmkifpC06UnrZH/QoQIAV6mphYwlfchMc+m\noiFjFOa0LyeuFSeym+guRJ6wF1NwWHL9m4z2DlGVnbc5PM8zgFeNnxGxPwQY\nQhO0\r\n=pob2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDrpu5ztWbN23abd+pGO94WzfCL0tcN0etCE36SWWF25AiEAjjpxEabVJNfi7BReti/LjIKaraF5mClaktWxcLr9ntc="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-3bd402d.0_1573849149882_0.703973879153837"},"_hasShrinkwrap":false},"0.7.3-alpha-5a5ea69.0":{"name":"graphql-toolkit","version":"0.7.3-alpha-5a5ea69.0","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-5a5ea69.0+5a5ea69","@graphql-toolkit/common":"0.7.3-alpha-5a5ea69.0+5a5ea69","@graphql-toolkit/core":"0.7.3-alpha-5a5ea69.0+5a5ea69","@graphql-toolkit/file-loading":"0.7.3-alpha-5a5ea69.0+5a5ea69","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-5a5ea69.0+5a5ea69","@graphql-toolkit/json-file-loader":"0.7.3-alpha-5a5ea69.0+5a5ea69","@graphql-toolkit/schema-merging":"0.7.3-alpha-5a5ea69.0+5a5ea69","@graphql-toolkit/url-loader":"0.7.3-alpha-5a5ea69.0+5a5ea69"},"publishConfig":{"access":"public"},"gitHead":"5a5ea69e3b98c2a726837ffb0ef139801192e4b2","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-5a5ea69.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-3fJq6IHqMBfj0XhBgYflEukve66kcriBxzW2TchyzKIzM0fcTgyj3SKNrwWI67CXSZCltAL/gwLm/MS1E3jy8w==","shasum":"189a58338dafc8d4120e4bd9c66434fd03d78359","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-5a5ea69.0.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzwtUCRA9TVsSAnZWagAAu94QAInytQvkt0ODYT2z94TL\n7Zz1f7W8L03uMnY/DIwsg2KZvYuyqnCs2BDNhnONuBaSVr4rE0jpTLXYRYfI\neWhoh6rSzXwXWYaWB7hvgMO7kHrWgTMRJLx+YHLz2MGS85kw5G2o+zluwpHy\nmf48y142mRCGQGQiZSQJEl7j1kHydk7AQsGdlhqtxRFlsBj8tMH4gpc5QgMV\nBvOBvBrIJDzaeBWuTWIzCWaRxvr6UxQPTKUtQ+P948RfT+dMffQmd6XyjHDg\nnIlkfQrJTRcI4wZr8/yLNbDCmghZ2NSgsI11nbhEjUOusvUbPbZGpGX2IwVZ\nN93LaIpt8fq4Q82a77r7uB3qyTVxsszR/gK6sAVCwmVKnOha/O7c6miT0ILK\ncpqDoejO8eiSNeG8lUXrPfkzmTKIcNcb6Bu6gEah1Wc6OsD2+EiNEliEgqwT\n5eIVtSxeQq7i1EHJllmZouzhME5+IPAb6k/SmEtF0nOh0boJB3F3GnzcHIkG\nbWg2pgvTamXX2Ka8wZqTF5L6eQADTngTvJgsiqWmplDoF3qdvhV6o4LJRWLa\nxwlTYqRTiPw4ooe/IDN21ZqNbZ/HGLQOUkMYkXFxI5lFoY60Uityj0srmWO1\nBB4wnTKrNfXPKZWPqLt/OTUm35raVNQvF+6qel7HlGgfMM15WWQPTTNquJPC\n/h4B\r\n=qgMq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiQh1F4WxjOCEuLxbJ8fOfVJPPB5ph1JoyrasObtXzJQIgNjshDvlAIMVaRIiumAOzvzJKEQeHK0eBjfErWM9GRyQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-5a5ea69.0_1573849940098_0.5977000303378661"},"_hasShrinkwrap":false},"0.7.3-alpha-748ad75.1":{"name":"graphql-toolkit","version":"0.7.3-alpha-748ad75.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-748ad75.1+748ad75","@graphql-toolkit/common":"0.7.3-alpha-748ad75.1+748ad75","@graphql-toolkit/core":"0.7.3-alpha-748ad75.1+748ad75","@graphql-toolkit/file-loading":"0.7.3-alpha-748ad75.1+748ad75","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-748ad75.1+748ad75","@graphql-toolkit/json-file-loader":"0.7.3-alpha-748ad75.1+748ad75","@graphql-toolkit/schema-merging":"0.7.3-alpha-748ad75.1+748ad75","@graphql-toolkit/url-loader":"0.7.3-alpha-748ad75.1+748ad75"},"publishConfig":{"access":"public"},"gitHead":"748ad7569980344ef666374474a70c207a2c9991","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-748ad75.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-I0zt4jlDk64N7xuOnM4im8nFSqxlmvfmMVSwQtZTKGJDQvAiF7PxIo+Q9jPVIQ8PXAJTNjilEDtyVrdp5MVWJw==","shasum":"69f6512db92a5ada41011d6425c1bd2a64c9c06e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-748ad75.1.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wZ7CRA9TVsSAnZWagAACvkQAISaCwlCkQG1LgKe0ehs\nI21cThdvcJtGyq9lKIzha6HtwJMrzW0rufiFviU5/Q+j2vCL8XNeq+HzMc4e\nhFu1mn9fnZm60ighmQUnR9Xv7nOKjiIS8PRzQE9g4IX8Kal8Yko8FINrKbQO\nQmIOMpRDwfY+uPYT+CSwzUI273SCNc90TmnKLdCE8NiwbgXXgmSz6miJjI6i\nFGzRo3qFab0RJ+2nH6oF4hhQyByjU9PiBScf5mCjW+RR37+jLVRUrrHQ7tYh\nJFPzT9zYgoPVxK3kydBJtcRlJPhR44Z+7gy3TB887SAbe6QLGfzZhaGmHodX\nyHUni3jXcYrA/ysRMjQlOCU1/fGCbGNT0jssC2oETWbn95ceccnngCDu3B4m\nlfnG+M48/iIVUvzAkeoqY6c0cq/lyZ9DTWrhbl1XvXEUdMgB0gMRwobL5MfG\nrc5QB85i7mOCnRo/vIT+w6otDE9LmaTvkrLiUxDcfPM5nCoMCSfQE8tfG4jb\nRce3q+n/bYfeZJ8AVhUnVeP1yvxp6RR6yp7FvVuKNcZmHjERx0efA0wce2Uk\n3Ml3KAvsgJD2fosY7GjgpSEmea8gdNnadEqEOhRheuSqq1MqBPrYnt3iFZeG\nOj2wLUZY781n8rDD03kzSQp77ue5/+X3e5PO3dQ0yB85bAwF5ZihZ/3AxLYS\nDZk3\r\n=c+jA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEnS+SmKWSPakesd6SFw4zBPHBBvP+Obcf6aN4/7gi+wIhAJ0iqpbbZ8/Da4IVvgiLFYtSt0nefhtvqlr9KHSd/SJb"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-748ad75.1_1574110843527_0.8964048160371791"},"_hasShrinkwrap":false},"0.7.3-alpha-33d84b8.1":{"name":"graphql-toolkit","version":"0.7.3-alpha-33d84b8.1","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs","test":"jest --config ../../jest.config.js"},"sideEffects":false,"main":"dist/commonjs/index.js","module":"dist/esnext/index.js","typings":"dist/esnext/index.d.ts","typescript":{"definition":"dist/esnext/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"devDependencies":{"@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-33d84b8.1+33d84b8","@graphql-toolkit/common":"0.7.3-alpha-33d84b8.1+33d84b8","@graphql-toolkit/core":"0.7.3-alpha-33d84b8.1+33d84b8","@graphql-toolkit/file-loading":"0.7.3-alpha-33d84b8.1+33d84b8","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-33d84b8.1+33d84b8","@graphql-toolkit/json-file-loader":"0.7.3-alpha-33d84b8.1+33d84b8","@graphql-toolkit/schema-merging":"0.7.3-alpha-33d84b8.1+33d84b8","@graphql-toolkit/url-loader":"0.7.3-alpha-33d84b8.1+33d84b8"},"publishConfig":{"access":"public"},"gitHead":"33d84b8ca406a967d338a9968cd3a32146f9b269","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-33d84b8.1","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-lTR3vkYrvk52HTGF+VUQKMAnkvu+gxYhnMY8Xnmky6xwKAek/19UY6DLvYLdIucjoakYJDMAFbqKZXFgEMNfVg==","shasum":"ab75ccdca3e9ab54cac7af9e2ac7a0186cb64332","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-33d84b8.1.tgz","fileCount":9,"unpackedSize":14886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd0wjKCRA9TVsSAnZWagAAJNcP/i+eHICMomN7KwrykwsL\n3CrkAk80VslWbKcexP54yMiaerneFdIzbX7YnhmLOqldq5sM9w7Vubzamxy8\nU7AzKlLrlbdswWF9+UcEoF6H/iMa5uW7gVcymk1wX8AE3ZA53Vg/2SZEhEB4\nu7dmsBEk8DXYOqaNbb76ryZ3CXstRACb2GSpjObQCPut/7Yy+gP0KVNyb7q/\nRN3sAnlse3eZjZzE9ORyZdbHaMNrs1TDfXFHFfqD6CCpamyBkY0LsoNOk6EC\ndOu8ydfEmX1Lv48wHnEo6B5yOl54jdCBCDA8xNE9eQhimo/MOT00GJLnMSvZ\nxqJ2UwjtE8xdOed+gwRpONXKhsNWAnymAHiekOpAPVyHMo13gpZ7dympWmME\nM4FIDI7mt1SamoNPCuUfwwJ9f3NpvTZqM7CUlo2RYXj4RjCyHJr7iUpyNUPY\nel71r15MFRcy+5288wznR3szOJa1BhR/RBEQJX5FYb+iD0azbz9fXYBONsYr\nR61HZmXSS34Yo2NKuQ6hlkxjM+L86D6brXUivuGBl7D6Kv5Mgotip6sUhX6R\nl+v1fkxSRJR7zNvjMLnn2najvc/K5wNuZjcr9gB96oGeRZS7aMhyR+2dNUgg\nU4NC8Yku0VO4PyO/v8zSiuQu4JWHPAhweY7gY4ny7MqvMp90AU3/+2WrrMve\nHuaB\r\n=JcTe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEbZ/sL7Hhoidvcwi3rDnpiy7jjPvHfgosDf108hSna+AiBywaSrcm7BzhHwCRmHfT+gjnC0x0fzHg8SOU7oHYE6cg=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-33d84b8.1_1574111433600_0.10773006516027861"},"_hasShrinkwrap":false},"0.7.3-alpha-0ea72b3.3":{"name":"graphql-toolkit","version":"0.7.3-alpha-0ea72b3.3","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"bob","test":"jest --no-watchman --config ../../jest.config.js"},"sideEffects":false,"main":"dist/index.cjs.js","module":"dist/index.esm.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"buildOptions":{"input":"./src/index.ts"},"devDependencies":{"@ardatan/bob":"0.1.4","@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-0ea72b3.3+0ea72b3","@graphql-toolkit/common":"0.7.3-alpha-0ea72b3.3+0ea72b3","@graphql-toolkit/core":"0.7.3-alpha-0ea72b3.3+0ea72b3","@graphql-toolkit/file-loading":"0.7.3-alpha-0ea72b3.3+0ea72b3","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-0ea72b3.3+0ea72b3","@graphql-toolkit/json-file-loader":"0.7.3-alpha-0ea72b3.3+0ea72b3","@graphql-toolkit/schema-merging":"0.7.3-alpha-0ea72b3.3+0ea72b3","@graphql-toolkit/url-loader":"0.7.3-alpha-0ea72b3.3+0ea72b3","graphql-tag-pluck":"0.8.7"},"publishConfig":{"access":"public"},"gitHead":"0ea72b30e3d6475805cff5aa1bd3f9aff1189d4f","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-0ea72b3.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-McJtBDy86CSQFeKsM5qUMhYkObj8R7NZZXSR+o05WyvsYpNoNrE+w5eul+40kvEapiPAJa1evgk7aGZtXErPEw==","shasum":"8bd56f1ec2e7fbbfba71006883206d89776258bd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-0ea72b3.3.tgz","fileCount":7,"unpackedSize":12908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1AvDCRA9TVsSAnZWagAANZcP/A4vcRQ+5B9pWxSv7nGv\nKDD0D6zFzlGg7Rv2EzuzFWSPSTA7bLpsoa4HIxBp+dv5sXgqIEf5O/mCgtmq\ng6FOPNKvqUYB4fh+loFfhCXZzOIR4w8z8C5iUlDToWfhprxPvEi3gShFkyzK\nZxrCczRbp3Ee0Pj6gBS2+4KM5H8ONnbwQDVNAPtiRnn9oiQ29n/Ejba04zbL\n7f1LPJ+NvAmiHhmAMGHbAYfJnHeZXXWBPgSRVVf0xNJAKDE/obwcaywH4Xfx\n9FCZ8KG46xBEbFEzouf3SZ/idn7VBMrtLhNXw03alE5+XwoyppnqbMXyL7p2\nnS3O0oHQaKZHSlfGdLBL58w2a98+0h+Rx1pLyeoJ9250XVYK0ab/HeXjFCdD\nS4AyvxeRmUgEFDI56tGEWNzYan/5uQb7cLLcCHRZg4vK9w11jyW3sZSa0+fB\nr/Jbk70qUeSolLG3O/zLYe6AjD2UnxKtnP3AOQy7z+dyVS0W5IOUJIfxUyP+\nHTG+nMP/ZRYvXfrzrC9QUMd88ZEhBB3JhMegE5jX6irDPC6DTtD6EG3PMCCw\nkQaM/wuj+RbxCrtImyUjltrZ2YdqrHdVcolofl5hIo8L93QrHEPwMXkgnsRo\n+aR3+k/QkKJAlx1RCNgvgR5LmoI4iTCTNedHj8ytXGoVFAbi+3vm9v3Pr3fV\nWDUP\r\n=sxDc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmokUb1gue1nbQptJmgOEccXIKskDeieA/sIikjMUv4AIhALZiOgPPc9TzVgD497716AnnznheEGj/o5OWvtqKXK89"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-0ea72b3.3_1574177730878_0.13384592712012733"},"_hasShrinkwrap":false},"0.7.3-alpha-323d4bd.4":{"name":"graphql-toolkit","version":"0.7.3-alpha-323d4bd.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"bob","test":"jest --no-watchman --config ../../jest.config.js"},"sideEffects":false,"main":"dist/index.cjs.js","module":"dist/index.esm.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"buildOptions":{"input":"./src/index.ts"},"devDependencies":{"@ardatan/bob":"0.1.4","@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-323d4bd.4+323d4bd","@graphql-toolkit/common":"0.7.3-alpha-323d4bd.4+323d4bd","@graphql-toolkit/core":"0.7.3-alpha-323d4bd.4+323d4bd","@graphql-toolkit/file-loading":"0.7.3-alpha-323d4bd.4+323d4bd","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-323d4bd.4+323d4bd","@graphql-toolkit/json-file-loader":"0.7.3-alpha-323d4bd.4+323d4bd","@graphql-toolkit/schema-merging":"0.7.3-alpha-323d4bd.4+323d4bd","@graphql-toolkit/url-loader":"0.7.3-alpha-323d4bd.4+323d4bd","graphql-tag-pluck":"0.8.7"},"publishConfig":{"access":"public"},"gitHead":"323d4bd9b289d57a20faede5a4e2596d0c1107da","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-323d4bd.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-tyObX92x5HnEzg/shA3nnU3v11YLKhhCYe+O6uSf8S4RECzzxlU2lzR1UYgS4+Fp+MVJE99yq9ao0t1vwEzcPg==","shasum":"3f7e879bdf6d36b4f38a0fae2c2111a73100b000","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-323d4bd.4.tgz","fileCount":7,"unpackedSize":12911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1EHQCRA9TVsSAnZWagAAjH0P/2n5mCiPtiqliaeLY1b+\nL5xOVXGejZyp4cI3OPVu9WSAwmMA9iDdWDfrSf9YHbslTwfgqtGojLgkrl0u\nCSDa0Z+fhXSM7NX29BhbUGjI8ScJcBm8SfFG68mm96xl5SIpND/A1ARWqjXm\nrxZ2MiSwP3woCfs8wt13GQY1jJuCMsjhcePL6g8uEvt7ZO6OrWITNpgX41Gp\nu1Uc7N7QZNqh7wzLs+Urt+I334jCOOxNpBBRVk/mv5LE3iOc/0VD7deSmK/I\nOO3kANvXSXf+DXsfTESLtn5+WMGu6/TWzEr2SR/S9QkaCzt0Zy2uc5fcNm34\nteR3fpP5BhMLtLziVvU0u2086SLXKczbvM6hZnA4I/It8ajlVdTlS7Dx95Z3\nRbJVzng31oXArYDmeElI8XYFNKhG1Zb/SAZfu7NSAbxorR3dk9FpxLV8N+hO\nPtv8AkmcpQ6QyYKQtyy4Jl4QvVHA7So2RcIlhjo3AGFAcmL4xSOOHONQHnq0\nw18tPm93Fx6z8ZKVZovbSgXMAv8X0UBEHB0rTAHJrRs1ZnaqbsBWOxJAIThi\nHePkZkEZY/emBe4YxFcuSUgmpE2L9sE04Eu1qXqNmmaBdDIjmlHDbaxZIoEu\nrFGx+CeoKC7hCp3MNeprA1Kfi0pSuWgwvNPCDl9e5erhnQdzpkWwHdxWMQ2t\nK/1+\r\n=M/bg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDj8ou/lzxr/lz5cozo1ekzDBtFNGztb+fejX6OutkdnwIhAOoUUmtm3g9jiAT7Ztcm37NcSaPLvLtKyr+wUM+IR+qV"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-323d4bd.4_1574191568375_0.923791441992855"},"_hasShrinkwrap":false},"0.7.3-alpha-6e5d892.4":{"name":"graphql-toolkit","version":"0.7.3-alpha-6e5d892.4","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"bob","test":"jest --no-watchman --config ../../jest.config.js"},"sideEffects":false,"main":"dist/index.cjs.js","module":"dist/index.esm.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"buildOptions":{"input":"./src/index.ts"},"devDependencies":{"@ardatan/bob":"0.1.4","@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-6e5d892.4+6e5d892","@graphql-toolkit/common":"0.7.3-alpha-6e5d892.4+6e5d892","@graphql-toolkit/core":"0.7.3-alpha-6e5d892.4+6e5d892","@graphql-toolkit/file-loading":"0.7.3-alpha-6e5d892.4+6e5d892","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-6e5d892.4+6e5d892","@graphql-toolkit/json-file-loader":"0.7.3-alpha-6e5d892.4+6e5d892","@graphql-toolkit/schema-merging":"0.7.3-alpha-6e5d892.4+6e5d892","@graphql-toolkit/url-loader":"0.7.3-alpha-6e5d892.4+6e5d892","graphql-tag-pluck":"0.8.7"},"publishConfig":{"access":"public"},"gitHead":"6e5d892012687512132d478818d9c15994e1f64b","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-6e5d892.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-0KF722fiedjvwjcfnqFl1V9x/kPLNbjYQ+MUMag+RM++Nh7G/S2DXvjNeIKyE6hwDfPBNHa/cp73XqeFh0OxLw==","shasum":"0b78b20117cf9c4d67ead7575035617adbe36615","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-6e5d892.4.tgz","fileCount":7,"unpackedSize":12910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1EPpCRA9TVsSAnZWagAA6fMQAI8i0NJ5nZnn+Rv+xyyN\nY2v+tNJtToFm8QQuIf1hBHNBLsiRJ4gzPKXrDqS9ikpNbPF1eGwflPbYCKEC\nZWlqz5W/Y7Z0bhZOhHGKJ4+j2CiNWd3nJ4vBxGcINj3q/4KpxAv6ooQJmLnV\noyd9SknkA51dtTw04srwOE+vGoNSiXkKzhodTIrhouVgLshGpxtONCjOYgel\nFqvY+rjPhOysgIAMHEBGXco7587SsxAtMxtx1j9r+v8Y0nW0R/HnF8Q7Sk5p\ncDrIzXsCnntwTz+sIPHuyRQ91tSx8YcxMegOlbAsYNRwF/le30UQpdyAPT+a\nv4enDM62YBFkIrVgg5arsEIw80Cdc4JvNXhznNSFyGz+aQ33o//ZdgICBtSJ\nayMn7W5ovJ9aPznoQVt62CHPh6Ni5xIAERITP1ybvspg3z+4+S0l8WIXfiRp\nBZPFSo9x/V6kUYcEZvXPRUdw8476g1MV48uDsE3RFJICV38HHPfnML2kRIpW\nRF9Leme9hNF6g7C4vulxX/6exOhL89wPy8QzSOI6D6Sej9E9bCiATJce3bgk\n236r1oeyUTS8uKWZZGvUQgEBMCLQ5tada2bdY2efF5hjgGkxQsmL+NwWIowg\nXmDZnf8CzLdIFK9RuazmohzD+PSWjm5RX66IVnyJe3v9u/aFc6cKwiWejtYr\nXcLe\r\n=5b2v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICZcUoGWGzKt9vEFtoXU6ErIe4733Jw7lEaH3RXw6RShAiEAw7pxOdZIBl7toJK9WyNUFwLFjLOMnKI1BusNBOK+s1I="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-6e5d892.4_1574192105414_0.8631309806423364"},"_hasShrinkwrap":false},"0.7.3-alpha-e42ae64.5":{"name":"graphql-toolkit","version":"0.7.3-alpha-e42ae64.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"bob","test":"jest --no-watchman --config ../../jest.config.js"},"sideEffects":false,"main":"dist/index.cjs.js","module":"dist/index.esm.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"buildOptions":{"input":"./src/index.ts"},"devDependencies":{"@ardatan/bob":"0.1.4","@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-e42ae64.5+e42ae64","@graphql-toolkit/common":"0.7.3-alpha-e42ae64.5+e42ae64","@graphql-toolkit/core":"0.7.3-alpha-e42ae64.5+e42ae64","@graphql-toolkit/file-loading":"0.7.3-alpha-e42ae64.5+e42ae64","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-e42ae64.5+e42ae64","@graphql-toolkit/json-file-loader":"0.7.3-alpha-e42ae64.5+e42ae64","@graphql-toolkit/schema-merging":"0.7.3-alpha-e42ae64.5+e42ae64","@graphql-toolkit/url-loader":"0.7.3-alpha-e42ae64.5+e42ae64","graphql-tag-pluck":"0.8.7"},"publishConfig":{"access":"public"},"gitHead":"e42ae6480375da57b5f21b4833e0a74de0905d75","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-e42ae64.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-a9QWlOLvcFO7C4k4P4oIqFVtu8UyQu6ucSR1w/16Q/GPQynC1A+H3XfdksLYN9GS3LIzO1A4S2Gt7F9aTr3pJA==","shasum":"f25c33df323693b026e0d6f063031833b0e10590","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-e42ae64.5.tgz","fileCount":7,"unpackedSize":12907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1EirCRA9TVsSAnZWagAAqTgP/iEOkEXPSHi0tHFVSyoc\nWxjakyDflM3IrjrBZ3myXsM1mwZPo1eGLgthJZWxR6kou33A8VmcSMyYt+13\nSmO7zfn2ObiWLLDScHiTkpEpBmGASwI0Hg3czYN/tWLW72rVwihqSQD4Mv+R\nTElN/tAIogAJe7ms39pPxHT5HBiES90QQvFEmUDf/Ee3imzgcoh4IPOoFDtz\n7cm8eokdTBCjKh3WGLii7yAs2eak3GTTB+0IoHiVErNWiYYsKG3KttKK6Rj7\naGPL7LrDRIU8jbj65W17H8vzGqGkXkEVzDZtuCvDDEfyyz8dNVg4IJV29buJ\n+B0FD0sJMAPOx0qQ5COfCe4iSCIOgDlElA/T4IUEiMf+BWYEfty7nSGrJWyd\nQ1unJ1dislgnq5nNPe4gQN89TYcDdUT/gZHhkLA/gHoeo2luWs3MDOTbubwd\nlmkI5SgZn5UM4pLNfz8FhoMJAL0kXC/T3v1eu9NL2cHYSKUfceAuBHKYdSlj\n30UScY6ilOcOntCzFjZqswHWqnJY/JesshW4e2F96LXhNx1CDD0L5i1mSw8a\nMial6xCwHPDAut5Iehc3ZswmFSiOIQ0y/k2Klt38kLRD77LkMRfVT6ZMJZz9\nlsed80Z3yOruHsPmIpMI69qjpb/zRcx7K9+i9xSiZHIaea8stoN6GI9eBZDV\nCeFf\r\n=bvKs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEJh4ee3atNsqtCsY7SJF/hGUQWy1JY69ACBgus3XXkAiEAy1aBOkac1XMzVNYH81Kxq3N3lXIRt4+HBQ9rrmJ6m2s="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-e42ae64.5_1574193322993_0.538696636232473"},"_hasShrinkwrap":false},"0.7.3-alpha-d226cb9.5":{"name":"graphql-toolkit","version":"0.7.3-alpha-d226cb9.5","description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","scripts":{"clean":"rimraf dist","build":"bob","test":"jest --no-watchman --config ../../jest.config.js"},"sideEffects":false,"main":"dist/index.cjs.js","module":"dist/index.esm.js","typings":"dist/index.d.ts","typescript":{"definition":"dist/index.d.ts"},"peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0","graphql-tag-pluck":"^0.8.3"},"buildOptions":{"input":"./src/index.ts"},"devDependencies":{"@ardatan/bob":"0.1.4","@types/jest":"24.0.23","graphql":"14.5.8","jest":"24.9.0","ts-jest":"24.1.0","typescript":"3.7.2"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3-alpha-d226cb9.5+d226cb9","@graphql-toolkit/common":"0.7.3-alpha-d226cb9.5+d226cb9","@graphql-toolkit/core":"0.7.3-alpha-d226cb9.5+d226cb9","@graphql-toolkit/file-loading":"0.7.3-alpha-d226cb9.5+d226cb9","@graphql-toolkit/graphql-file-loader":"0.7.3-alpha-d226cb9.5+d226cb9","@graphql-toolkit/json-file-loader":"0.7.3-alpha-d226cb9.5+d226cb9","@graphql-toolkit/schema-merging":"0.7.3-alpha-d226cb9.5+d226cb9","@graphql-toolkit/url-loader":"0.7.3-alpha-d226cb9.5+d226cb9","graphql-tag-pluck":"0.8.7"},"publishConfig":{"access":"public"},"gitHead":"d226cb9da6ad7e0a8aac751ea4e10d4f558a4063","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-d226cb9.5","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-hrFfqjpw+FzJBBfA9WsfBQvcmy8LkXoDcRAXbAn8C4AYBu2Xyg+REJRKaYmcLHE2xJOgzcx9C+r4kjsBneqesQ==","shasum":"ba1413f2b5624a00089e7daa7ad52531ae77bba0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-d226cb9.5.tgz","fileCount":7,"unpackedSize":12908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1ExlCRA9TVsSAnZWagAASM8P/RQvOS6ZoZop4EsnGGXz\njZ5c+EpTS9TCSLvCqt+yPN0MvT0xHGnh4Vsx0vrCoxWiA4QySz3oWP9VXWL7\nEwAt9GQSaPzbQqAqAG2fmwJbMkzKis51q2c5uT/HjdT+P6RnO8JfjT2xfnRW\nXawO3fcuxP8pwS8iLOVUjFfffh/S5qvpHHX2TCse38s/XytzKW9UYuUEDQ1X\nyzuukS75TTg934fkbwhZ2V29cq+vE8gihxuygwJLOCKOJjWjh8IHnvdJscva\nD8qTLgVa6MMPo2vi9rIUEsYF4/gfA+CwRA8UtHRs8Ad9wr/9G2ac2/er44Uq\nuc5g7Uqp7WmJybGuSHuxb3Ugfx/fcyM1/A//BmysyUAK9df8qxMtwGPfV71x\nmRha/2lAo8JVztm43pYUg6P0d/60AZdgriC1Zg3ILHkgdOJkzdiS5qjHMt2Q\nAdqveMstZ4GrL4My36ORqWeROSDNFg7XRB36Rd9az2vFmVqZ33rAmkOYtwld\nX11wqYauLdUlksY6BlhE/3dPhmT8YVAdz/FqmJcfk3+msFDTP+zRcxAhTqkM\n5yFvyRc6wOHokh+0CCOYyu3EoZmyciVvPRHNPWWz8RbJ8muSnXtvVA8Kpn0+\nqIxPAXv6sHrW0HZkqUTKEB0Lo0b3FnEhRmCL12gT02XKJbdK4Dk3KB5xQ/nu\nm1bQ\r\n=dmvG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeGSFrMOtd47tNX+BJUGqqprxS4i5lUnwkTA945aznnAIgWn7+JSxSw+dY+byHiw1PYsR5IacsoJP/v05NHX6Qs1Q="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-d226cb9.5_1574194276638_0.42012756989638556"},"_hasShrinkwrap":false},"0.7.3-alpha-11e316d.11":{"name":"graphql-toolkit","version":"0.7.3-alpha-11e316d.11","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-11e316d.11","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-PTQlFhlfWOXYBLFZ9w2X05XLctfx+4KIm66ZA3LERoGN+A4eHJsxErIjTMchKYBYmqmI1uIqYcbtM297R9X8Jw==","shasum":"45349ec9ad9dab10ecf27a485ad6b5257b494602","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-11e316d.11.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1XPwCRA9TVsSAnZWagAAKhkP/RhQRfdswgr4CuyF6ib4\nfQm1BDqZIhr/3NGsTPdkrE+QDSsBXs4OqKjtsIm3t8NZ20qpFGQkjLQgZiTM\nFmZvjIYwXpRRtSO1YU10sdVpRDZnA3+nj2e5AOyVulZGzHTOIK6sTNDlCJY+\nyp1iKrVkne2aN0GJ45WI2GmfiB18xqXsrUofxmrD22Rru/JjtKl8v0a1xMBr\ng/dOiN+QQG1b74ONu3J7fxoaX7lqaEKetIKu/6usx6/JDgluksB4qGefRuzt\n/wcHwfMbVCo+AxWEQVwI3JILqA6Yg5KeKX97UW9PdT8Ao3tG18ku39u4Fh3c\nFJj0Xev+v1ZemYc0lb5OGS/jWVx2jOUp4V2FanUIbPDtvQsl7sisisXg1WAF\ntrUhdU+41a5roa60ocr33RdE8GGnyKfIVJEszVYfMa7lCbya/tQyk5BuKs+O\nTAymSHsvKKb/qCLEASR6frbgxc4C+nePQWeWZtf5HeTeT/RLY6+JrK3R+An9\nLm8kkv2PI6EjoxaMoryNJrjHtS0UG8MdB23h5T8IEhVahBVR5Fyz/HZ0L9Vk\nhHkB/qJpZ60KtIoVAiMwmuDEIYRYstxFF89FkUZbuwppP8/5LIqaokzx36Mb\nOv2bP+bwTkKrfSlqzql4teAWQUHPc8MVbdQ6M3c7u3mWs0RomH38iO/sVpAm\nEeN4\r\n=U5HL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDa7ejBJ76KO86OpHu+Isz2SQyY+oGLLpQ0wdB2r7XDcgIhALdHXRA3EHaQY3NMD1G6LYIxNvrFrFAe2ikExkhzeW6l"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-11e316d.11_1574269936509_0.459346371448611"},"_hasShrinkwrap":false},"0.7.3-alpha-9c35d56.7":{"name":"graphql-toolkit","version":"0.7.3-alpha-9c35d56.7","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-9c35d56.7","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-tHfzSl0pK2XEpbc7781E5ELmbBn4Ju2tnG5FsQQtzTcMESYqexOtD8DO/2C8bowN5lZF4GCp7uJJBZim5v9JPg==","shasum":"bc16db99f30c9fb9f05d353ae33003c8ba0346ed","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-9c35d56.7.tgz","fileCount":5,"unpackedSize":7062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1XTBCRA9TVsSAnZWagAAXfoP/j7tCzyYA0G1NemdvJP/\nxDZU2Y1KotZjcDx3kAgIRfGsyvCuEwzV4s/pYdXn1lNDXx7ntPhc5mb43EyH\nRFP+hdNWjybFteHySdztZD9jbB6S7PAgSyI3w+PXLPgoiOqU65ES/J9oA6D8\n4MDo3TRY8qNvjwHJwFLUUzm98b0+jgq9aRmNlTeWRRq6ksgJgMXgpk89FiDr\ncKxjNXEYQXq2tQ0zD0OQ7Xd25DW+qsnxA12BqbGBcOXBX+7eVO0IWyw830VL\n37eNbuT7EO/qLR691dFWEsK4BAc6KTn8duDCaa5ftdIeNzXq74qZ01/26A7A\n9RjiHY8QVZuYSl2PdaKgyUxxYpAAoWWpSnrDzn75cfti19TSoLZOVKXUW0nG\nnwRowGGke3TwXOWLWUNc3qLTM+bo+YQt3/8m4tUqQKxSmCce96Q6jX3toeVV\nSEy2MfxduYJhBwne6tHXAgrRcN2Op3+vG9DOraZbJyGIDEG+qyJrFW1Bt9qL\nhJSeH3gxuU5ahf+RX7atJxqLJFAgqJKxR6R8SrUAXNVKzmtzyurw3gP4sDXW\nMYDq9glrgIHYzihkORtutlPUjDLG0vjak2Qco+1EXAKqWJvZC5Z22lFzziYi\nnp9LsfOU1lh3zxlwmlcLhAMXXglisatq9yqs2X1opbuLLJJJDashyaD95QCb\nn497\r\n=XTt7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICAEXdG/rKZlk1LbCYROma6QS774CnNswT2HAzBgvSJDAiEA61TEyAeWf+zIYbHGZZ9WJktMBw+IglWvVVOSfQZU4aA="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-9c35d56.7_1574270144931_0.11365590164824213"},"_hasShrinkwrap":false},"0.7.3-alpha-7645959.8":{"name":"graphql-toolkit","version":"0.7.3-alpha-7645959.8","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-7645959.8","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-leDRi8w6VYoEw+OAYNSSGUXp1CfZAf9Sd2z2tItNBOzJF6rO6EPxKyOUhVWr8TjIwH/ZC7JNiaPJ7rKQuRDa3Q==","shasum":"df66ae6d1ff55df0c4a59ba55d53908d1dc1dd8c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-7645959.8.tgz","fileCount":5,"unpackedSize":7062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1XTmCRA9TVsSAnZWagAANZgP/1jfqBEcqC2A42vhv8l8\nN7aC89HJZLnNKIYs3ygtASpyKDiIQwKaobBRKOt2Y6FFOYcpUuCZcaT73NLI\npeRzAc8HU5ybmdwvme9VucVdnSMn5vW/iV4ei00euD8C38xaSU5hBa8LLyma\nOhgHbatPHMm01j+1NlPObpWcqiCt/w+UsJGJKawTJsGeAQNKh4fdBoOzl77W\nmly3gTx8h36mWAduzRi/TViilPWBMowga4fYyc5PjgKUFiXvSK0p9SNtvoGZ\ne3q8VoRTPdU9ehwOPEDUwPfvmGZg5srYnLfIH9bL7unBt0GlJsXN9i4cAPz0\nlVRTF0Mm3e7/BcP5kQckcnQiMZG+dknVT5CIIjXU2DDjfxf1NBXagxkaaMWZ\nDsCm+RL+VGojC3uZN9QSWcyxrSt04TJMWLJC4MESSKb6vEaHALTBEQl8/yOp\n7sGze6injI7PCD+8vDXkgvj2Ulz07O/RMTlMwUp8nkfZ98WyA0tOVNqY/FRn\n5DIoJkFdd7G3J2Bde/08MA8/wzIEr85RsMg978lOH2Mqf7XHkbO/vT/Nkx8O\nU30RMYJjOCvQgoywfVrCCc1dtyj24AvphYiH1F+2syj/zHXgykCHEk3mYuWn\njBM0invICjfMqWMlXV3sXafuDIMYde9SHWeV06BNdPKYwfbjg4waU0WFbEcM\ntE8W\r\n=Zvqi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaCyaqiXItL1Bzi8HWcRFJsKjo4C1QgMHEUUq2aHRGgAIgQKbYrNwG0mwdKIM3ueQ2kT4mCs/oDyQiJsyBmYlmhkI="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-7645959.8_1574270181964_0.9036473623805816"},"_hasShrinkwrap":false},"0.7.3-alpha-0b26a2a.8":{"name":"graphql-toolkit","version":"0.7.3-alpha-0b26a2a.8","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-0b26a2a.8","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-n+ifFWcI7LQBzM90TKszIHIUrLviR4/0XOYNY+0IbTGncUD7M41+Zq+/DWXMVd8qtytqedLuGF84Wz8AMmfi7w==","shasum":"005346114919902049e5061b136dba98d0bc120b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-0b26a2a.8.tgz","fileCount":5,"unpackedSize":7062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1XUpCRA9TVsSAnZWagAAOM8P/i2wmOBfKpIbq+Cg9/Dd\n8ZQeWoD6d8dzKBC1dLkSdnwIXIHmfGPS92N+q4Y3Zhbe3+H5hNxVZ4cM7Fhq\n4I2X5e12wk9MTMRp+H7pNsS58ZYHBUXjyZhLCrUsonUt8FujsHiQW5tKLVLR\nKygcZxfhDJlq+DSikqmFu8MGTL6hFjhjTlSJB4GKPbNYWuVNC5+x6C/mb2Du\nulRa2vPJ63H63oXzR1Fs3SauUk42DBc/1BNSsHQaIkD6gp9LDAlEe2QZP0is\niIEtmtvxr+miu5Y0+OvK9l45AQZ3KbDLLdilrOYaJDiZFLiN4gAQDrhA8Lyq\nWBY1oYHLOIgLkz3QuIZiQuJhXQn2TThdXJwTIsg+WMFlfkAKy4p0ESScO6f8\n1ffsEqL0irnaZOaJadtvW03n5rfD52GwCAyT3ZGom3YM13zETEwdYYxkGe78\nouZroaWY2DJWuKgbwvIMjzEpUhI5u4JRfNsHM1L1vWgmlx6JpvWStu/ev3Ie\npwL1UZKx0oeT6vUur9b++QfHEOomXlY/8IlxvibUp+daHyYuKAy061f6MM2A\nIw121QwNcZrw/bArgsVKm6/vphdFLjekBtkeiVqN8R1arubGYlABOroNMhFR\nXPuk8U3YwnunJxBk4IplpakwtmXSF57dfe4meuWt876sLEZ/F2sOXcXI9OwA\nphiP\r\n=uJdW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTTeqP8uv+B0MwAqRKsHxpqW5bKDDrCowcIHebnzvRogIgKCZVyo+7EfPRf+QaLUR4BFhy6m1bEYnFi21Rtk3H4p8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-0b26a2a.8_1574270248508_0.8047326632029301"},"_hasShrinkwrap":false},"0.7.3-alpha-1da5507.8":{"name":"graphql-toolkit","version":"0.7.3-alpha-1da5507.8","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-1da5507.8","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.5/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-acGXLeLrx/QSvCZmhm73b1ADt/YS2YVTHiuawP1DtDsl+LadUtImJx8kUZAF8XO3Cbaa0RNh/Jyr+MAnYPe1gg==","shasum":"1709cf01c35ba199ae1b77a0a25958b1ee91ca76","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-1da5507.8.tgz","fileCount":5,"unpackedSize":7062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1XViCRA9TVsSAnZWagAAJIsP/0N470ho8gtIigzU2k8N\nfbkTkL2HypqlqRQ4+kFSLj55KNB1woQqaQtxoTutHvIAZ+OWx5CyTlDCQ+xr\nGGr0/m61HoNXsesl9TDmJQgOeK1degn2UAfOHpUBmB2mgmaWFgmdI6/qRGtT\nyTOn+WDIufrVsKJ6RfMUHRLWgz1MUaUX3ui1iDtJ3TQmhzFxWw9pwDuno1Ps\nCm3qHyKiRWGQey/P5txWWugitrBvds2P0BXzgYw0iOkK7Qa3iH4do2h07GE6\nAo1rhBr1ln9d2hKJRtq10DiLzCrSADc3xdHyuRRhJbXrcgjFOsaz/QzhkwMs\ntyWbiQWdCdWydfif4/TJtzx9X3EoLBPO+cjJXD0Vj+EKN5lbuyvcNCSakIhH\nq+qgPCHD/Rc2/tF5ToyufjZt0frxYkpJv8PUYmbLVWyuP3P305LOG9gS2lR4\nJaD4ubzMwxH6jCw+m4EKmlYclN2cwZ14TM1AAzndfqYpPSQq1txLOLw+3UHq\nMCDY6daQNF6uNQxtAVTob8lkHXnvU3nl3sUoUUEiJE5cL5yJWCkwwrZfd3ZZ\nz8ymGY+4LYTHWh2/ve7649Vu9YywpSTXH1o62k0XxYmxBCML3vW+VBsxz7pI\nCxO9fmqV1obP44d5y7D/u3K5RZ3ziTHwMHq97RP7wFQTOrkVj+peL0HAhaSR\nrVEm\r\n=Dltb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoMupz04wbGfiRu/wTpL9tSE3Wia3EZqgwgb6QaTNUSQIgMHrUJGrcD6k9Tms9S0cPU4/tW8atTMhSSZ68vwWhi24="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-1da5507.8_1574270305783_0.20302884610020167"},"_hasShrinkwrap":false},"0.7.3-alpha-8d9b46c.8":{"name":"graphql-toolkit","version":"0.7.3-alpha-8d9b46c.8","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-8d9b46c.8","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-nsdjr6D7+pwO4NeIGBmpaZSmC8AQssJGeR0sEI8Krv1jBRal6gel603Xb/4g35e6eDFMuSNVPDExEOH095TzWw==","shasum":"589cdb5f4d34ffd594133abedeae0646e4688ae8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-8d9b46c.8.tgz","fileCount":5,"unpackedSize":7062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1XWPCRA9TVsSAnZWagAAiIgP+gLFcA8yrNSA5VS4lzMJ\nx4Hga0Mh/3xqGuUfxKtXqy1QoLik5YNRnCrDdcQNpHF+myJIoXdvitYKAWZ+\n8hVQid41YJQTZ/gs7JweWLvB4ntFv9At0GWqdYj6q2p0iWSJ0e0KSO4yU8SI\nykmjH3z4z2j6B2CyPKpxWEjj8/GKtcb4TfYOc5Q3BAjQbDamgs+5VeWS+w2X\n18OOCOPiw/r5x8MyQCcvnEJMMiBT+DMaQorhyWkMVi3DCdWRz3Rmitv4qRKY\neuU0PPHirzQO3JzXpot6lwoRVomSoYSxe/N6HGH6roIVuzZFUfzS+MDnW/U9\nQ8lr6MJBypEeg69jcC1JQSFX5H7xFqm2HlriRnRxG6LovJfuFdHCXQGsxw74\n1LsBhMrTIGm0Iy7pC7gLi1wauyraRG9a59t5dmTAtJixESPFF50NQZpJto2H\n/JMZV++csJpuBVHs3+ohaPxLUrgchx+Zpz71+WUKGlJZ/KJqHKkq6hocqq64\nmc6gNdol+P+YBFYj2yL4M250isy6LRajP+HxUbOvvM6LbryNJJ7esj+yw5eP\n+E4nS8bvB+Gj2cryXnCJDQb7NwKdKJXA6DNPyBiGH3F6fpv4QBS1cDRfzIjs\nPn7ZhilhNNXn/QfcDBK524JX07rp4qzxZ4zhtmukTDPHJgyN1/HGDln56tNZ\nNi6j\r\n=RLMg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCXcKMxfkTBiRO4Nqs+GDjfwyWmdf8W7pXBlBei8PtrQIgLbtaI87g8n1u3rNdOSiGlXZIFHN0bnWrD0JdPR1OO0E="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-8d9b46c.8_1574270351431_0.5131911249365522"},"_hasShrinkwrap":false},"0.7.3-alpha-dd631cc.9":{"name":"graphql-toolkit","version":"0.7.3-alpha-dd631cc.9","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-dd631cc.9","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.4/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-jrYojvHDR0QAFTfXdT+MKElnCoh5XZlAK+eshUvwpbY78P2V2SBbxpthTFW0hNr0srwxtHNF8uWWpkxvWuadmg==","shasum":"d223a655d8f991a0f1dd7152da2da47d6cf952d8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-dd631cc.9.tgz","fileCount":5,"unpackedSize":7062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1XXfCRA9TVsSAnZWagAAj50QAKCx3+Gshz4HxacxGchy\nc0JKYxnS8oXjeJDN0uCKLmoCCLIFR4qlwooq1qV0RW+naTMD5VawUwPj5/ww\nH954Rp5aX6RjX+W5DZSphXCb9qRwwdXyzj0fHLBivSih/Y3n+1FeeY2IQRlg\nozLC/Jmy1pTGRbANJ5A6OqbxIMFgXieTQAJvFI5GxlFcPSBopP5Zd9Eay6D6\nWWZLs7krv54rKmnX0rMielAW990QU60opgWiu2EYu39gKJmCl0yl6wbYAN4t\nUZa+AdkmtnlULQ/niuMcFjbyDoHKAIPHBeYmHqZ18Bi5pngJVXx2sJposX4q\n4g2PFEK/ZAY5Sm92H51DyKCrh225iu2quQyVNr9fR4k9HrNLEIDOeiQc/GAu\nA96gY4RwqKNNdZGeDsTb+BcQ7Q8o+Ik6ZPw1313qknoMoSyZL3K5AYdS4jyf\n+OwiGafTgwlf4n+iupmtxcC73RqNjO/oN/Ktbwk/lNnaoxplxHUf449QLon7\nzflEPczy0ehJX0M7chRylS9a6CmHcBhvMxGuPJtahJ1E2Wunwd2l3TYhtfEQ\noFS6dNK8gMgWbDt4Ljr07DUZDV6EbJ439OBYdRUX6rdRQU59qsfhgwNBpKI+\n2557OemXGbJVs9Z0LWnlY6dhYdDBAt7YWwpcuQCJZPibhbup5CwmrCJo6sPb\n4jd8\r\n=0f2u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGwPWw7Cg8D16X5qk2/GcMtWmQe6tGNpb+fK7z4vQ8tvAiEA+8cGgHuPtWAtKmCjWYGs6/yxaN4wezJ5rTM487lO/i4="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-dd631cc.9_1574270431025_0.3225493857393822"},"_hasShrinkwrap":false},"0.7.3-alpha-b1c8baf.10":{"name":"graphql-toolkit","version":"0.7.3-alpha-b1c8baf.10","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-b1c8baf.10","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.5/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-53BQAjd0euipfDw1fTB358OYskhWYZcX8/Ec3pRDyoJzTuNjnQzr3FlP4EI7CQwKra6NA63l+YfGTfO+mgQrbQ==","shasum":"8cc533aacce544a01733b611d4f3de91495fc946","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-b1c8baf.10.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1XaCCRA9TVsSAnZWagAA3ZEP/i7L2qH/Cd4ATPggP76v\nctxzrgQm5GKSMwiVS7gyik87Tz9RhTM4ZXtx3BI6coy5pt8kjYzP8VI2YiND\nsxdiDuXhDGk1/x6FGY8wbXiakSw/HRB48RFmpxu1hL/1AkaBOkvADyGx3urh\nVcbbIgVQdxmo/finIUtoTmaJQ6b7qKGlxo4PzJ9DbBMPK8D0GTzwwZCAXn7U\n4l1h5JnPISwUGTkxW0NFTceA38OI6cf2UotCquyaIjIHpR+6PNP2t9yZ3T8E\n6Vuy35THDJrCSPUQSB2T1lC4MkCJcMya+SotDBEDplRRLwZwM27EfMF/nyce\naYNt42urf+ru8VRGBwMWeDtQ7nzuPnt9B+by7p+3jSZidJSbtLGy55h5c4k7\nr5jkUh6cUdf+HZ9POUfVdYqoCYVKBpYbYmADiVjTjDKgrjze7SjZwyel5/JS\naWtSlRPd4x14jRzxOc5Xvqt8OCoqRA0uf8/1HN0FurzFQRSebMRV/Yz71kEu\nlmEc/Q8OWx5PJmSyVCg8sUAMHdmgYcho736R7NAoYtY6IZSQ+D1hSWfESp2L\nj13X0b6HT+dWgRVChEyE2ZH4ka3VHG7vXUZPuKuugunHHsauoD+mO6EPgJxV\n+Qtn8Bgx2aZhDENX4rH3LXiL8vq8olvCYgeQ88xQ6P59MfwsfyPvHS0vybhz\nnP2e\r\n=dcjB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDO3gNscDKsoywLvF2AYotR1Tn1Zf7IYZzlxh+7Qu9MjQIgc9PG4iveZ5Q1pnQvkkjbKDulauGMyW9sfhlFuW/GCfU="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-b1c8baf.10_1574270594248_0.09329029576198145"},"_hasShrinkwrap":false},"0.7.3-alpha-9f7426d.10":{"name":"graphql-toolkit","version":"0.7.3-alpha-9f7426d.10","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-9f7426d.10","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.18.5/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-Zh7a3uS6F06DG9agnaLUvtlvh8/JR0NQJe0Ib2JHTpKm+Hd8dr9eDPEHwoACikLcgLEqKPaU/qggBRcd/qWRTQ==","shasum":"1e07c4d976aa43398c5eb19012b53b4f45c71b58","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-9f7426d.10.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1XceCRA9TVsSAnZWagAAn40P/A1Qn6YAnToGg2qebwUc\nfWmoq4FrvxfgNUCJni9Tqxs4L7572ZLA9OT531eo3y0K7soXyEEnwvJglsA1\ndGtTNJLybKOdragS6l9fVAgWTUk+PcLqLnGZN3/b6xzUsTtYu9l/Q9zsWKCG\nOshg9nSS3196HJX9VmcAiWZoOM5lgc+nl94cZYadc37RT3etZaCU6OpR6DnC\nC6bIsYoyAv1rDEVYD8BdeGO8PSM0b6O3BfdZ/bzZES0fkwCeOjyLd7W8/+Ja\n7ZzxdAC8JhHvgGPSKffdLD56HiTOxQTDOWoLtfmOso7sOtgqKTlAKIWP+fLN\n+v8C9h4XkqjTrSvP9uqDDymrrhrYO18cD029jsU09WUjiJ1LzO/p+BHuBNK4\nPHwHcBEG6nxTxGVqzFD9zOlLlyl7jRXMsl9QaQcyeER7OLF9uu/uo8W6fWzA\nYfqLXD5n9F5yg8eRZPp4zYxxcPBfBnzcXX+FIk3nosdU4zXfqjziutfrMo7k\niMDgSfxhKl7rz6l3q3fKt5+ScKtsmj1eBj+zWb0VFp+6cWFJDEEMeLNPt1Aw\nz4sT6NfPcn/hbyW46Oq+8r/6gyKzAjamiU5HOxH3oxwhVpunUWAanaYi/6Sm\nDG2Omeb+KJKmIXF6V1hT9dNXn7nPXE+K03XQyRES/Ve7weuQcGsjJHzjVz3M\nz1Er\r\n=tx5q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFSllltm6Ly44y7GeJVOrttA6GwbUysFSZZevL0/KUOGAiBBZt3RIFuVEjBTztrVQqEA18KOJ5ZaqjHA+Dc2PyQ8ww=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-9f7426d.10_1574270750369_0.24939920691479478"},"_hasShrinkwrap":false},"0.7.3-alpha-1e00fd1.11":{"name":"graphql-toolkit","version":"0.7.3-alpha-1e00fd1.11","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-1e00fd1.11","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-26ep8GcQnn1sv4MQCNz9vNK3KxXgdunDIAnaVgx8wH2jc5IwQdnQ3UDF4OADg/evUAjN0Qcr5SAyIt2u3u8nrA==","shasum":"9c7d4c2ed6edaeb08b3229195d99b9094abcf130","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-1e00fd1.11.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1bqiCRA9TVsSAnZWagAAJdUP/igIiViJoPLwX0xDugWh\n/wz1vZfmrFc+7gmrT2I8SjJDMiXxcngYsY5po03tmRrtvXM+a7X54moXxZIe\njPgMOIjtAWORJyWIv4MmXb9Fh97mX1xJxitqHCSGQ1AIj8W5mvedgbTgX67n\nn39NaB5vxxYPjSF2LJTcFVmt5Ygre8D/YRnq8ctbyc4FfpnayqKe8FIAF9f7\nHS2ifGgfpHd7W33BEWdVPwAGC9EEsJAtMm8ZYJs0QVpZr72f0KoDhUpQ+u99\n2hCOThTbzTjjCg4rxZvNLbaxH8bv0YGD31B3HiRGPj2jg9un+f6OTxYlmKGo\nXVB/0QKxOlzMPhBinxowg9GHwok/OPq+CAufTGYcBpqYvQTYD9TyXQFiBgWa\nDMGn3kNQQr/HtSa0O1KPuQV30YHzDSjcZxfIcUDu1Gaig+cplkzurFYcg1OA\nFOPyD1Ro2LgsLFxkBjlLXdG9S+sjcnQmoBr5Eo/y6jBI/dWPp/9UhIQ8RyYX\ngvKfMZHhQwulhREsZNN53Us4TeVek/9qU8CxvvFytrJ2yZRZ3HYglGv44MLN\nnthScrrqb+R6G7Kh7M7HUZ/xKWzpOpCwEEfvfMjkphmpeg03S2lC87r+/zCZ\n/c4WSshPi1bKy6KzpOIyfsc7roRaoApZn5vyD19n9ClYOKhrPFn/BwZ7R1xo\nm+3B\r\n=PdHI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDazMBJPKgF8R2XU0votOVyvCQtXZyb6tV6IJ4U32i8gIgORc7oa9TGZ2SLNLE1PuRIif/tG+g0LgAOdyL+yGnOBE="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-1e00fd1.11_1574288033940_0.03548297365240938"},"_hasShrinkwrap":false},"0.7.3-alpha-c03cf5b.11":{"name":"graphql-toolkit","version":"0.7.3-alpha-c03cf5b.11","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-c03cf5b.11","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-sv7g2qM3f79DjA8Njy2weSQ0diyUlHvOdPODdwwMTd0rHi8mv/xw7c6F75ntRNKewYIHsM1p1Y5qZvIKWtGkfQ==","shasum":"c4dd5e1b8dd59a7f8ced8283ff46ca8da8e71168","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-c03cf5b.11.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1byDCRA9TVsSAnZWagAAhQYP/jKPnMYhFaca+Jhz3kjp\nR1tknK1QKYt/dtAGVKvWPRks12kDIlSx74Pv9hfmJx+ZbFPlJlJHVWADWg3P\n7rc4BirxoDIpC3E2jSyrMqnZ2v6mkwto7iH1AzFXNFRtUb0M7tFJLfv6ge+R\nRbZjxEO83CBHChVT+oiPoBBR4StH9ZbHim3MC+lo+cHlanbIYIOqDIYicR6W\n5du86x7zAVERNPH/iSyBHWs9QxC7WR0Ow0b2ztTUVofNO7MLqe+7X0A+qBpO\nl4scqqTIh0ozLrhP6o9ifPKptwG3jtV5JPX7S0YvDYvMuv1W9q0Cf6kkN1tr\nSVg6XBuwZb1aXuYCSrncXlQ6Adm3QoKjldQBXtiQa1tkpc74SXYpPutCp2Uh\n4YanpVRMyEQkQux/31nsvpw+pJK6gd3z/Mungevy07Ur0TfyOchNVoiBTDKX\nHNk/U6gJ8x3SYu61ANd41XIj+qx2jWS6VKk12Or4nTGs2z5BIFepFIs/n4TA\nCUc+xx7fI8n/KjCREoqBno87WsvPft0iZ/sJa0JulCXBmJ/oI/Ygr4JtwClt\nPRKuibatwAavVru6QGsYpi05N4VXh0tzlLi/AMKPy4QhtoCJzbLpZStbFvSl\ndOHguVnRbxZamGhzSNyOathDRgqDdc3dMfvsG7fIWc6GztDPnlN2jZ2K2Aug\n4+NW\r\n=9tpx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIxzanvw6I0xYQRcBBcHrnFNUgdtAJiTOX8M/XEKJoPgIgZZ7X7G2FTKiqzebYq+pZ/XRBUD+ubyjbw29+8qsHeAU="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-c03cf5b.11_1574288514665_0.9483568684561952"},"_hasShrinkwrap":false},"0.7.3-alpha-3ce4565.12":{"name":"graphql-toolkit","version":"0.7.3-alpha-3ce4565.12","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-3ce4565.12","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-ZUCuPyC3TKeXAXynG/kTdY9RqQ09XFn5vFmGE1bxB3bpnIoDUZ2EQXSt1Ju+J6WT8gX4QkRSTWjbUV+mVtB8iw==","shasum":"54e5f8c826826dc6057e161c3056d335c0195281","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-3ce4565.12.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2HRnCRA9TVsSAnZWagAA/NYP/38eZZyomvHTUIyzr4VK\n0AhfS7octrZ4lzxahIof7DMpn3V3GtgLqO+cCo3CMH6EVqh4oz5e0XsTPJyW\ndDTk6TfrYJvfcsKYkKOq8e7oUHY3w9poaN3w7Y1k8ObLwHnNXxokUAzTpvxq\nGhOdMo98yGcWANGm78f47dMxHmVqp3nvc66CAIWVL/5j4JiZLNKLeJ6l7WMH\nf0fzsCRYnv42Lr7jnJr+IGeka8SgEvJ4vsOEqejLFdbRNUtDgEiWuDVqe8Pa\n8SMMedxnDXmV8wFqu8Wh+BwJSS4kfwoBclcxqVvAnsfAPY9WHyn3LiIjnO1j\nr3s6y29pJvU0/2Co/ZtyINQOEJdysHyc0ikgVc0FMvUhVTaIOTyT5Oz9ZHtM\neGDoFUW4jHT5GDDdLy2zLvCSZL41uQGwF1zecYm2JvJUgeIZ0gGsctQe0r6V\nIxeXRhhHz9kx+eDsKPFPWcPRRW+J670ynnXMpJAe+4ejrCjuPOSgTUvuzC4U\nfT9JcW8zqb+teYArGetnSDBXInVNpBCSRafRBIp/9Z/McxQgr2CMaZXN/V/J\n4ov4WVVSnd9Y6bouM+ViQKYz1Te+LbxahpC0cSI2ovUT9/EmHC2AtTpQVbgV\nVZTq69OgZQ5bHZjkkA82okv58ulH673RLObu6iAEd346pZGor0SEGLLmVWJ8\nCAXK\r\n=zitd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH5pOWwUUAcsFoXHnzGRjbaihgkwG9eC6EpZ5t+jOvjEAiAB/2WM0tmEmTq+TwWJX3Lql8tNgzwUigjQPpZYqOmIhw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-3ce4565.12_1574466663280_0.7857690082019582"},"_hasShrinkwrap":false},"0.7.3-alpha-68d9623.12":{"name":"graphql-toolkit","version":"0.7.3-alpha-68d9623.12","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-68d9623.12","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-KHx5yBAAqQxNtcbdob9BuPGJmZwm5Om3BG3oh49hMTtUVV0eddUyJgQYyIRf9rbVGcpF3ojexRrx7rjlhC2ItA==","shasum":"c325219cc0cfeeaab5416e49479a8d5c477a14d8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-68d9623.12.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2Hj7CRA9TVsSAnZWagAA3QoP/065JumUB1a4rX7PgjeA\n+AyO+5PIep0sVod6m5d2gmojp90sH7pSCU/5tNAienXSX4Nnznm4ra+rMdSK\nR7K3E3ZFnHGrBOBum4k3MKzZfmHv4msbtYJTlGRF3NEgFi7lqD7FGn/577KZ\n5YZ04PQ32c2eqgTPvCFbobjz8koI4VjIFN4wKE82unlYh+nDoKWDGv0KDrNS\nx4EdfKgVWxNIasfFBdmPkJf9XOQtVB9ofpq1zo+nad+vvSVT5PPeUAG6FIXH\nQ04l6RUaI4wLOqC8WWDQe8A/Cjxb+I1XUNkdwwc517A0SqlGN72MbLa57IbC\nWz+f2x1YHbFFrEFkcBk/XZ6WpSx020xHlZHuJ8e63AFZnO8ttRqO0dONVg8g\nleNCd03P9ZlpCMnDpM6YZdIQ5OWumQPJ+Om3cW/eWINQkZl9GAmqncshHsU3\nwYL46xshdiHzVu54ioKK9Ay7RuZroeksSzAkWf9Tvz0j2a+ipODnw+xffXJj\nJiv8vn4tF4sPEVCLwP/MkbMhtEVhPtGxy4njbbBnQ/EDIpTjhbpWxa8HXnuh\nj9z4z/WV3AAF8mrxv/F6getZ4Ugy8/iXDqN8i3Hz/FfM8IE8DGJDvqnkNpnD\nJISoRt6yQ7/obtqxZerQehkI3D+V8/+s1XeKNY7frlbH6nq2eCTRLNF4XgYh\nwRcZ\r\n=FpTb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDI2wtFhECQdQQBXxXV7xGtJHDonIS3U4ZUYK/szizCxAIhAJKNuA/VOWUs2TgDnN0D0Jph3UERc4HiLdROG0OVlCAw"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-68d9623.12_1574467835279_0.4777816611830388"},"_hasShrinkwrap":false},"0.7.3-alpha-556de95.13":{"name":"graphql-toolkit","version":"0.7.3-alpha-556de95.13","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-556de95.13","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-iBM5LPY1qxAWmlDNzwSpJc9WML2PaXQfhj20+GZmN4iOLJzrm55jVhJWnHdxK+1JhBRWAxd8g5Vs5wXC+pNLGw==","shasum":"bb06ba8d9e54c92929e030f2684df96ae5a4c8b9","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-556de95.13.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd2IiLCRA9TVsSAnZWagAAXoQP/Rq0o93r1MUUYp4WaqWp\nGk55ewOR/i9xl1fNmwneHntxm5i52X62tsAyx1OXKk8jeXPIf1AatMFh/dca\nlI3KQP2/pTKNySeZ/iYdiHb8FO6itXfVCmgTgk9PboTeldidj9kiJDkFylU2\nDPAw5WYatAy6WC+QE56H37GG8XYKLh1AfcumZufG0TwOmAe3dHAfYs3mC/MI\nr5F2r45Y6uN2mWbUrBmEQLfljFqF3DrLzMrxogs1JjNlpyKNOxnTcIo0Srhb\ns8WOlxptT0OPmo+TG5suggs6IjY3BDXwCYr5k7tEHHWCJS/PStoLkJwwIlHv\nFVO7oT24DtC1HaK+vAtSxOz/Wri2mqOxJCd3MxeuxBLBpirKuKnYDyRwdinq\nz8e1OY7yPpPZJQr8+cU9c78rpxQjlL6FI2CnZiVLCG6tRru18HiGlER0P7rJ\nMH0ZPWLkHBa9BB9sMA7cK+a2ZS+brd1Yls1thSEdeJgobg2/dAglJzv84HU8\nwmGB0o05AB9vbQWNwRSF6yii4Zd5wMhHlT0P9HU6AU9NfZ+Bx1FB/qpm8NDt\nt0UmEfQJAINGZHjMOaPtQ7j9RVkSs8uhSJtnTxLv8GDv3LGGgsrOHG36eHJy\nnGZN+95I4l0MYV9vfW8hYR3zN7TeLMSRPdyWWf3G/DdEjaR+NFzpU6htLTQf\nLcAp\r\n=8PIo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFS3Hm/4///1cm797/CkhDQdCfZJTDf0ip7rL4K+lrvxAiEA2Nsgen1lHXl6Z9T0K07NcclsJx4EuL7sdVKKBSijSjo="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-556de95.13_1574471819494_0.24580972276419377"},"_hasShrinkwrap":false},"0.7.3-alpha-cab656c.14":{"name":"graphql-toolkit","version":"0.7.3-alpha-cab656c.14","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-cab656c.14","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-WlsAghxDeBw0bNGIvn7bYTb9uq1zBq/Y18YQxpXvxrDLBdZQsnAYuxtvftg1+Wj/4co7VuyxnSGTvntvVF5B6A==","shasum":"443ee3d19061ba24637ef6e7da0b89913cd0e3a2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-cab656c.14.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3FQzCRA9TVsSAnZWagAA5MwP/jvSs9YjL/xd8PK7xuNb\n8BvH/AzIm76BGpnKuKNqwa29VhvEuq75WSndoYbUK3AIvq8z5jOZDMN315el\n9c+SefgNEELI+xC8W05b+Ppju/KBHlpoSTUQ14EAL78UzMhBiZ7h3TEF+oFR\nIVdpCaKNxe2dzES/FHY1oou94YL44XM2XJxlA850S7oqnsaEKG0HRt1WxkYy\nKEDustDeb8xWDXIXDUzkjlPQS3B1aP4HbvbWSTLO0eNUZjUVuvbmxdojxjGi\nASwqTtO7/hDLBiUQPJTZunFa84cTvJeIfBUl33JbSFb6tbLTi2QUFpjV8bSX\nfWVvrbhqnob6+pUgj/IIvzIuKZI0NKroXX1kIINA15bsDP+dR3AzIFbj7h6n\nGVeQ0QetrLp+9qPkx3JmI6xBCPtIbInTwkRNV7+khDe0JVcrYAiKcuMCqflZ\nlxfflFCPjhbJker2g8U+HKSVy9deGInOtPpNkOJVk6bmT8k2t3xzdtvItmOn\nqQfofMR6whFnBurIqwXgcQZe6iVe8n35HHsvMufjtQa+ZVYHL43abDNrMgCi\nLJSOUMbzh3jMB71zdtMUNdBdfoQyDa1CAGn3jz+DuxE5d/nNz60tciuBhFcq\nfjT/B1XPC0sPbnHXFSDlGZRuBaEYEo6AwHztzhEmxB7Ttafu48NzbLBxU+kU\neTIi\r\n=3b3B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICxTI9J2fxGlex6d1sPHy1saIbupThJJB8UeIArLME9tAiEA9ToEEC1jN7n+Oro/7fY83rl7m12TLtzaplS46OEUaFQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-cab656c.14_1574720563321_0.22858138653573157"},"_hasShrinkwrap":false},"0.7.3-alpha-2f52e46.14":{"name":"graphql-toolkit","version":"0.7.3-alpha-2f52e46.14","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-2f52e46.14","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-UwZ2rd5r3LiVWxjOgi6AeuPhQVZhyzUw8Wmtkw8+/z0FcMalRsb/ZeIUpjlXlHXXHw2x6efCgX56Me4bXvjZnw==","shasum":"ab224a7f5457472c361ea64c944c982d6663b37d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-2f52e46.14.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3FRBCRA9TVsSAnZWagAAo9EQAJgvzcnDITsY8vlz7u2X\n552XMdmzWDKLtkyzwwIW0g/pKRUVDDT1aXyrYrsatO5zsbpmfcHGTv8Si1+u\njYXWiwcZQ8GwEItgbsfKcX/aYm2gRKOSuM7k2m7zTLTBt37HI5HCdPeYdQeM\n70fKXqxsFe5ZCgg/fQSBen5bmkEUEjmTweP6kWKKyxPVIxmB30n9bJYqpNfM\njJigb7zqb7/Op3oXE9gkp6CyprJfUfHmM7Dnc62PhudyVsP+KUu4DBna4Czs\nrVOQUzwGRixEh6SQMq1bTH78jx5M6LswZnIEYLX3cJ6edamQpeki0MRkrFBK\nicYoAqNXRXk2hEYzfp0fA2mqybwLwXTsjgHLBriOSf4Vxy1zsnCXLnFYZzEK\n10Uexw2r6mzf9MJj6GZpfF/Zy3WcPMl8WhxRmtfih987l95MFMfEIMg7ZSA5\ntlGMvZe5Hfmy+NZhk8av9Ap1yNCZUoEvFZkXQfyPAR8/vDOZZoSanNcWWPkY\ntjztfvp5hjW7n/Wf3SUVWaC5Uai0gUpXOkm3NKpkruFmhoINdkacid27sW8Y\n/JzQY9UK6Kv+89ZAG7eqY6wka+ck0J2Byx7uFcFoGB6ih4+sEheTN5EdzThg\n9CLR27vcKe4OcsqELvbSxfCB2z9bOUmzEm1skyZ5p9v2Fk4XOQEwRuV7VJEj\n/IwM\r\n=CsDF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGsNO406EZQ3puT6S/owlIK+UrB6hovQjSd6D9z5NmSGAiEA6jqwdAGWEF39WZNtO3vrH087FMyt6OdXDPqnfUkHcJs="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-2f52e46.14_1574720577613_0.05691735327842862"},"_hasShrinkwrap":false},"0.7.3-alpha-b458de3.14":{"name":"graphql-toolkit","version":"0.7.3-alpha-b458de3.14","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-b458de3.14","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-siEZnHDeyAuxhSSbkNmcmCesUMcaEkTx36zvn3AVGWoPHZbzNXtT/yzhoGknIcm642/nOEGPUfEYijusnh/cLA==","shasum":"4d104421b0a8be53a54f0ebb6ab9e177abd6860f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-b458de3.14.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3FfTCRA9TVsSAnZWagAAOh4P/1SfOTJdIsYN07LsV+EG\n/VVzR6xuc2HUf2jpZNc8t9ZGFZMK1XKTklRWMesARRiAxPV2QtslY7v0IGh5\nUkm/uI+G1COPtK8ns3yr32ATUqWeZjnTiNDO8iCjAP+JRdtwcJtjMZl1fJ6m\nrE47Y5XviSah4fwlnqxX9UqN5VkE/gBXHYtd1hbVOe0SqBRPcawKUImCxv3t\nS5jDBheoJjRlvqXOk36G6YESerh9FfXGdFPGZ8JUUQJtTuZyHxUkrdtJtr0s\nYyPlAu8L9E4LkXG/cmTjuFIWidW8qKQBOwHE9cHLK/E5Vbx4xA54UhxNM4gM\nE4zh9RbuBKCUNQGaIW+C5sJSX/vedoHM235k+vzMEMHSO+bsSe3db0FZ92Yi\nUXJHnn3L2LyqlWG6qCML6v61zwln/QhY8hYsEfoF9YUiJbR7lJ3khgzbpXJx\n5GyEs2SCT81aWZy35czyeh6re9OrhRL/LQ8/Y5XGUoWRBIzOXw3kWVZPhqGm\nn+uu81zKmGREik2ZEgf2sf00OJ75MgfUlF2wNPU8dxVsWSK+WzpINxtixVai\nZwPd/MjWpUmqHoH7F5W7n63HtLoBd4OMUSIFNMN9LU+mAWWFxVWZOIqM//pj\nqDzxjd1vRLwHpdoGLPY69A2zLAN5WUjTqqM4N2PgVayyLc48y/JIUVGwKGVU\nJdLt\r\n=cdEd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMJeTU5/gNbLz400ESXFKAJv8lj9D2yStMAJMBw4t8wQIgP+Llm/hoYIaxOtfGl38GBd/GGQKdyBECWQQQCdv8wOI="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-b458de3.14_1574721491121_0.2996280492982779"},"_hasShrinkwrap":false},"0.7.3-alpha-b67cabb.15":{"name":"graphql-toolkit","version":"0.7.3-alpha-b67cabb.15","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-b67cabb.15","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-vuavpsH6FDU49vvr3TmBnQKiYirtATxc/FHSaMzH8ypBGJZPzwMfTMAfIWgp/ejJ9An7FSY4ARFC8RQIlNME6w==","shasum":"24bcc3ed67bf2476890df4bc11c533acf040504b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-b67cabb.15.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3FkLCRA9TVsSAnZWagAAuaoQAIL1i1EuN1S7Bb9bV7ay\nyYHrB+WwDRDQDD/7r94fCzjE+P2q5g990vXzLP4E8CUsiKrL4YSqQzjwRXDV\nKl2ipN0AwgcMyTv1GnvWiCkiDMqfIYfandDNrQFR/fSvNPxFSmRc9sOzzLlB\nt0x/6IjnWhbeAIQbYIPfVK60//OF1CsD7Y/hIxmofcUXSYLYlWOfuMjCngCG\nXiqsO/zo3wIPejA//13ZKU4fCWe/GG7v+d9w2ALhdm6iGG8oNRlI6C4EEp1i\n1JfHreskeSmkHW1GxE7B4ITUf0ogIC1qzmZDJSSR/lPVGSoFEX4yJwtQDehg\nNGObU9ql6K77ZsdvVO50IJXW+xwJto828ZRd5naQrbQ8XYNgoVBCI/VF1GxW\no1m8Wwe8Eb1mCOtA1YBGz0wEIn7OJ5DoD42GSImDPJg43xFm1rC3YbgmE6wV\nNpkMaeLiLscoeai9LQ4jj+/BPw0B62J8RKpWGdyDRVQYFdPqWkiFeXNcEu8A\nUDpFVgUMBOyqfqbscbDdDhLT42sij2fAzkyprxFYJ5EZOCqVzYuAuUdQFfPZ\nj0fqzTnhEcH0rp2j9LqVftARsHqnfkDNrkkvkj7wSTbkycSuUaqGwf4fkvXA\nB9MIZ55g20wcqZOV6gfamtIpvTsBdS2d9sSgGUwoC67vRjPnw5ydCDAwUv69\nSQyL\r\n=wG6L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEBN3u2eWacMfWv2EiwJWo+6GgNyuwhHlM/anvxj8JJIAiASKxwJGnR/ap0eL6V9WEWtEXxa62qoRsoxo5xKGvXYBw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-b67cabb.15_1574721803312_0.40138468237223646"},"_hasShrinkwrap":false},"0.7.3-alpha-10ee5b4.16":{"name":"graphql-toolkit","version":"0.7.3-alpha-10ee5b4.16","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-10ee5b4.16","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-eOm83a+uvM7V1qKZ3nbj6WcgPViHqRAgWMFLe3Eh6k9GzmW8F9lRmlGCdJssLkuvk/VTBcmgo+b5YnDlSTtnXA==","shasum":"3491bc67cc509ae3b4a87aa671cff5a06888c9bd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-10ee5b4.16.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3F7GCRA9TVsSAnZWagAAkG4P/2fQWKDF3484lLdPMu7A\nG9EX7cfd3GYWeyqn/7P5bMTFC9VmpZ+0TDBTo0ydDEEfQowbFrA4vqpKeUjb\nJDc1By3rgVAIKuy1Cjjz13G0ij5097hn2OYvIdhgLP6Q83YuyeeWPNMYZS67\n1/9hyjPIpQGmkiFCRCcnQrTzdCB6aPgpEXTu5uIsiPymTirdksdmSbpDGMH/\ncH73i975Q2nu7UDClRT/SqJwnM+gwOJs5BnDVYTadCqEuCj5xOMq4Go0ZyTS\nNK03g6QWO4fpIUd8RbMSpdUV4J2KRf+2HClCF6oOrn4dnlYzJUPZkruk7wgO\n78NpsCtqKw0ftUK2oU+TCEJATrUitq5q3+dcGCttrUGUnD2E2Ku2EMb8yQV8\nSqOXqj1kthML0k/6ETYBMva05FlIDPvw4vy4hC0pwNzcYo/LbynQDyrp3po2\n1wpLx+HJAAMl8JQpAQl3Z48fq/J4fWbHE682P0uW2C+0VAjbV5fIRVyF1qCx\nlNgRjRXmfYNRIwELiBgnE/RUwE1UPareWumTT7m8uGadD03ZYqTjhVlKL0I3\nBxZPJV0My7IdWgCiapnHB7udq3J9wHmT4cSPqzn0YQ3WOHYr6R8AH/+d7cMS\nrRpAvjYS7kdRkrKEUSdcSk5cYzcyYkyOtjFXiZMYFHzKRtYRjSVEFbaay6uM\nQ94y\r\n=uqeh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3GBPTi9u/dHWnycPSqTuD8VuYg/2NoSF6L/zIpieDpQIhAO9eZMLEv6+IG7DL0zvDFDTHkTCS1VNjjF26mHZbDMeV"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-10ee5b4.16_1574723270104_0.6224673923043653"},"_hasShrinkwrap":false},"0.7.3-alpha-7531039.16":{"name":"graphql-toolkit","version":"0.7.3-alpha-7531039.16","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-7531039.16","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-shc45qzcZxZPTouXP4GZwZ3Cmqt1TJ/iWG55oOG7Z59NJWEMvhHUcny+DQPA6dGPrZi3G43xeulLp7ydxwU68A==","shasum":"ba46cdb3bca341595d13b2ddc472abc41d09951b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-7531039.16.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3GMnCRA9TVsSAnZWagAAzCgP/0XBm3XmoP+404On/Ig+\nNeFjo7TRvT+7ck6jNkSJSuPJj0DvJgH2+8pqY8ACUelqRpG3FJDA2UNQpzUz\n95wv4ao9iEeT8jTMaaLyREY0LUtLUyVzF1oM1WW0EGUYE72BMjsP/0NvBDP4\n/ylhrgwFKMYoCX8VuZNLppv5mWvl/cJXtnkRbW3Gi0nd/pPatTTr2iXKhO/3\naXadOZMsoAu3cXnTgg9TMzWekjQVZrDWIsgYmiZuR1+eUg6nyiLx5TOrAxJp\nr83yqdx3bcv1bgiV/zOyzTabTTmAPN+6xmgw/zYWXK92XyQouoVfVjN//bPP\nhPEzkPMTBf5rRe5OMytEPjTVS5kovm1MH0tf7gVx7Bmtgb4cRzpcfbzFXqVU\nQdNHETGSsfkF08EBU46eWr3G4cqdKWkjv4+MW+3ZQCjrCgrYLoKG1Vq4+0Rf\nPa+ywDmFv+ylZqoN1yDRng7RUxfmZggQOQnvpuRN84+RF4bslwV0a5lXU+Ap\nF32jZQJ+py1veRSRDwItbySRo+PLC988tnrTQ5lvpLYmNU/Gw6WCQ4+KQb8S\n07RRzx85BuuO040CJg76Httdxl+46p2KEqykJApMpLtPhqIbDLSbKlQW6pLQ\n6JB9nP+7pnDOk8tRLT6sCiAfCps8Fpo2P3JD7oUeLfeGnuOWHtLWc+XQWT2y\nGg2O\r\n=EAhS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDf/lzhTH+KaNhxYhNtm1rQKEQ4PoPRcOe/Sd9tDcTNvAiArMhL0r3BsWRWVJ9HdNy5rqJ7iWgg7DxOSigGYLQU6iQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-7531039.16_1574724390467_0.8666017092857647"},"_hasShrinkwrap":false},"0.7.3-alpha-5003209.17":{"name":"graphql-toolkit","version":"0.7.3-alpha-5003209.17","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-5003209.17","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-qSc3+LJPsIdFZeE8d/DqdUAHU10p6D746Z9DhrBMTyKA+EAFxpVjFyQwEbgymWDS0jnm6wQssiXWnAvoEGaAqw==","shasum":"8e81dc39fd138f34d3d2efcccc93ddef3b053471","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-5003209.17.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3NQ7CRA9TVsSAnZWagAAvHsP/3JwQRnsuKjJYl0dGPdq\nv9gOjTddM64o6Np6SVIeAszU2JGPNNrdfm9kEEc5QMZf94oc1j401RupJZNn\n13W1OjD4kD5rMEAfgL2PEyUdXTGJID2AIMfvtfW1euteIN2oBuGSmOfXPg8A\n1QJa47Vt6ZST0lRJNPFYy/YOO5Ve3i0oewISl5DfPLDHeYjOJRh3/vkJvn5L\ngHPv36Ruw6Q5/cBrcZZzn01UYsKGmfSfEEcodNS9RLNdD0JyxCeA395+lUSo\nMl+1PiKEb67wZmQ5wfOae39PrVmG+X2FGGdQf3IV/aejABLCN4Sb4EEmvdnM\nt7XXXuUtEKQ09bxy/T8sWmCecGrwF0CmOPu2RarZWVK9iIAKfqHEbU9Ps1/e\nELkBocIEpNU48SDHN1Blu6uSCjys6xyXd/gokkl1ozVasalO4Vyk15kL25UG\ntuOagAElUFegCY71NCEhS8Q2muo8FRhkD/1yQvmLCfwNUH8wiFwlG7Vji1tS\nTRyK7akr27RIxxtxzEETB4+s1+ro0B5M0gzZ58YtSvEnNZJDaKn3IJJT8I/C\nqoWhpW8ft37RG2Bt9k4LocAAHg9vtg7bCE56mI4pVkOwyN1PJnpJQvCXrSI6\nzL6b8PLSPTjAWm96ETeE/acSJ/96Y5t9OlFIZN+qiQJyFuy548cY7ZvZW9kx\nfzh/\r\n=A8/g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHbkxJosVx/6MLv+UI26oot2DGP1IhvSa62OqeJR5mXwIgPXC+kk7Wq6JQDLApw/u8B/b/1q8wwSDw2Ur/MD4aM10="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-5003209.17_1574753338731_0.5144297130938822"},"_hasShrinkwrap":false},"0.7.3-alpha-067e498.18":{"name":"graphql-toolkit","version":"0.7.3-alpha-067e498.18","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-067e498.18","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-r7bNg+el896he9KFozTpPs+mcju+Opo1eK8ctNU3qg1TEAu9FwRQm2qLHa9hszoIa4HCzQoYyLaQVb9yJpBlTQ==","shasum":"6521ba711404bde0af327eb75ff86dd79bdcb836","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-067e498.18.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3giDCRA9TVsSAnZWagAAxDYQAI/8UybHmwuRxGL2bDuz\nT7yciHTW45IMKrMHcHsRcAslpTJeSBTNvMVB5A67Lcg2152WivuWJHaFOQNT\nGEx7OhuhHFAMTkOwX3KK+XOkq8dBOGMBtX1al9G589SWR7rwtcj+bWV0i1o5\nvQwOkJbqSdhbgDD3/RU9or0PmO+0I2zg8PMerR0Ky3aPJjsf43bKqf8WV2+x\ncwm1sIIGSMKsUrDC7FQJ5GuCdDaJ/OqTtI61kePo3rNPniF/HQVjqwQXfQbJ\nJ3lTrIDJO2QfaW1uBmAtIoste2TKU2AGSK+wSDJnx8bxbGSjcUFYly1SWJcQ\nUfvlTYc9emYxSCmAoFUqCrQn9Ey3C0XPIijyeEZ4vIdKF+Wjf/FYimJ9nvLm\n+JSNhJ0o8fUWwQ+ynCnCtYvtxCwlTbGivOGEJ9rdOVEXyOxqz7rXtSGyrFeb\nnW+G335A2cJYY4untAcKmGoWiU6CIziPKgVexAEgWd6h31bllWO7M1SeyvjM\nLNc9hJbWj4QEPBaKIvbr+rid0TVI1a3sQAzveSBtbVq7VqRVtCjY5mhZK8e3\nJZjvQ0ZJWMVkVgTqRnbthFwaX/3/XYA0okKxfL//Mb70fTak5GS1UfNDeZwQ\nze4iEtLpVmJ6XkFhmgCa8APG5/+BVWp13ABFV0wdimoo9FN7mOkRmqGGIIoT\nFCnl\r\n=8sVv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIChcWI22i3nmSLDqImjL9L1pvRXR7CMgw5Eeukn/IKlQAiEA8B1bU+4yffBCO6Vtm2XlAMbO/hNEGg8kkH2zGmjr6r4="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-067e498.18_1574832258870_0.36428311284002235"},"_hasShrinkwrap":false},"0.7.3-alpha-e6ea8bf.18":{"name":"graphql-toolkit","version":"0.7.3-alpha-e6ea8bf.18","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-e6ea8bf.18","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-iaT7Ei9o7K6NsH0U7TPYKTYN/Qi4G77v/e0sec7mUnH35KvWSVdIxHJJGDLGbkvjfa8L9abxjSKx1BHyzJYcQg==","shasum":"61e91c712e8f26c76f93e557d1cc8427f0eb55c0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-e6ea8bf.18.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3gslCRA9TVsSAnZWagAAp00P/2XykrC6EKmoBH34Soxg\nlyJzjligomy/0h26nLUUSH80NfyYVI3H2lHYcgh5JNofSJixulhqZ0uSsYN8\neFiAv2tieTHXCACrXdSKMTXDjy4H2AwOgPZGIjXOVRZYMUVmhzg6jTLL+R12\nNDg6Cgjgn0lFolZpTDgmlaw2jJKdoIzs5MEu/+rd7QaR0qY6+bOoaVpoaqOc\nSBf+zxPT9bhTRKLzAcm2iq2pm8MmQQegei5KSgPfBfbQ7fOyT9kF+grO+LpF\nlijzhg0iYCcvnaqpnGntbFu/t1DI80Rf3wU2JrYzzEQO+pgqlfq15SUriNVr\nyG4c7FRAwPFtCSMzAMyEnpRKgzHs7WAqnW5UnoCIWhePLEgoyxfs9Fcp+hwV\nGuuOGLc8mriP5bPcSurFGslE1csCubrZ+4HQm6Y41RQ6JW5UyaKSyjuLXih4\nZx0vFymPPgYYaTt4bvSlkAg3ZQcGmyQTNa6yuIkwrDw5ddlHH+6e9y52TVQX\n+mfXZZTuvc2emX5klLVcZ+sJABAoCngE9lAny+M/pYXXVDPTNgthQ5k+P2mI\n48GtK+mwEF6X4N4+VPjrIzS/d7fewaR8BdoGNJRuMrJxeu5Zuu74o/iAEy6j\nya9yJJgH7pyAkOjbw3MbR6xjda6Av0sn0SJfvs6LTb6yrzROxsh4OutT7yLH\n363O\r\n=ow/3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICloIONsXTBpOfr+SuYEl8C3qzxhK4lKjOQGEpbDYu03AiEAsRrcXgpy39AIwGNXIZTw52a5ARmZ+JJuKGde/wcZP9k="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-e6ea8bf.18_1574832933110_0.6876162619618029"},"_hasShrinkwrap":false},"0.7.3-alpha-1540beb.19":{"name":"graphql-toolkit","version":"0.7.3-alpha-1540beb.19","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-1540beb.19","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-NI2MPIHYx4Ehe0ZTYoIZ1i17QZL6CDW9FzE0VoaKm/JT71abXunPNFzk8B5YL/PSxrYhFJ+UWr/bl2ziYu33tQ==","shasum":"3e81cfb2bd84d55094e46336958915845961a152","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-1540beb.19.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3o7xCRA9TVsSAnZWagAAROwP/jtRGq0pg9VeZe4exJQ3\nd6zQy6qf/LWOYl7YUVd3dsufbqh8WGQcxsBfxu6d29TRQDMJPWgROB+dP0bM\n2bQ+sYFQ1eC/48rUVJUNtwiNxMXy3CFx1P2v/h86B8LvvsWVI1Ej1kXwF7Ve\n0m8flynK+zIdipmknokqwwnhUpVSpoiC1RE1QbRm+siHNUfgOlRBw5nfX5Hr\nqzMXZTXIyeI5bfwUtafNx8WDP7lDZdP600fYCcIn26p72ykHKzNAegG8mP4L\nhMLWN0fD3UCIAwqAf8YRcKwmz+c60IuO4vxU+ySr5Ys5TdeJ70SnGL3zK+bA\nQTpiyqHianmTKSpBi2apC9LC9egV70FBEFIXj4bxtWldxWDvF70qmOvklDzl\nyni7OpaEdMvP+uFbOHemansK4/D5ilq/Q9KTxAIXK5i7RVGot4yIVz1kCZxS\nJlOrPHcz94b7agLetD3o8k3cAfOxn1caS8VtGqWuvKjw2edwpPb67HDbcXSy\nM1XAW0+jgrDqbbobOozjSMPUiHagAZ1E7iZVKenc+7N/EuJG0TaP8+JnCGC/\n8htgaCKaC6kWDaHtSmVjSbJsq7HplhBZt5WCDbNFI/9MWU0lX+Ce3680rsYT\n9HdGCTv+YQgReFQv1BAkm4aMBCTsrttP2v0pbiaTV7pDybaDx5aqrZvWa1HF\nduBP\r\n=j/2k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIByXVQlwqdwybnoPTqP0l6enJCPqJ3rtmvQha7DyrZb+AiEA0mcqN8c93knskJ6lIXbRkpui1/NC+5B4ZqHkDUjhXQA="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-1540beb.19_1574866673180_0.036879688339757966"},"_hasShrinkwrap":false},"0.7.3-alpha-3c5e3e7.19":{"name":"graphql-toolkit","version":"0.7.3-alpha-3c5e3e7.19","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-3c5e3e7.19","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-LjmAuKZfbpgpXco9Fg8dyQniU/k2aQXSsartH16RCi5vRRVAbXPUqAis9RJc0c2LXgb8MriWcv3P6a7QkXWSPA==","shasum":"28dd00a8d91a1dbdcd005f8278d02fac3ce59ec6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-3c5e3e7.19.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3o/BCRA9TVsSAnZWagAAUbEP/iWFZsel52VnZdLjxF2l\nL/SFfvMIIFTgwI3AOaO5fviIgFQWmy6nHMs51ynQ5dFN5Wi8YdmmAvSQoo2/\nlwjjj5pRnzlGNYrFNKpEwkQ9OEZ5hd06Qi8jos2hABmjekgX0ydNS6zn31u5\ndPEAhAzlTxboqloiRaXnzln7IypqbmiN+GGM8MHWbKI2cy3MR64MwoxOsPVJ\nAaCpXyw/Y9gi+q3LdxLcah9bXRClDb7fDyATZIXR+kC/8SojOz0glxs3VhCC\nJYhfQ6gXqBZWQO4wEKapdZ+VVK0P3Br7T1qN6Q3+oDKrYriC2oJdub2EXt4Q\n4SCUeeXqBExYCws66NLmjvdTuPyk4TZC7fkCxi4WmA4u8mIErCitoghaYJe6\nAoz/rLEhgvmbQM6x/wTKbqWoB09HMUqoakluvboLKZaJ17MrhaGDLs1kImw0\nNl7GULNyKivWMApz0BCN+K9FqNtt9SPq03vLFHDFbjwooEc/TJc5QcgHzwBo\nRZguQ67VptL3yLjUJP4/x/vuKPrQuCaQfsTOwhy2xtf1c8b4KH9NcMB4Bt3d\nEB8YqCrYack905AzcnPJ3qodRZNXqy+1c9jhHCddYlAOqoRQEJsyXD2BgHeC\nj49brZg/lrll6LU59+xaEG80SbTjq22eikLmtNoDJmmWlR5EHGdr1Livzip4\n03W3\r\n=DLHq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMQQeWoKLGcNtPcQld+eFSOFhk5azbB3dRlnwp7WqyFQIgM3y6p1TDumuczoIJqq6uTb84n8SZSpAKaCnPZUe5XJQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-3c5e3e7.19_1574866880600_0.20453793095779238"},"_hasShrinkwrap":false},"0.7.3-alpha-ba11c78.20":{"name":"graphql-toolkit","version":"0.7.3-alpha-ba11c78.20","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-ba11c78.20","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-l1ZuQYwjpYvGgnvO5psJEjn4IBWYIwTPlE2/1SizKOGOXletZTTfvq4R9Mx44hGPl4KMnxMXW43TV8GD3ZaXog==","shasum":"667b2c2988906779dcfdd78b49d2b0aa6b468590","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-ba11c78.20.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3pDcCRA9TVsSAnZWagAAdTAP/REEjFfHu9GnJpZf5ItH\nXkRgMegV42064tJTX2DCqaw+4ynykzGnE8bps5UNXmBuVOO++kgGaHf5aduG\nw7QE8Ww3+V9SkoKrDiejKU9q/RSt7C8HgJ7KJ6wxROny16jJVkih5ABH1VKS\nYL1wxDwjYFpJF+rMdE3gbzf+HFSi+bLE7rR5ls96jeax4PG+AQXRCwEykvPx\ncgUeanla2/UPWlsWC99dwirn03eGj5CtqVefq1En7GmnLPLhdE+Ii2/W5Ygo\njj3Y0pxzj9D4+Ioq0vvuH89cwKCHQRX0aYBI3PBUAX+D5OSLL2cRssQWH2fx\nL/3aXD3qT6F574IY1eWd1AyrSNuVoJSaQLd9Pz8Ak9Zn+wgir7bWTDmOG7Ka\nHchZDrhU8zoGqJezUMDpoQOekuv//gghGP9R2Yr01v6qedBlgrLyJLjJWuM0\nrw2GSn50f6o0mxVIZ+WCxQ26fw5RGEMPiYro2EWjDPvWVqqRi/YBUaQWnM2Q\nQNi1iOkdJOZi9AfSVxixpNtx8Z6F5IvcPoIW/z8XLZRN6FN1PBg8NJFqWLQ+\nyszhy3JMFR7PG0y8LUNOPLB+hAr8omLInMW4/hdtgAwJAu0L8r0WibBls8wM\nWUIfs7p1VQjMc73AcrTgRC0YUJgdXyN2i2xcxPf5H0/pkicUnyfvAB3jwtdS\nhERc\r\n=d2Oz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDY0DVZyhqDpj01QtPHvJshvJRunKZ4Y0nxw3x/cWxmiQIhAL/B4bGhfabP4NvGOggzXd5/hnO1ypqozLW6OZPyTDha"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-ba11c78.20_1574867163156_0.198330373013051"},"_hasShrinkwrap":false},"0.7.3-alpha-f8ef754.20":{"name":"graphql-toolkit","version":"0.7.3-alpha-f8ef754.20","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-f8ef754.20","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-xjfE21rNn3OZQ3/f2LbUXrLZTS/UsD5RfaqMK7dPImlXtEa2wC6yr4zQN4hyvGLYwRYWiSstTCZiXtwBl418tQ==","shasum":"a7d824a87818cf222da3173ab83f0be3aa93ca50","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-f8ef754.20.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3pG3CRA9TVsSAnZWagAArksP/idqFhejMVtWZOwe7sil\nf05OOrxjDi2isKx9Azx+9PXmK7OK+U9Y5vHgbX3F3USJYAChTmZurQ2NP1j0\nM8SncZ7bF/VbrFwlIlNitbJRusp4TI7h/tBWiSXFzm8ctXlsBuESheOwznYO\n+ovs72/97caCT0KGxRmLFQ/EOteepxDQkn6WqEES49lADZmJggkHMzv877+Z\nYpYv0d/NRlLZ3vD/BddkhRnhAG1gDkPFXlv4jBX2zka4e2842Dc+uIfF6P4U\naE2O9HIVOgv4A6kcwrl279SG5vmjNzIb7OM4UFiZpUtpGxT5nTsU9UQGDzcp\nM58ezBAI+w9Dhfl6iWLkER9KxM+xIQgffRtdSTEA80/t4G+grm/yWQUSdTvD\nKrDy2Czr2vGzNaWSNLlKiQJ9tC3pZuDoOFlK+5Qd3XG7LpGSFAhq772bQQUu\nlICra3kCcIHDydR1GGdiSm46/8vL2w7/Hf2GBO3/7N/ldUY0vs+ag8/Qfagv\nvCexF+HQDZ7v2e29llBI/MCLVwcloCcsLmMuaWmfzIlVkJB4myntmiTtjmJJ\noBfrl8MSWgc5g8WzCD5weSlKrIHHO41GotGvGNlDV7DSy3uujdaBdXNlGyb9\nnPrTvOF8+K0Uc0Mk1GGzPuBqUCd3yxFhVrhgeb15QueigtNkkmXxb15Dn1+s\n24cb\r\n=HilJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbe9WClSc7dTOvY79FuPQRhyLJYxHiPch3+V32IyNl9QIgA3mIlsPSbrBsta1fp0peYmAsRlN8mcVuHQWX3XjR7A0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-f8ef754.20_1574867383184_0.08051753603165568"},"_hasShrinkwrap":false},"0.7.3-alpha-43fbc25.21":{"name":"graphql-toolkit","version":"0.7.3-alpha-43fbc25.21","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-43fbc25.21","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-TGhgaGpBAdb8PfwznHFe7HUGUFJegVFhUBQVur4vAfYnEbSDRyiRZ3ZOlh5qt3xIIyzJI7YARxJeCaQcKmezJg==","shasum":"57facf3718cfaf0230c9081b1975468ff7330b17","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-43fbc25.21.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3qAgCRA9TVsSAnZWagAAKYsP/09NYhkBHjwxikEnLIa5\nkh4odm42H2IbLE6zydy7IRTpc/JRehrZQ002IkCsRIN31xmdEqEPZyp4oxWk\nso+5VFnWtNtdMS4eYVmk7XGXFWFghVnby7Y64UlQ9eDp2xd8B2YO1rwvKNkN\nvI1K9RK6ogIBvL4zMf99WoKGobN41HErkGVuWZw6irQWESq97vldfLep9nF+\nczKhHhIpVH7SUNy2gAe2onLthEZBDR4Mr/mWsE3K7Qu6IRL7LT+FCGdhrh41\nieC2VU9zfHJWEjYCxUImSEuNDs0Sq/sis2U+EKjLltiaYS8ovvcs9+4YGeHO\nCNTLX6JMRmuRxNLWBwXYDpUrS15xL6Ii89cmULXy4bcxLi7+g+wEaDY+TmR8\nIEfqTrMq6u7fDGCpKgH5A+6Lb8oB+DoTxjF6ImecVi3l2sQtpt6WbQ6AEXCs\nay8PvQu8yHQw3Y/2lf2X6sNhZ87EBBfEqamiheSP/EMTQL2HTFAwEcdtj62I\n6eR+cYyuhm2cksxv7ZWDyWbatGCuMyXYy8FqXAIfEOPGdHsdynByvq5rUk+/\nEnu9IfHjKN4bpNzlwo+5qwHvHs6oeCxgo4l5YXS3qP/4SlR2KIMCaL724pae\n/YHXTI6K6Mhys/g9F84Hl8ysjD8myrCEYUKcsExP4lS9RAEGc4zfkWtr/jEl\nlpFb\r\n=n2ph\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXFR6iecBKJ7N5d6+4dOXYvvVFqA/AHBQKecClk2s9rAiEA+w5YpCe6Qq0ZVac+I/Fxdzrv+yYXtPDzztiGVf1YOCg="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-43fbc25.21_1574871072195_0.4785463367394196"},"_hasShrinkwrap":false},"0.7.3-alpha-8a5c51e.21":{"name":"graphql-toolkit","version":"0.7.3-alpha-8a5c51e.21","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3-alpha-8a5c51e.21","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-gz3Y9yF+Cycpi+2rRHYWNPkTgP1d6/pHyKlkTUPY8rea1UWxwRhUN5tqOnoTl76+EkV1Vm3l9P+uxOtbgCgA0w==","shasum":"420a2d272921bc7b12c167dbe33a71f73c8f744f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3-alpha-8a5c51e.21.tgz","fileCount":5,"unpackedSize":7063,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3qB8CRA9TVsSAnZWagAASTkP/A6oqDByAU0kw0vPYAys\nw0r4an9cPOCYtyYyXTLwCgrbnFgZ94EECHKWNjW+R5FE0tjBLhs+z5lEF4dV\nWSedf1jtaRI3cjsT92iSc9kT3Qu5Un/2O0rUbIgQTxxKHMEtVSs4V7vlq89E\nB3aiZAqUD7L6gdVgO/4R2B+5QPdFk6aM42TmTyGSIv9XB2TrDmOjDsuqv6SO\niYl3TbU9KlpfYYAX0/+++7Bu5KBJOl9D3iIaA0vhqPRKmcGIQgXYG/fkCawg\nuLzwQNtGZDMTaAmLWG3/aYrGQuLmfZAJhjhPR9eT3pvAvVkAgOOD2k+cL9fI\n+SZIVqboA3KDF0o8Ouogf+H5aD245Zae5vcAIUPbCI6+Wa1tyMQskBvD5bHC\nq9qSEhC3QQIOj2aNNPXgDae7N6bc/Yj3OYBxSPiDgAHdjt5T2aXnI35XPVS/\nn4Uo4Xcgxazfxy2S43xYueMDpQKqy4Nh5oJiV8kFvfE0LrQ1g0zWxQT7y8+3\nmUoX+BFiv7Rg8oxOA11+xvusf6QJetF8nSDNNNAql6hg7p7VOt778DJRJ+B7\n2txkR4dkwkGgAV+ltsSm7CI8D3rkG2TSrnsRjJQmZ5ACb6OgYNftDjeD+s1V\nsubc5bEbEfiusr7ud/X/MbHuBokOwR7qImPtBXciXWZzKuoMryZgg8DY4P79\nndrU\r\n=Y/B8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFTaSbv9hzlZlKtvs6RGCOXN48UgljgXcOsS+L3SROcNAiEAxo/kJ+DT5ZzPmFslfkJlt/jGfqqYBs5v8uG/ttaSU3I="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3-alpha-8a5c51e.21_1574871164018_0.18416043303835594"},"_hasShrinkwrap":false},"0.7.3":{"name":"graphql-toolkit","version":"0.7.3","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.2","@graphql-toolkit/common":"0.7.2","@graphql-toolkit/core":"0.7.2","@graphql-toolkit/file-loading":"0.7.2","@graphql-toolkit/graphql-file-loader":"0.7.2","@graphql-toolkit/json-file-loader":"0.7.2","@graphql-toolkit/schema-merging":"0.7.2","@graphql-toolkit/url-loader":"0.7.2"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.3","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-SaNxzJr75q3RfRli7z6yFQJSxv08EDvzvZHC4YzPlzR4Ofkfuz08wa4CipZPPBmTGTQ6hjk/4YGlAnbf9r4fFw==","shasum":"57bcce40247c05b90714ac96f4951b1b042563a0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.3.tgz","fileCount":11,"unpackedSize":15059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3qCPCRA9TVsSAnZWagAAQ8EP/2SzCDnWWrzgycae/sw/\ne5gk65P8X1UZkBHgCqv2ycPamU6CLKrMS0XAr1iDJLq1vAwGYRrcAvll36Ml\nh1ZZUNKEes72C284vEtNBMB4PMT4yFwtGdQ+Hgkz1T+cJr3dkw5xjYhZkCIf\nwSxs2CgHj+oZiFCLClVqwJf3afGddAR/ScamFLSV2dZtPeOI66a5+kzHkNgI\n49509URVldy5o8BgeFkypvCCS/u+PIJ00gdvDnqlY0aYy7v7RZfFvynMJT+U\n1KJZxtYQ5F8F6Ms/jfVv2MZKUroEPqD3s7R41OVqRg5fvrlXg7UC1SH+nyai\n75l27kAIG5NJ4KDyu6zyJp8rsaWElmbwbiznSAEfkjj3L7HsT+bpxVatdLIi\nOY0X1cmn8gBGqolmJQu9DkjQKfDUdRs6gWFEeOmQRxQo1DhMjv2jGARXUQIr\nAj3UCgw/3C0GpxepCntdwRtgyPOJRl4IdkoB5g6KfX5X6Wk2M5KiqpFNc+lr\n21Z/yjs/dlHfn4v4COT4bIlgb9ItjrP2bqV69rO/fPwqD7Y3oLXFUKufLTUG\nkvpy2r+aM7hVrn2M/tOIn0gSuVskxHjiulFkwUYYgs9IP1WpeXCgEvWj8Y+E\n9yzNYX5VbXJx9Ot6Eu/mPRoLu9bCYFb6hj9Ty9RUBv9V00fBEwdTRXo72xyC\npIOo\r\n=S3OL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH0rtLCkUaqBpbh7eJ5UKQUCz20IYykAMSfFbL6OMiiVAiBFOw8/Yc+oe0B1MfKczuYxfBh5O6mD5wmv1aRp5V1XwA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.3_1574871182705_0.007194140266065796"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.7.4-alpha-d9f3506.0":{"name":"graphql-toolkit","version":"0.7.4-alpha-d9f3506.0","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.3","@graphql-toolkit/common":"0.7.3","@graphql-toolkit/core":"0.7.3","@graphql-toolkit/file-loading":"0.7.3","@graphql-toolkit/graphql-file-loader":"0.7.3","@graphql-toolkit/json-file-loader":"0.7.3","@graphql-toolkit/schema-merging":"0.7.3","@graphql-toolkit/url-loader":"0.7.3"},"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.4-alpha-d9f3506.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-+9+RdJLdsQUSoFvXZmTWNkw6RhCWIz3Q2HLt0P+Qou0UCxfv3aijqsNlmztCoUt/8Wl/UON6oKAHpxSxm6dynA==","shasum":"bd0f7334d8b2c0e7959d1c4a5f198d158c2a8fb5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.4-alpha-d9f3506.0.tgz","fileCount":5,"unpackedSize":7062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3qEDCRA9TVsSAnZWagAAgjQP/2DeofS3jMoirUPfABLa\n2WmzndKbxHacAtFP2EmbqtLFFQU1djOPJOsR2l2VCfjnM+gZhU1ShfIlByPf\nCsTSzAyMvYbZmNK4cdaQeunxcaB6FhKVRm0FiRBf0eKv/iO4SZWjKzBh9tXp\ns03jgV729Z2FE6+WCUUmsLsfjQGaugwhsnofxVfaZ48qpSHEExlyOeyzzuOf\nZlVNfmmIiZxy3Evuw0CABa7d/nGnVL1nvspCxNWQhf+Fxqa4bT9j15Ry7T+l\n7cQ1VeKdn0wCRZ2LB7JsP7k0hqe9sRPLq8B+y/3NNCPdPaQrkOt2wqYSGiEz\n0GLxQaKUhUTHecGOiuUuZtfxnSfF4Kp9pUG+k2eIX3jNfPjuNiA8IlfS55wD\n7XLXkRX+m9sb6k/W5I+aSIIz+hI5W5EJyVfcd9f765BiDx0RdzJyqeqGpxjX\nHO9kumkBkCJnLPlcPE9+Va9SKdlNtFcEUd7CXhxr8X7BOnmuED+9RLXVSuWj\nVDbId9uOkzxl6s+6VKV9iTCSrRLa76ukmgbaKBprEZc1soXknbbFSRQfwpTC\nxpfqfNHQVgexLB4MDyC/pIvg+V6FVvoFDymKDXCcWHiGQsS4Rm49kr2c/sX1\nRy7stWajrBuGjhl4zm0ksIfhb6nTDwuJ3wiOrHHp8/SZmXvxntBc49ZFnZi7\n8xud\r\n=Mhfj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjGyBXeccrHPsQPG23KPQ5UK0ooZ3dOrcx8RqZfVWIOwIhAMQFFTg5bXy1gzKGxlx9zgEnSThcMLNpGPsv7/K6Ja9Y"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.4-alpha-d9f3506.0_1574871299508_0.0938108713433754"},"_hasShrinkwrap":false},"0.7.4-alpha-afaa0bd.0":{"name":"graphql-toolkit","version":"0.7.4-alpha-afaa0bd.0","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.4-alpha-afaa0bd.0+afaa0bd","@graphql-toolkit/common":"0.7.4-alpha-afaa0bd.0+afaa0bd","@graphql-toolkit/core":"0.7.4-alpha-afaa0bd.0+afaa0bd","@graphql-toolkit/file-loading":"0.7.4-alpha-afaa0bd.0+afaa0bd","@graphql-toolkit/graphql-file-loader":"0.7.4-alpha-afaa0bd.0+afaa0bd","@graphql-toolkit/json-file-loader":"0.7.4-alpha-afaa0bd.0+afaa0bd","@graphql-toolkit/schema-merging":"0.7.4-alpha-afaa0bd.0+afaa0bd","@graphql-toolkit/url-loader":"0.7.4-alpha-afaa0bd.0+afaa0bd"},"sideEffects":false,"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.4-alpha-afaa0bd.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-DgeKjeCPlreuXmJrq2Yh5mSS2xOIQUtW88sYO/7OR1iwV6Nw7Ep5jVLWZY+ntGq1dlR9I0fBE6k3397vKd0Zkw==","shasum":"6c34a6585e4be9ceb60bcadad1764556e86a8409","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.4-alpha-afaa0bd.0.tgz","fileCount":5,"unpackedSize":7278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3q2vCRA9TVsSAnZWagAAoxMP/j/33W9f3FTy0bjKbajM\ntWNHj/eFkp/sVhzOyBCuBOmpAWkeEISQiipZRe4V2Yy+BdhfzADH4xQNKdR8\nmsHcDuGHG5iw2CjGY63TYE6DQK4X4v0qu85klXFpcRs346U+fc9q30P22yK2\n4LrolOpqXwPbFgyXMV7RQWJlw6ltqaQSyL/VUQC8m5TpQLbR1q1OjfkZ2DIt\nRWRvUZ8v7LDbh2GV3n2eVdrnDxj4MkXzw52dLj1G/8tHvXSyp2V4V2GRx80p\n2XnpGhoYOGLgCLFuYyeUCtgBE17+TGgAFB10BaM7vXv4g4NlTd3pk/ooawKP\nof8Aw3ZqK6is9uQme2UcluXCwUdqblJme44/3+hNdN47fmQTDR1fxk+q7RSH\nAbkaJ8/M93i/xYVuyjXuHgcXue917H1tQD3078jaapYPZ6OwqNP0BqbFM9Hq\nwA4xNvsWFT6SKZmZfOAgte5fx33Rhc/IHzRYLOsb08l3MrTRW1FsqmWdIp9+\nnoqGk4trkL/IWvA0zeEpZm87dUdTMjXGAKjEMkHTkStjlJRT982qUU3Cw+P/\nlEeXVdTa150b3RRvaQpFH/DMli+EHIZ5KINJnDsydBD3dof2k+CtrymnK2II\nwu1S271/5F+TnQqMFq29eveOX0kcrDusxUd6ixBOaDByG1QsCKCNLe9UYJJ0\nIpcG\r\n=x4fk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEYnsfwXd08A3NSofj+MSJEkDrPSWA/ZEFeWtOnUUbnqAiEA34YEvQQ5czi/6grI9KRykPiDNwzoozoh1uYPdVDWBPc="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.4-alpha-afaa0bd.0_1574874542607_0.48102639885823484"},"_hasShrinkwrap":false},"0.7.4-alpha-747e747.0":{"name":"graphql-toolkit","version":"0.7.4-alpha-747e747.0","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.4-alpha-747e747.0+747e747","@graphql-toolkit/common":"0.7.4-alpha-747e747.0+747e747","@graphql-toolkit/core":"0.7.4-alpha-747e747.0+747e747","@graphql-toolkit/file-loading":"0.7.4-alpha-747e747.0+747e747","@graphql-toolkit/graphql-file-loader":"0.7.4-alpha-747e747.0+747e747","@graphql-toolkit/json-file-loader":"0.7.4-alpha-747e747.0+747e747","@graphql-toolkit/schema-merging":"0.7.4-alpha-747e747.0+747e747","@graphql-toolkit/url-loader":"0.7.4-alpha-747e747.0+747e747"},"sideEffects":false,"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.4-alpha-747e747.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-pyh44ynQydzlM5/b/LAT+uXDzcH1vcJxvb5MIOIElBYpNNh16jCYMd2yq3tIMiwgBRzWM3064+TXJxgjrwhEPw==","shasum":"09f84646b08ab8cd87736271e43e1e3d5c0937e0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.4-alpha-747e747.0.tgz","fileCount":5,"unpackedSize":7278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3q6aCRA9TVsSAnZWagAA3/wP/RdLhD5NqXBtuQ3rOPEp\nJ1jHTzrtszZZaiOXIuWzDKqK4767winovi2+o2fAc60rqgiOGxYglAsCszTa\nsgqJ0kQp/1jUjqEN5nTkrncwDOQQnbPscAd+cGN5uolEXPSIYSvuxOir+3F+\nEDVJKSTIRMIFSXaLpuBeBXKKIIYsrod2+FLhbPm4hf/owUcY1RHjfTJyYG23\nxhPdtvZ3jyujheIk+z/dklp8FP1WhaNpLBf1tOLQfujqr0bwcb42r0ow6HXt\nlpIB8YJjB7k8LU7tsMnHlDvaiBApAhvsq330zfTxQ5FZ3qmjgOObZLswqMZt\nPznPPMLeYHPPcWKnZEoH4duMk0Ddn0TJZ6JS83xsMmYc3kWd2+yVEQPB+523\n/wQL+zvzsYximJAxV0E479GzN2NtzWFDgTo4g9K2XiicfVl8lbD7I21oPNL+\nTnKAxpNnOBYiIldC6a++UDern8kfg8GEdcmGD2TaZwD0H7BVudnNjEMQVwxS\nQ46QncDmnzMT4/DBuETzcko0UQZNOQuofnvah48Q7oQBLMO4DjfDWwrz7yHf\n3o44lWzCYa8tVC7pfR6fzfQPeoAANcXy5/299IOmwzQvA/5+vTr4HwrMVF9M\nHfdGAh9mkPzc10mTY2ZSq2T35A9MSMABzQ2QOm3TAdUx1l/On5jMGy3L6gNt\nknMp\r\n=qLfo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDd0x5re6I2f5p5tvcQ81jNq7hbmOA66SQ+ndNPRsJAPQIhALwk87grHZDvVSxnnqtQoAVHaR9Q0AN0a4BW1k0sUv+x"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.4-alpha-747e747.0_1574874777640_0.3874668607197458"},"_hasShrinkwrap":false},"0.7.4":{"name":"graphql-toolkit","version":"0.7.4","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.4","@graphql-toolkit/common":"0.7.4","@graphql-toolkit/core":"0.7.4","@graphql-toolkit/file-loading":"0.7.4","@graphql-toolkit/graphql-file-loader":"0.7.4","@graphql-toolkit/json-file-loader":"0.7.4","@graphql-toolkit/schema-merging":"0.7.4","@graphql-toolkit/url-loader":"0.7.4"},"sideEffects":false,"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.4","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-/xiqOTAYQvEHy95/Le/01zNxpQ1PDKvGjq0wU3PM2bb/KaRpWJBMN9CVW32xbAa9Tasw94x4IoofafysV/o0Yg==","shasum":"cfc77ff5a1e7974dfa0ef32a77b3cb72f60a322b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.4.tgz","fileCount":11,"unpackedSize":15083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3q63CRA9TVsSAnZWagAAyCQP/inhfkXUq5+PD2B3qbeB\nK+VzsW0qOP+Mx0OQoGlBGlwpG6ayPCE5QJSvJl80ya84peAKrC198nsHS9IX\nlG6J13g4sy1IDedQ8islPDP/BbApRB/CazxarKe/9NPUdfK78sMtuuYmILYM\nf5vNbJnMkG1vT2V8Mnd0dn2cqzKwsIea1vS5XKzIhs2Gfyjcr3afFwTxGHQo\nCrlE47fR0y5CIj/+6UNCLq5NmrpgswB7tp9pKz7Lz3X0FnsxniX2u4UMHrqc\niIPg2b/BbW59z49JtORS7DWh+wAZSHTu9taV2aiisOi4wjxrOqZ3jStEjbCt\nHsE4EX5fKUDFNJItX7dCVX+pf6c4Oyv1M+KTzv0W3sVD6jOgozqKa6KD1Scg\n0wi431w9Xr3tm2bs9NhyYX4hG1v2soT8A8tJb/hhkQa79IPQgzsnrxb8bIVK\n12h6/YYEnHWdDdZaJ43m34TXYbbzuet6jn7ukxbLgeb0bjmXZZnGJi3t9B80\nWdyF3DhTsREklLRzY4yHRj4+cgmnmFBqmBcKHbm+keMxwAF5zTASIpwTi3lp\n2kBG6QtwL94c9OOM7DWuEYJ0gF/4YZCeFlGqlS4iQj2qraIMABY9x/qaw4IB\n+tk2GgKZqsdHrtq64gHozH0yXl4BW6lQ94jM8+CzB9k6+kSQjP92zLkyhnB1\noWVG\r\n=0XyJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGuQGyPIJmh1W+At+pIKRJ5ej1w9BIMd6kDnILgluLucAiEA09ch4FGsLwvFSibmpDaGKT1cBLt47N49oDLkhmyw9WA="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.4_1574874806923_0.5572520620419601"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.7.5-alpha-6a1ef10.0":{"name":"graphql-toolkit","version":"0.7.5-alpha-6a1ef10.0","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-6a1ef10.0+6a1ef10","@graphql-toolkit/common":"0.7.5-alpha-6a1ef10.0+6a1ef10","@graphql-toolkit/core":"0.7.5-alpha-6a1ef10.0+6a1ef10","@graphql-toolkit/file-loading":"0.7.5-alpha-6a1ef10.0+6a1ef10","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-6a1ef10.0+6a1ef10","@graphql-toolkit/json-file-loader":"0.7.5-alpha-6a1ef10.0+6a1ef10","@graphql-toolkit/schema-merging":"0.7.5-alpha-6a1ef10.0+6a1ef10","@graphql-toolkit/url-loader":"0.7.5-alpha-6a1ef10.0+6a1ef10"},"sideEffects":false,"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-6a1ef10.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-QE5BqZCoatlL1lDOlO+MPvTWLGJ15V/9bEV28qLOf4MJvWdMWiL0H5L2cW1wT0KX4ipRxQMgiMvNg9ohoQGNkg==","shasum":"9f068072725c565bccb2c565defb44007d43a330","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-6a1ef10.0.tgz","fileCount":5,"unpackedSize":7278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3q8uCRA9TVsSAnZWagAA6jsP/0gTowfY7CIGLKWV4fFM\n+WlVe41AzCx1xRdYOuTYNgN1Hm2aCPt4Ot4n/BZwzcTwlRwKzgn2SKCUZJHo\nOw+/aSuhL+fmWAN7VPKV4jE5Uv1OsyFJ3mi0TwU7WkpwFrPdAbK58sFF+rIq\nqbMwjS/musaEA7ku0dO2lj8cvJE/uCHEmPHHGuPEMJQ2p0T6Fz8jt3FGXGPk\nry+QuJLl1bo6tPkml6kHxA6ytc6yPNp5YAEivjsjIr68IplQzDoNxHuMAbLT\n1na5lCj9GS00hoY1R48YMVIsgdVk2pdU26c83rXRJn3GFsWjxwmkrWZYMaOf\nd4LR4yzmmMpV7I/mqGi3YpNItESGj320GbhUBphXlxK7d/qg1RxNlF4/MVO1\nYPBYyN5umMJ4XtNs2BlZkPAC+IpT5zbV957z4O3jV3eegn4sZViiiYq972SK\nlWu5Tk9l3B7FR0sOGRvmQrQSL6qLLNN44AU94G1vX67l3UgzMG3fq0sKwxzw\n8vZ5qouf6z3vrtD6EMxPCl2AIIZ6PBd/BYC+pwNADLJ9N1+UScNPKNgMjuk+\nPpAMW1npCqQOV64AcVu4qyBCBDGzCgu8KxkkahnuvMkwVMngL3FUgI+5Mhkh\nDe99Uir20qXWEIe+fpSf4/l07XdU9KkDGxcnxjxKWlAREcaRvJu8VMtag9ZM\ne4XY\r\n=7dtm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF0YoX5kI+AUNagPWWKQ2nbfLl7/wQBtXksHMC6TTW4jAiEA5RTueZ94NIPVNWXStm/lPc/+60aurqysx3G/yXlY0CU="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-6a1ef10.0_1574874926187_0.17961040226798097"},"_hasShrinkwrap":false},"0.7.5-alpha-8dfe565.0":{"name":"graphql-toolkit","version":"0.7.5-alpha-8dfe565.0","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-8dfe565.0+8dfe565","@graphql-toolkit/common":"0.7.5-alpha-8dfe565.0+8dfe565","@graphql-toolkit/core":"0.7.5-alpha-8dfe565.0+8dfe565","@graphql-toolkit/file-loading":"0.7.5-alpha-8dfe565.0+8dfe565","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-8dfe565.0+8dfe565","@graphql-toolkit/json-file-loader":"0.7.5-alpha-8dfe565.0+8dfe565","@graphql-toolkit/schema-merging":"0.7.5-alpha-8dfe565.0+8dfe565","@graphql-toolkit/url-loader":"0.7.5-alpha-8dfe565.0+8dfe565"},"sideEffects":false,"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-8dfe565.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-lmF+Ysh2KrWUodM+/P0ukofSVwJg366UFt2d+mVh++B67LtKwX+5KgAyrBy27cdD7aO589+FFWzqIjL9QBkFkw==","shasum":"61bdbc852977807397379680cb38616ccfe4fc74","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-8dfe565.0.tgz","fileCount":5,"unpackedSize":7278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5GzJCRA9TVsSAnZWagAApQYP/17O990I4nRD4odeAbAA\n/FMBj0UYkNTSJjcMyG6mzY4n0pca20oyvdgYEQKfM1TtcFBvOUstQ55xru8d\ni7dUJYc83eMCBWYqM1H4xUL8F4JRy6UTeEllbpg28kfs8PLqTTIo3GjrgqBa\njpr0C61LJ4Vxrd3zha4O8KkbqK9iqke4v53FtR8xhjQ6YfVn6t1Cqd3yW4WA\nNVG7UJFT62UNOn5coPHsI3SgNhnFfcII9d1ialDI0+RBbWNWy9PWS8bQPr43\nGYAW2FX1f+q0O7k6hV0wpOeUqeNF3sQpBfqF8+ruMR9OjkhOrY9wVYoOq5Ll\nszblqlZgWIemnyjpuntS/4j7BB6hsfRBPU0K/PXNAoMFyaDuqkv3+pcjm5NR\ntcSMCu9hSFP5peRmCc2iwxNTBUNJZhuJFw+hBfn6CxwF7kGa94br/BLgzV2v\nAk17zWkK1eqA0NcypWN9Nl38ntSEfFYXl80B32vcxTDJZkJr0fLBmZ8EY6lU\nIr+nBp5RRHtpZM9drMdS3iUmxVZQ298LBpixGX8pOAfmXCdeQNX/BhviYMp+\nN6hIVSs42dtM2AVZMlvx6Jwp7zQbJGbgSK0jaXjIRpb3Ueshjzd+oGHsnegw\n6iMWoFpvlO2BtbMkmSkT6nlY2fZGMqqWeTOBD3hvv5j1V4SU7tXUAyvvBB5l\ndvd6\r\n=OYix\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAv6/4BwauXNpOIVAPjFEPi0iuHtNsiZTQ9YWWW2HbhXAiBzpjz/kHKAkXoR13Ci78EKKUpkEHKLJdpA5XXpaOvD/Q=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-8dfe565.0_1575251145458_0.45928986206996103"},"_hasShrinkwrap":false},"0.7.5-alpha-6d1b302.0":{"name":"graphql-toolkit","version":"0.7.5-alpha-6d1b302.0","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-6d1b302.0+6d1b302","@graphql-toolkit/common":"0.7.5-alpha-6d1b302.0+6d1b302","@graphql-toolkit/core":"0.7.5-alpha-6d1b302.0+6d1b302","@graphql-toolkit/file-loading":"0.7.5-alpha-6d1b302.0+6d1b302","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-6d1b302.0+6d1b302","@graphql-toolkit/json-file-loader":"0.7.5-alpha-6d1b302.0+6d1b302","@graphql-toolkit/schema-merging":"0.7.5-alpha-6d1b302.0+6d1b302","@graphql-toolkit/url-loader":"0.7.5-alpha-6d1b302.0+6d1b302"},"sideEffects":false,"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-6d1b302.0","_nodeVersion":"10.17.0","_npmVersion":"lerna/3.19.0/node@v10.17.0+x64 (linux)","dist":{"integrity":"sha512-10GXCzueHCTqLRGIuu06B2cCIf8xEovm0NtyXrMZbE51nUwccVTsIkBXboSWrBZbiZGtJS00BCtbZClripohAQ==","shasum":"786d9aa28db604d438353c5e6d16bc6302e94dd5","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-6d1b302.0.tgz","fileCount":5,"unpackedSize":7278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5JvECRA9TVsSAnZWagAA0b8P/jlqUDB2H2Hszm/Ibqsn\nZkWiDi3l/hUt1AZ2E86wpigb4yH40hm4ppxE92L3Hqi6M529P4DQdhYzCcnH\nmL84WUma/DNmOflA75GRR54ZbmNVhCfmGmzUQkoXQ5VHXS0HoIpUdN+4gUwg\n101TdfCFse8u+2FzcW7Eo9iKRXtocHd4SXkFps7x0smuLrYiEJ/3iXs5fwNC\n7a+rrUq9C/O4wrT5Ts5n3N9XD8Ya9uEHJ/qXseNJyMEfpEfbcFEOvu6IvuQP\n0c700jdpijRGjhuFamTB3x27yYPH4qfbFCgoImsfSv2pUJPLmuBWWOMfkJyY\nqYG5JsifD5ruIkK2fA2ed2MFcJ6jhqUe1eLaZk5QcgTGOedYlLNpd4zXhduz\n3qRbYrqLi+vp8PTf1UBRpJChGnM2miyVN2NgT25I+//+Ng268561fib7QF2V\nZqwoks+e1Nk4Sd9OR7IETYyAb432hdXXjBru2wqi/JBan86JVr8eprSX5P9K\nlRypLbnc2RcYucXmf5KwmHDY+4oZpB+5Vh9J6S2Goz+8azzAwbe6rdMXVG1k\nUowe5JdqjFHXfFiYvLyThfW5zYR4YfkI1wNYeRdowisWZ8lN+ETHTP4ZgdEP\nj5Grh2Oxi1CF59L3VAZkN75/a7fU0mbG4+Lj6BAtqfs1Z4Lj/zMa3vl318aw\njXij\r\n=xYUD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTW/BNPaGyB8bTKgmUvDJmGUDXZqbW6qIwlaB/YncabQIhALR/NHwCYf/GdPU0V8Z7vvVAhIcVGUIphm1PX+BurQ5M"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-6d1b302.0_1575263172167_0.1079043909860391"},"_hasShrinkwrap":false},"0.7.5-alpha-80a7ba8.2":{"name":"graphql-toolkit","version":"0.7.5-alpha-80a7ba8.2","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/dotansimha/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-80a7ba8.2+80a7ba8","@graphql-toolkit/common":"0.7.5-alpha-80a7ba8.2+80a7ba8","@graphql-toolkit/core":"0.7.5-alpha-80a7ba8.2+80a7ba8","@graphql-toolkit/file-loading":"0.7.5-alpha-80a7ba8.2+80a7ba8","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-80a7ba8.2+80a7ba8","@graphql-toolkit/json-file-loader":"0.7.5-alpha-80a7ba8.2+80a7ba8","@graphql-toolkit/schema-merging":"0.7.5-alpha-80a7ba8.2+80a7ba8","@graphql-toolkit/url-loader":"0.7.5-alpha-80a7ba8.2+80a7ba8"},"sideEffects":false,"bugs":{"url":"https://github.com/dotansimha/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/dotansimha/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-80a7ba8.2","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.19.0/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-H0vowdZUodki6x938E4ZSKRRuwTveI40xoWNTpLs/KaN/tcPD0037hCaxfDNjttUdaY03anyWP0mKTsZM7aYFQ==","shasum":"c2d15b6245fa5a0724e73a98ef5945a16f854176","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-80a7ba8.2.tgz","fileCount":5,"unpackedSize":7278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6dFtCRA9TVsSAnZWagAAxQMP/2lgTpx6H8CuB5dAcJkn\nXsXADWa6F8MsbA92eHiHQEnULoWMOMT8xUhlbbqpqD64OaT+8Ck5aTAChoLa\nkMGmQQWMCUwDmZC7Rqc7WtYRejWbEr3Wl+ZBj/xP0nUnutSRODQtmVpeNZxu\nXc2hKGiZanzDYeydb9gJBaYU1AP4xc3WQ4twIlwCh/WeQbAMFILJU1/+JaWi\nXjrp8t5VYKjnYMHZQV1+NDfYuUgrmRUAhZtDhPmEQsYd5bZCuJpP5GE1eOCr\naInMPSQVH7QxA0113u6S7O9LI1s8bjg5/FjWu89VDdYab1xXGOzrjLOfQHU3\nKYv+4JByry+7cGdo0jqhaNgFFplTAj7wItUnpITJwZUu/BiUKrOlEFv5ci3l\n9YEIK36SVnmNAHrJoJjbaN7Y3f3pZJEdWJ0WfCu1v4AfroZmdCZSV70a6wBY\nResWmpllO5YShGJSKAM9ehGBC6BTlhGQbn4Hz5/qVKX0/6D/Bqx9SHP+oBvG\nSoyOBMcsOkrq6cAD118kJblB8uiMYorSAk2k+vRn+OHV6AjzhT42APumbi3R\nK6eydGEleT6WmDv0QWmWgju9Xd4pEWPLGDMgJyKyZNvq8Wigu/mMCJpT5Fji\nAYb18L8Scac62XXUrJgjr3ui2hTpkNbdIQBkynMJgHPInqtmSyhsIFn4EWIa\nt8np\r\n=1CTh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB72dBJI8jivnxpeBuqPrwOhV3K0ABSOiSx2HVNwz+SGAiEAp+VjuKyvfqgrGNEh2KjXoUcyfaLIPHFRLB1QNeNlAyE="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-80a7ba8.2_1575604588817_0.17547775928455112"},"_hasShrinkwrap":false},"0.7.5-alpha-fc1f80b.14":{"name":"graphql-toolkit","version":"0.7.5-alpha-fc1f80b.14","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-fc1f80b.14+fc1f80b","@graphql-toolkit/common":"0.7.5-alpha-fc1f80b.14+fc1f80b","@graphql-toolkit/core":"0.7.5-alpha-fc1f80b.14+fc1f80b","@graphql-toolkit/file-loading":"0.7.5-alpha-fc1f80b.14+fc1f80b","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-fc1f80b.14+fc1f80b","@graphql-toolkit/json-file-loader":"0.7.5-alpha-fc1f80b.14+fc1f80b","@graphql-toolkit/schema-merging":"0.7.5-alpha-fc1f80b.14+fc1f80b","@graphql-toolkit/url-loader":"0.7.5-alpha-fc1f80b.14+fc1f80b"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-fc1f80b.14","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-U9H4xxbTtLALkq+TOR1MMhfVgvnhRx52moaROch3GBP1bKjXKE3mJPNenz8V1ixc4hWNHWsP/UOfPzbI1meI3w==","shasum":"1d5573f6f6f25d03ed854a065b854cf416c6d654","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-fc1f80b.14.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7UTRCRA9TVsSAnZWagAAdE8P/RG2ETJXDxAI42WuTAf/\nJb+iZHhZNvaat/ObPd3lFcjtxvzjBuCbw2fYWfMPGvA/W5+ADQtuTitbs5ph\nQe0dDI7FRvTD/TktFdWhbrWhaxNbc0C5bK60ZCFQT6lhbyAo1UtjfVjrnF/o\nrXMMh3cauTrjoI3Rd91x3319uUdrXVija4v8xfF8cgq/rofx5qmYzLaa4AYn\nfVSYbf/UJ1Ggpypz1zzkrTm2LbLrsLjbC1DNoLmtDj5Z67a1uvlKfoxQ9g1y\n9FN9YCCXlPZ1ul3e55TWeb9ej0xMkCV0x8tfjBAL7G+dvIGPG28bOwdGy0fc\nO0UCFIONcsoLkio/75aNpQTcqhk0owR9MQtAC6ShT5yHWHzfdFTF8fr1Zidd\n9p4qah5knJaevJX6TWEtp/WXWrH4QOypuh8s4TXCVQtf9wV/HUIlVPn+4Das\n4UbswonHqdR0rhb9qLrXv0QSoqF1BTXCyxrWIBhTkyl/c8S0VlyY0NAhEGtP\ngQWho2CZUkIcxm/3T8GVz4Bz1zJcA0Vs705xU7979M+LtiYxJwPBSTDnlswO\nGwJmbTEk5PAvzAtbcJA9pZEAa6wSeo3DvARJy3XYRS8unyR9XSZomgtfZOvt\nwlbJ8Nm7vmnZc4BP8fY2g+qEyi5XZu3pe7VvNR1dAx1POSzgkh3j7z+n7o8Y\n360j\r\n=ie5K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDSVneVFpXXs/7Nm6GRj2hBU1MFkPtNDvgwqgMGCG3b8AiBINmzOccJq9JstiYp0gEC83I77YJfecIwjdJ4FRlJbcg=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-fc1f80b.14_1575830737194_0.5036170690268198"},"_hasShrinkwrap":false},"0.7.5-alpha-d29e518.1":{"name":"graphql-toolkit","version":"0.7.5-alpha-d29e518.1","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-d29e518.1+d29e518","@graphql-toolkit/common":"0.7.5-alpha-d29e518.1+d29e518","@graphql-toolkit/core":"0.7.5-alpha-d29e518.1+d29e518","@graphql-toolkit/file-loading":"0.7.5-alpha-d29e518.1+d29e518","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-d29e518.1+d29e518","@graphql-toolkit/json-file-loader":"0.7.5-alpha-d29e518.1+d29e518","@graphql-toolkit/schema-merging":"0.7.5-alpha-d29e518.1+d29e518","@graphql-toolkit/url-loader":"0.7.5-alpha-d29e518.1+d29e518"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-d29e518.1","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-CSUGdi38rDXEeOQftVKvyeAqjxvH3FfrkA3m4cSxkoQkpMc7DxeYWQajGQmRl2wQ/tx6gNHUXYQb8qfnvF3Lyg==","shasum":"91942683869f02de65b76a3848c7078ddb8da84e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-d29e518.1.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7UXGCRA9TVsSAnZWagAA/C8P/jgEBMk35GDgDCjkkSHZ\n11L1b1DoRXCJUt1wkL5Hu63hzhSqQEiGwfrrVmBPIBTyTlcu4j//jAZmyG90\nKDOssXIHfz4p7xRbtF2FAXwYt4lnijEC52n3gIS/y/vu9LBhnNR4tb6Trzsq\nvS7/Yrc6uFhdB8gqQLefYO87E4A1U2GXbypVfmP/RJjoF95rffNaC9DecZ2g\n0nGX3LwiHqKdUdZ3vjvVkvAdaT42nmAPpAUPzF/vvizxUCJutLGIXgI52cvk\nFrWSTKMDReoxqNB6xYxl9dFN8HD5MacqoqmAcJ/1VGYkJMqTCPo71J+84LPl\nJtwtwtr6kpsqEvVjcFkZsAR/WwET1Rbtne/F1/g46K32K18R53eOXRV/qDxr\nuVOx0K+Fl0GtaxZM2yIkC61bt4yoLgVQy2DqzVOSpakW8z8ucBBMpggjpLoK\nMKrP4q32iCYeFWe9Ho5YPK+X0JdGW7Bel1Ly6/n8nzXcqGi+9yehjnoiUMyC\nbhHJxG5S9lv9NFPPdB66QeKi5pepPlZjeEkyQCRq1pgC5E6R5wJIN9tc+9zW\nqFiBDX1JY7x9XPGZL2gZmEfFBnHdTFXKzDgtySZzowN2fCQW4HOAQOeASRjZ\n0e/HpLhKSpAG9yg2Jfsk4hZegaYzrUjFC/Em+5sX3jZwyD8AVl8WhzEZqEZF\nY+FN\r\n=xKRw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtlBSCyWCKuVcFb1U8Yj7t9jSVCZLc2xptB4gr2cCUVAIhALW8mFyQv66iuKmaUbXcUeobvfUuRHC+SIZsHu9OHP74"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-d29e518.1_1575830981636_0.7349080342960728"},"_hasShrinkwrap":false},"0.7.5-alpha-60ec705.2":{"name":"graphql-toolkit","version":"0.7.5-alpha-60ec705.2","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-60ec705.2+60ec705","@graphql-toolkit/common":"0.7.5-alpha-60ec705.2+60ec705","@graphql-toolkit/core":"0.7.5-alpha-60ec705.2+60ec705","@graphql-toolkit/file-loading":"0.7.5-alpha-60ec705.2+60ec705","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-60ec705.2+60ec705","@graphql-toolkit/json-file-loader":"0.7.5-alpha-60ec705.2+60ec705","@graphql-toolkit/schema-merging":"0.7.5-alpha-60ec705.2+60ec705","@graphql-toolkit/url-loader":"0.7.5-alpha-60ec705.2+60ec705"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-60ec705.2","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-u2OiDZfg2uRr+1cwTanhaQPJBIkHmtpcIH/xJTOoq0+b5DLq5eZqPkUJ2zQKboM9LviOKNaCYENCUbZVnFgdWA==","shasum":"62080a8ea7a4bd6c8f142851baf8cbc1f846db6c","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-60ec705.2.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7kl3CRA9TVsSAnZWagAAb1kP/jiJvUOWGurtVrPzq7nA\n1F7ulvlRdA/5TZNsyNpDnpDQvBVMgnBG+F6d7Zegp/JTUpnyvTky99paFReM\ncWJ3kofbrv6icJNzFxH2EYmezr5iikMIAvqcWRjpyb4Oji+vDtVQfDDjoL5F\nhWfDeW0LMlN+rrqEJn/PBYJccK6tH4YfTLjLOzEQcy+uaM3ANDJqZ3nDGlzD\nhEPdAHXIeIttZOgsZDog519+BRR65RP6Fnddzk4dHcqqWVxEwZWOHuJtYC2D\nUNAGw+79vU+74u5YN73y5Dj/GPLZXQWQgDbacf5QKjQoQY+tVvf200THSaew\nJwEIGW/NpavhCsXhqeHAXr8Md+YM03/kjIPTj7wFtBJATAQMsdCYMKO3pEOH\nmp1sD2OZMKiZDzUvf3dTXhYlr/IxA4Ykw2gffdKLTKZi8rymhTJ1qq2W2cMK\n5Eo0wBNO9CAPBCAtsr5JscqCuGnRvMQKHZKx66Tv5CWSpThlvk5yGJJUlbbB\nm+CF5WEZ9z7Hyl/TECYmV7TuT1sOInoMFezlpAdrpKzUMCJvmvgC1lJ9wS6v\nk9acnkppV3hQIE+mh/d8Elp30Se1cDM/oO4+jM7wb+3ICJWMGp8svQ6S5r5i\nBVVK0hC7JclooG2nymfN+pyHR/dQM/cQvIaDTdmN0byPWRMuNrX2vSMWkZ7a\nZaef\r\n=/7Ae\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6u/3h9nBEbCq/wqqo4OWWhTORTb268Uw6YwsI3rp5OAIhAND/4qPFuWIy7ZmGJ5Ocafl20Ytswq6eUaSaqf1qsetV"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-60ec705.2_1575897463022_0.7034126739714095"},"_hasShrinkwrap":false},"0.7.5-alpha-fc69697.2":{"name":"graphql-toolkit","version":"0.7.5-alpha-fc69697.2","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-fc69697.2+fc69697","@graphql-toolkit/common":"0.7.5-alpha-fc69697.2+fc69697","@graphql-toolkit/core":"0.7.5-alpha-fc69697.2+fc69697","@graphql-toolkit/file-loading":"0.7.5-alpha-fc69697.2+fc69697","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-fc69697.2+fc69697","@graphql-toolkit/json-file-loader":"0.7.5-alpha-fc69697.2+fc69697","@graphql-toolkit/schema-merging":"0.7.5-alpha-fc69697.2+fc69697","@graphql-toolkit/url-loader":"0.7.5-alpha-fc69697.2+fc69697"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-fc69697.2","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-HkScHEnRjz+uN5qux0qZsWHB6jxkm0kVBloDPglJvLtx8FpzWzw2vohJmGE124Y/IbSrv+RgSjCBFX7S5UIrug==","shasum":"329bc5b9d403267d3563ed80fd59fbc7c0ecec6e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-fc69697.2.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7kmBCRA9TVsSAnZWagAAOLEQAJxmWrrHLsq0RXpTKIdq\nlQEDZQn/KxMPvtueiBmwxLZ8eRlIi9BDENIYTKpG7tkAKFmovW7TKX4TfFtx\nuJAPF4Pc7i+/6V4HZf1QtcpAPDfH3v/kwocg4U9+Nuw6nntvxaq/bfoiNH/C\nCaDdnTbfWG7Af2Aai+SY/XC5rlqnFVkax/gXu+K5XWyU6Ozm97dyAE9ADZ1k\n/GWN1dZuIEA8LKucuhKnylW3pwhkFgOWmnMZAYVmopwtdvhv4sGS46ZuOpYD\nXitVX7byMXWDTgbAMij8vbbYMQIzQDdUm3kgGFHlmr6qwP82AaChv7hjV1VV\nE+oYrHB/usIenF3HBXpgv5bEZN8rK7Znj8T/FBZXOonu0DXFiDgV+d6Sbo49\nKP3hWNtLf+b20IXXRsfS8+9zOk/eEgiktPsBrPEXpaaJWM01HdTZgVt+GBzB\nSX/WPf+Ffj3HeDuwbeYYmvi0bjdDu3GHjRIh779r62vSRi4Mku7qcKYJJLb+\neka9iyKWL0TGiqcLAc9zTEZwGQTyVYUEwvp4lNN5XnRq5/hgXnxBl57d3HVA\nvBnY3HIU1Wu2FF8L1FBaVBAXPPWyQe+yWOwpJS0uDlz3b2h8PmiIifYoO3QD\nHFSv2+PIj2yEKzpIiIckfODZxU2p0ruhfM/EHClU7eUICjmq9PQGmSoZ7ohQ\n4kxr\r\n=tJ+p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGxMAXut/tL4MRwksOgfRIzIkDnoha95myffFMySAhr6AiEAoiB8SjZ9EU5+iz38CubvxI7nTHlEXVXe6aYFj4uiPA8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-fc69697.2_1575897472627_0.6541432577749993"},"_hasShrinkwrap":false},"0.7.5-alpha-2d03b5e.2":{"name":"graphql-toolkit","version":"0.7.5-alpha-2d03b5e.2","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-2d03b5e.2+2d03b5e","@graphql-toolkit/common":"0.7.5-alpha-2d03b5e.2+2d03b5e","@graphql-toolkit/core":"0.7.5-alpha-2d03b5e.2+2d03b5e","@graphql-toolkit/file-loading":"0.7.5-alpha-2d03b5e.2+2d03b5e","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-2d03b5e.2+2d03b5e","@graphql-toolkit/json-file-loader":"0.7.5-alpha-2d03b5e.2+2d03b5e","@graphql-toolkit/schema-merging":"0.7.5-alpha-2d03b5e.2+2d03b5e","@graphql-toolkit/url-loader":"0.7.5-alpha-2d03b5e.2+2d03b5e"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-2d03b5e.2","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-mQdGF3RXorIEyNLGoLpGt8y7dUC0W2J5bf2AKIrft0wL/nKRNY6FI3/+CTX7PSvDUmw7R96odlBOv6ZZtZrXoQ==","shasum":"85ed1108a21edd951b610c5bc8a16e8502fd3f28","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-2d03b5e.2.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7kmXCRA9TVsSAnZWagAAMkoQAJaKOvIzh4hOuC28eT3W\n3dsIDA0YRs7FvCPtTsCHQUO+0+ogJdcKewMpF9rCQi6rGIBiUO1dsmfpFa3D\nOYF0ghh1QNeemAgP2WmDmTnM3LPyUT731WW+1sdezvLAeOkPlWQb8VApLbzJ\nDT6QWKymDuuodWc+NqV8bRy8itR9EDc/nHXxoNhqGryuDbA7Qt9YOhEVAGnG\nv3TdbhKXBec2jMPEx13p6TOHy9tB6Lc4nHQ9Tlzk8pLg4gLZmomjJTxNdFqc\nG+R5DudlFDxI29S2jAkJgB0tPouMq10SXKs7U601VAP/r0yS5lQbw2Gv8vwX\nlF7SZfEagiXSoklqv+VToOMecP3pWkXxvIwB3ArcPSx46zBRpbolZcoxXL7U\n6sNuMdyPZ+EOTdzcTKNeQPguT9uYP3m9gkKV/7E46BqDEhynVKMhqRKvUs2T\nN13ffr5F5wf5L48Mfm1GGlBYEaH90c5rgZWFGKQjYgr2XrVI6qeRq8NPFwb+\nLVqvRiNNcLVyVawxVXa0JdfN13nriZEhJR3papwdd/qeDyXwWoLzISpyQZax\nMFJpLqCtHhxK5HXaxHOOTxfahpZ8H0JGgZsjlhutdh79d8ge/d0EntEvIVdv\nr9A1VX8/U2goZwr6P4KKLFICwzl+NLrkmiGZloB6UWaS8Rt+NWF1QVCKMDNM\n44Nj\r\n=Wcne\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgHOmO8seT+Ex+2UWjU30oLFn2FhbqO2Mx3bda/m20mAIgVPrj5fxLtFCDJkBjEL/D4ZhwYEKKQV0sm7qlzipDRvc="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-2d03b5e.2_1575897495042_0.05647637992626042"},"_hasShrinkwrap":false},"0.7.5-alpha-369d3bc.2":{"name":"graphql-toolkit","version":"0.7.5-alpha-369d3bc.2","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-369d3bc.2+369d3bc","@graphql-toolkit/common":"0.7.5-alpha-369d3bc.2+369d3bc","@graphql-toolkit/core":"0.7.5-alpha-369d3bc.2+369d3bc","@graphql-toolkit/file-loading":"0.7.5-alpha-369d3bc.2+369d3bc","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-369d3bc.2+369d3bc","@graphql-toolkit/json-file-loader":"0.7.5-alpha-369d3bc.2+369d3bc","@graphql-toolkit/schema-merging":"0.7.5-alpha-369d3bc.2+369d3bc","@graphql-toolkit/url-loader":"0.7.5-alpha-369d3bc.2+369d3bc"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-369d3bc.2","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-5GZlBKH3gY2PKtwNjPhBYYgHGFnqYf3aOvnpo8hFq36BbCy1jZ+B6FkUGulrg1X+AJkQMQI6c8BDq7NSxjxgSw==","shasum":"f85cd7cb883105275ebd8db79f9d08cba3d648c7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-369d3bc.2.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7kmrCRA9TVsSAnZWagAAzu0QAIZmqGiJAilG/bUbYi5O\nQtT1wu6urV8ygGqV5hxmptkpKMzwDIRqtmXkmR4RCdR3LCdq4vylvXailHhv\noL8jqhP8UnP6J5gxHMPn5fNtj/0wdT1KEU1ipycxWJApPWs3KS5EvkbuUCHo\nQCLiervMdh49WSEnbWn49fGoXTJYOz5ElZ95P/0nYmQz5ccriyMTffUF5OyD\nXvzOKPRcwa+ZdVtxrkmPy5OwpFHRB0Uc5Qro9bnGywWohBYHz0fvVaJI8kLg\nlvNdpc6SH87Jz3vOTzON+0RLSX4GvMZWg+96fSnDsYaUSw1cmweNcKqmIYEX\n+sBfpZ34wg9AztmP5+TseeT1njE2k0XmJM+CMc7h2EejMs1AcXulhC/3ROih\nhpd8TCq2W3QPF0vsTi5crm7A7w7bFtmmGyeGCUTv3pJ8Oe9eQT3cqnPawtUr\nGVFIiyDpncKvQ8NShgwoHndv3CIzL/QxqfMpMQuf3q1BBma/rrEYlRlIvHYR\nb3eN0pS73T6cbzWikKfS+T0n0IEtt72cjbGoTLm3gVVayG3FrQWlW5bIq6et\n32AnLDOrMhTrfXYH0Yso5+GqJHk5yy45OQMuOwSeYEe6ziQ53uZU6LmMVoXo\nVV0nDTGRKZgPdINuUvtwNlFrWVN8Uepyxgdk2uSMoGzZpJqGnXY6/IZR6JYO\nL4BZ\r\n=7rw9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF8PaSdmd4OZvBWNtogoe1OFUHd0mKNCrlvMDqNeszm3AiAlAXGhsKbH6dlntjK5lXcQ02vNW6YXOePsBTZOHi49PA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-369d3bc.2_1575897515279_0.33072626989201837"},"_hasShrinkwrap":false},"0.7.5-alpha-a8c2212.2":{"name":"graphql-toolkit","version":"0.7.5-alpha-a8c2212.2","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-a8c2212.2+a8c2212","@graphql-toolkit/common":"0.7.5-alpha-a8c2212.2+a8c2212","@graphql-toolkit/core":"0.7.5-alpha-a8c2212.2+a8c2212","@graphql-toolkit/file-loading":"0.7.5-alpha-a8c2212.2+a8c2212","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-a8c2212.2+a8c2212","@graphql-toolkit/json-file-loader":"0.7.5-alpha-a8c2212.2+a8c2212","@graphql-toolkit/schema-merging":"0.7.5-alpha-a8c2212.2+a8c2212","@graphql-toolkit/url-loader":"0.7.5-alpha-a8c2212.2+a8c2212"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-a8c2212.2","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-vbDJwc/em6nOxKkn3RhSYi+x/aw9duNs3pYACyQokxKlmT7R5xio++y2yN9yqALlasUOlDAHokrXICXki3FgYg==","shasum":"b603bb26f8774eea0cb57d41e63a2a14a904a3cf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-a8c2212.2.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7knwCRA9TVsSAnZWagAAtD8QAJ98AcJnisyuMbjxTXI2\nMwlL99H//mEdzLkU1/DlGFr0llTjCM228M8BRlXmnyBxBsOf2QHUv4Uz2uJQ\nok51J4NikoerfxGrsORcdJzlSX3zbx3+ni84mqes0X+JHd2E1NtAGCW7ImBY\nRENnawIIBHVmL4WML39+DmoxwuCD4PuuQ9+9TZspHaFKwgCHwvwRcqkE5jjX\nkulaq4VWHia7RcPG6ZOeNqvCajlZSogCyE2dOFpSvmnsQuntsLj0VBlMAGkc\nLgXJxAOBxI6yn9OTnMmCopv9kNo6tlmvspChSViX4WYyybRsknFCjFjIAKCX\nTu870R/kz4cVDFzF3QVFf67rUdihMFZ0O6mNOO4bqF/ztNu+qhfpNXhmwFLS\ndD4XXd03IpDD/qCNuxB7uHz2RjB6A1ZbIcgjQRdMJMS//RlHyhqMLLOq1KPF\nkVQ5N9j99vJJJUpz95Jcx8AP3hHBFLsj5FhxG9TJrTF4bl0TY0IzQlQOa7tl\nThjGaRjUPjg1d0hinmimQKBfiZrQIyziuL8VEsqmbE7cR6Twb7WYr3TYo+5E\nNEe8cJcwmW4sX/rjWadcoVTINh0EECPbefjauTydfU96IFhd+gQSFulkZ/Qf\nyG5Z0qVMfA6c/6iPtA5Aw+F3bYbpvPYtSOs/d52RsZMhMns6HNxmiSWYwJFX\nriQI\r\n=1Sqn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnszcv6CoA3wocYpY3o4OVty2ab5l6GdpxKxA27qlSPgIgBO5hUAU02oxSmRW3gNldPB17wjnRCSb2g9mORQyv56A="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-a8c2212.2_1575897584220_0.6461495537702926"},"_hasShrinkwrap":false},"0.7.5-alpha-2fa8841.2":{"name":"graphql-toolkit","version":"0.7.5-alpha-2fa8841.2","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-2fa8841.2+2fa8841","@graphql-toolkit/common":"0.7.5-alpha-2fa8841.2+2fa8841","@graphql-toolkit/core":"0.7.5-alpha-2fa8841.2+2fa8841","@graphql-toolkit/file-loading":"0.7.5-alpha-2fa8841.2+2fa8841","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-2fa8841.2+2fa8841","@graphql-toolkit/json-file-loader":"0.7.5-alpha-2fa8841.2+2fa8841","@graphql-toolkit/schema-merging":"0.7.5-alpha-2fa8841.2+2fa8841","@graphql-toolkit/url-loader":"0.7.5-alpha-2fa8841.2+2fa8841"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-2fa8841.2","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-8XNiMFxSeDBToZczrpUWB95UXfaDFrNV/BtBfJk0OtcjcTBzvgStlI/Ucq+reZe+0hcewn+lpOvExSR7LMNf7w==","shasum":"17a31299ccb64770dd4279c57fb80c584e2eade0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-2fa8841.2.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7lKICRA9TVsSAnZWagAAc1AP/0zcTfEfAa9EAtYqKuGJ\nF3feDuClVPruWWd28XD+XhMPvya1wa+/EPC1oEaM+sILwIvMoM7csqL+p8Wb\n0E96m5wHqmWl4wlL7t1z5lPNtpXNTP2oOkj4RhAvEb3Dj75eUT1XVJEDItq2\nqxuuSiqDfBseEYW9JVbwmU61vSx/aPQMnwwKlaAVuTimXlKwcXorFmXJbd2x\n6Ym6Dqzj7UKbVJAkZNzPFwqdxiGFL8xhCbRkhq48qbcoxhgmjoLzyaR7KqVm\nz63GwliCtH4XsEvwHUzUnTD0/KkXXW03tiN+uBg0uA/E0lX7FKO6XNu5NDdB\n6eKd2Nuz8ogpGnzK4dvkjw6ll2NijdtkP0oQgFNWFNHL11a5FzPjnqTnXg4V\nNPZTTr/KLZT09rVllOi/Nw0DzXLcZQ5s599/aECQ8dL469lItd1vMWrO/F7q\njQyP10XfTI5zhpdokAL3q5wKsYeC6gufj4F8t+72PQCT5AUV3fPiq3jmDLV4\nZmdKQhQTRNSK7dvqNIIw2ApR8bg4prbPGVyGQj4eiMC/zGjmnhwq0/ZHORt9\nfX3jn67swl76V3/RCG+/u1oV3OxXcYGMn8SmD6KMpyyV0dV7H4sYhH0SKdIt\nP55ywmjVPwr8x9yFNIhiagTitkXdTz0re6GPQRZ5kQCupADqY/enFHmQnlM+\nLejR\r\n=Sam5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE8drR8a0CJg83oubRClEoh/1sHnTaaUxKbcOJWMY3xpAiEAx48ZX605SkrQm/bCb7KnZ4RNiCrT8NaQIHlRxidThes="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-2fa8841.2_1575899783447_0.1141828733914112"},"_hasShrinkwrap":false},"0.7.5-alpha-d58eadd.3":{"name":"graphql-toolkit","version":"0.7.5-alpha-d58eadd.3","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-d58eadd.3+d58eadd","@graphql-toolkit/common":"0.7.5-alpha-d58eadd.3+d58eadd","@graphql-toolkit/core":"0.7.5-alpha-d58eadd.3+d58eadd","@graphql-toolkit/file-loading":"0.7.5-alpha-d58eadd.3+d58eadd","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-d58eadd.3+d58eadd","@graphql-toolkit/json-file-loader":"0.7.5-alpha-d58eadd.3+d58eadd","@graphql-toolkit/schema-merging":"0.7.5-alpha-d58eadd.3+d58eadd","@graphql-toolkit/url-loader":"0.7.5-alpha-d58eadd.3+d58eadd"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-d58eadd.3","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-LIm2va81v3kJyIkl0phJs40bwx1OCMiVxN9gOVBmlFcPe46tOPc/k4mikzWfE6OWaH2I0J22Gn8MMASM4fCwaA==","shasum":"1dd1ade508fa97b2384572667f4eff5748ac7e7d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-d58eadd.3.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7lOMCRA9TVsSAnZWagAAisIQAKFHbkNMhbi4Si+4vEDs\nNC6GDLJ2hM6jpcg1XHmhYBwarVVH3dOa03O/sQszyoVK/xEzUpNgfCavb+GA\n3haqE0kOzJq/TyefZ3BXfo10zOUBkCt7jEV20G0f1nhmh152rGTdqrOUSFFd\n9p3LoIGyLJPksN8gXU5jNwsMgeeF27raaa9e85YQ4Uwh62yZPnGZ14Rs72Sm\npB4+YXkXfcua19+RCrtsqugqNcJ3+Y/d8c8HfSTWuU6Evxe2q476Im8AjRwN\nUAJYT2AdliBzp7mGiBNZf74u8tc4jzfmHj9wzDrmKoPueci8sJHT/E3b/6Ri\n3oLiarO1ZfzQ0YoKrCS84qOQPbuRZRjP7O0zIg+snbsEiaI0KUY8WQdtaOgh\nbBoc0RYG/QSSHXJQ4INp9BlfJ+/wRoZkCUzCUZMfYR6bWk5Y4kqHe4+MW3O9\nfHOgzcbwyH0Gltt6lVMruwx3K+aK8G2mFGld3+Y8kzeYj2O67GD9cpGRjRaZ\nFTxZhXpFCpd8bjDaDc855L6CU+eJLyNy/sau8uISpOAnGuXRZ++su88lPtPA\nc9lvwuVq3IB+w7nJGi+xHLlQUHWu7cB4D3z449ch9kaWy0uepVX/aRN4ZDVa\nDHYogetlfwVA6b3P5HqBKH7p0jQCkNjuia+vKj/cg1D0KfouvUTDcQyv+b5J\nBxhj\r\n=tmsp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJYLANjtSUkCDIsIr+GQrT5iRjuCeE1IHjEDrpIub3TAiAUtHgygfvlIsbQLr2QraaeVlJTp6bLLxZldbj9tyOBiQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-d58eadd.3_1575900043696_0.8231546420230704"},"_hasShrinkwrap":false},"0.7.5-alpha-ffa6a90.4":{"name":"graphql-toolkit","version":"0.7.5-alpha-ffa6a90.4","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-ffa6a90.4+ffa6a90","@graphql-toolkit/common":"0.7.5-alpha-ffa6a90.4+ffa6a90","@graphql-toolkit/core":"0.7.5-alpha-ffa6a90.4+ffa6a90","@graphql-toolkit/file-loading":"0.7.5-alpha-ffa6a90.4+ffa6a90","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-ffa6a90.4+ffa6a90","@graphql-toolkit/json-file-loader":"0.7.5-alpha-ffa6a90.4+ffa6a90","@graphql-toolkit/schema-merging":"0.7.5-alpha-ffa6a90.4+ffa6a90","@graphql-toolkit/url-loader":"0.7.5-alpha-ffa6a90.4+ffa6a90"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-ffa6a90.4","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-yChoS6xaRK3ItXD/4wF77X22DY1aRXDKO9Vw4/mHSAqLz+s63VTOGZ58TYpLTzdoeeo1JAqJJOfL3MhHnAf/5w==","shasum":"8f124a414e132fe473342383ff83b1c494ae2623","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-ffa6a90.4.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7lPpCRA9TVsSAnZWagAAlpEP+wSH1F5zfmLxlER1rGsl\n/M9HgAdqISqWzBzf/Joia+xu/yhLKhS54JRTQEJ0e0drCFvNw7GVBt8pIEaQ\nv1IES9YHphssI6Z38/jC/LRoQPAhuZwJIf58veOojQt9c90WWXc6cyg0T+Hv\nZnzKJGTeFiHihIFikeDx522iBmj0wHOXC4KvlIRYBLUxibkONnmBqpHKBy2g\ntav44St7cX0zl0GMxUZ90CFH8bUxET9SMHhPQ0UbeDVGOlux4b+fNh0uYGoK\n7O+oeMC5W79EfovjifNGs74xxkj2G9yCymGPhKOtmlB3vQhHz2v+jxKMJTXB\nLDutJiF6TjT0kHVjkfCbSWpyqD/6NBdC3/vQOb5/iz+hrFEHNFPGfaH4xiGH\nus4kTUiRryichHfBx+xRrEi2UZDLMpy6l7lGgojAnHLHD0VTCjiCkCV6rk/u\nTnLU/H+XTHR3G5E7W35zMvLLDqMx7jx5+vDCM70iVc+IobeIgvSyltSD7mk9\nu0n+9Otb6Z7BDxrcpR4bSJH/4hj9lvZR6/lihG7GbK0FGv42nS0iVYPZ2QsY\ngmUFqH8dEd+UEixIO6MCugwIGyI/blk/XKqyJnoQGPYtv/CVm5hAvznFp1Xg\nEbBF6KLNx20rUTum0G+14NZzEn2lmCnGhuYb4Z2SDdvnyPArI/6NXA/Sa5fa\nnysD\r\n=6jGo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCc6JGcWl0ngs/aqclLS3kRbLpdgHC3F1kzReuLLBP5KAIgXZOhMZnvmGevg48JJ62X/DjCPVx4fXIxpmWe2YadG2k="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-ffa6a90.4_1575900136469_0.4840891631512716"},"_hasShrinkwrap":false},"0.7.5-alpha-0271fe0.5":{"name":"graphql-toolkit","version":"0.7.5-alpha-0271fe0.5","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-0271fe0.5+0271fe0","@graphql-toolkit/common":"0.7.5-alpha-0271fe0.5+0271fe0","@graphql-toolkit/core":"0.7.5-alpha-0271fe0.5+0271fe0","@graphql-toolkit/file-loading":"0.7.5-alpha-0271fe0.5+0271fe0","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-0271fe0.5+0271fe0","@graphql-toolkit/json-file-loader":"0.7.5-alpha-0271fe0.5+0271fe0","@graphql-toolkit/schema-merging":"0.7.5-alpha-0271fe0.5+0271fe0","@graphql-toolkit/url-loader":"0.7.5-alpha-0271fe0.5+0271fe0"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-0271fe0.5","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-CdyuAkhYDnl+kImNHcLO6kfU0EritILHxOA5jQF1WV9mMorHB/0r/lq+YWnDkjVB+ycxoE2GvJZCMTqQ0YWXfA==","shasum":"3ebeb774ee10dbb4a02b573601784b85af3632f0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-0271fe0.5.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7lSXCRA9TVsSAnZWagAAj1MP/jOh8lgfr5Y/nwOnnH8u\nuCN575y0UaOHRbKoVcRgvSkaKI1IO5O+j8QHUeYLHRyjnQXWHj/4uEOBbVUO\nI/7KOKpa7fIGQVc3JR70dF8dlRvd2W2j69A7agzP198jOvKOUPFZYkmAO4tc\nJLstyeuUcU29XCSPINbkNrv3JK44LxcHWZE8zZAfdRHiDhNai6bosDNiWVn9\nRchwXL7epbCRN25qL5II/8xk80Nkmz29/0H7jd0EkaOSMOiIV7AZk5nZ9e7g\n3MpTiVqmjAzcifd0qrXZIjgTwzZfS3yROxf+A1He2iPxDkx4GvqO8hO8S2FJ\n/SumPQXYB5hbrkhJJPkwjolp3WuQ/xLDR07IXHQwAz4Yn33W/InB+Jwr+wIS\nhl7d5ez44SSO5d3B6ixCPrRD/OoBuxBUaEHMJRt4iVCMDWSm5qPktlFxt6WS\ntfQt8U+KsNpOv0PpNwujq9NtrTI8nTwVVyvNRSG4lFwgU54K/Hs7sM3E83nW\nXMOCzBLfcjozVqPSloGT/p5wt/KvA1+ZeLVWwSAUBRRoeSYb2ByYAzLox2F/\nZJQCSBfwH7lZbmC/kKOQo6GoiO7yuCXCzcHEk8IBkorzzb5G0UbVrCKeAt4p\n+MtznPdbHH9aArUSZEWgRCY9T9QsR0rkQsvPKGsI0RQ5aufYA88zxx+NlRxT\n8Sd/\r\n=w0M8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYTHsrTLFN24ZgRPOzYSnIu2gwxXUHOX2xFMdvbbYTAAiAnIcE4y5j04guccQrM60sKxZ8cndbZMVDy3uRwIYiHGQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-0271fe0.5_1575900311441_0.9844798611630787"},"_hasShrinkwrap":false},"0.7.5-alpha-fae4f37.6":{"name":"graphql-toolkit","version":"0.7.5-alpha-fae4f37.6","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-fae4f37.6+fae4f37","@graphql-toolkit/common":"0.7.5-alpha-fae4f37.6+fae4f37","@graphql-toolkit/core":"0.7.5-alpha-fae4f37.6+fae4f37","@graphql-toolkit/file-loading":"0.7.5-alpha-fae4f37.6+fae4f37","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-fae4f37.6+fae4f37","@graphql-toolkit/json-file-loader":"0.7.5-alpha-fae4f37.6+fae4f37","@graphql-toolkit/schema-merging":"0.7.5-alpha-fae4f37.6+fae4f37","@graphql-toolkit/url-loader":"0.7.5-alpha-fae4f37.6+fae4f37"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-fae4f37.6","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-HFb2unorhVVND0VjRoApg7YqyE8K24wr+47hrLy6UIYjhpc3b0FEBXImslSsycnNsVrIS0TuCOzqXVyIoTJfYQ==","shasum":"d815d582fe4ae0fc720be7d258be3a9b9732fc7d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-fae4f37.6.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7lTYCRA9TVsSAnZWagAAbP4P/iYq0giDc+kFtrAJdx4y\n+FrEm+LswEDAR6qwJGBH31UhVjvdj0sh06V1IQKh71Dyqzdqgm2qzAJkFXhO\nAP/QDD+HouOO+Q+M5t/9DdCxY08GORnsRFP+oBZJoGneFURk5OC9H6eRqymj\n3fEhks7dIc73gZWRqti2tCVibXATur79aqUCDh469EKwJBtF+bRN6XT/y0sr\nTKxpFvyO1xW/xU82E8AWjV5oFNO39QTTD5YqHniYrYwbs3Ta4AX3Hw0vRLod\nopE71ys7A4uXh9MVVKm/VBwZF6J2etBAJChOY9rmxX/5gDrd3lrY87lW7/Zl\n0zffOOoC69oAHQGVLNEuHvfn1/1ET3Mzy+LTHZC934wGVKEDSpvy2BdAQfOH\nygGn19/wN1y7pHNiykgDHu+VD2B0Gho42Zu1eO5gwy1A1Wl+MjpUNgnzHlUS\nwC40oO69I4kbVBv0BKDXIs0W+BBS2/NdjrN+I2fG9RhKOiQF2bCB36KXQa1N\ndWw8V7O3hvScYzPTn53yiDWdKbYCVYnkAX4vdzMCO3v1aAumSJzGjE0588mr\nYzhoffru2XbHj4IIzKsXCrCKGEAjyNJErRt8f7YjtlSqDj6sMBxDNJYgKLpr\nAjpWrTHX5w/s795u0rg95jO/H4RpoxLclfdYajhepyec2glbcCkhjg13hNb3\nCupW\r\n=7JeQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFbNPMiUZBttPphi/TqeJ6HLxqslvjgmHQa7oU/PfjA5AiAHD5MRv58rW/QzeBifoFCswWu+jnX9q2DATOwdYO0SEQ=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-fae4f37.6_1575900375788_0.7995033513137144"},"_hasShrinkwrap":false},"0.7.5-alpha-0a82ad0.7":{"name":"graphql-toolkit","version":"0.7.5-alpha-0a82ad0.7","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-0a82ad0.7+0a82ad0","@graphql-toolkit/common":"0.7.5-alpha-0a82ad0.7+0a82ad0","@graphql-toolkit/core":"0.7.5-alpha-0a82ad0.7+0a82ad0","@graphql-toolkit/file-loading":"0.7.5-alpha-0a82ad0.7+0a82ad0","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-0a82ad0.7+0a82ad0","@graphql-toolkit/json-file-loader":"0.7.5-alpha-0a82ad0.7+0a82ad0","@graphql-toolkit/schema-merging":"0.7.5-alpha-0a82ad0.7+0a82ad0","@graphql-toolkit/url-loader":"0.7.5-alpha-0a82ad0.7+0a82ad0"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-0a82ad0.7","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-nlYOf44qc3Kw/BJixDAw3O40FDRbd7HCUvOu7tL50PuROf1/MPVB1c/2QCfhMj4/fEOK0C1lPll/j/TK4m1sng==","shasum":"add60d33c5a451b216b183e5f104ae2e0905b803","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-0a82ad0.7.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7rSaCRA9TVsSAnZWagAAuc8QAJxZgXysX59CwiBdS6Uj\n369iplh4DByXXlMftXMxJzpBVUNmDEShK/2BvU0p6Yg3y7ng9q+s5o/2f+pA\n/o9L9k/PKuKeYd+RUN2a4zFdJYBo23fkNe8pNyKxd1mv/A9k5WCYS9drIk/1\nOEPS0hC7wdBcNxUH4KyZy0z/lwm7GuUsbeF7VpLcpm8oR8zDbLmqNpeySGev\nZ0u2tsCNEz/3rzZM//1jJ+VDcRFWMW8csVEcS7eiqjZ1k2Q472ecGsNP/yqK\nigMogSOllMneE/qWMIi8JxVHBs3BYAl4QI5cYm11v2/1cNB3wdBatJLm5p4t\nFMTb2FqPJdVW4TszEG4+aG7nsEB1UXPQS42ISM9s7Mfc9ObRxteWS5rb+OBR\n93horQ9JaR+zlmuv4/DLrdRAZH1QvAdPDDoyx5ipjUatYlPdNzRgj40CHz4m\nB9l19whdo+XsQSKSpcBVs/ukVyw7E5Ld5Wm6t2qQBctChu9gy6Nmlo7FSt33\nwVQrx2SlY1Evt83a5tiw3Jupcq/G4OqNOs2yYk/Bq1SgvUBvmHeqNsmw0exN\n84mQrj0ec7D3ZFgI0TiJooMvqfEB0+LoyJyTenzWTtkUhR1lCKzS8Ab3Fzcy\nhIAXa7ZCM7pApWgQc0D7o/gzSIkngFJ9gEcbGhbMtqCKqfDC040inNUoydBf\nLSoL\r\n=krR7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFV7izcooxe7y74JFr771X23Pd2x53jCkLd6Tt6RRXVqAiAjqFePHXpUzBd8F+gw7Jf2VpHdX7rQOmTEIYCvizkvCA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-0a82ad0.7_1575924890408_0.5859518242860702"},"_hasShrinkwrap":false},"0.7.5-alpha-cb73d57.7":{"name":"graphql-toolkit","version":"0.7.5-alpha-cb73d57.7","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-cb73d57.7+cb73d57","@graphql-toolkit/common":"0.7.5-alpha-cb73d57.7+cb73d57","@graphql-toolkit/core":"0.7.5-alpha-cb73d57.7+cb73d57","@graphql-toolkit/file-loading":"0.7.5-alpha-cb73d57.7+cb73d57","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-cb73d57.7+cb73d57","@graphql-toolkit/json-file-loader":"0.7.5-alpha-cb73d57.7+cb73d57","@graphql-toolkit/schema-merging":"0.7.5-alpha-cb73d57.7+cb73d57","@graphql-toolkit/url-loader":"0.7.5-alpha-cb73d57.7+cb73d57"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-cb73d57.7","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-u7+hak42n4zv1gGPciTy3j49nGFMgGy29FP4xoSJMrnJ1FEt7zZBPoRGF62I10rKHTEdD/S5kgl6JhIGpf/srg==","shasum":"f1924f2a60e65abbeb1c8fd81df000d6dfb6ba5a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-cb73d57.7.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7rSxCRA9TVsSAnZWagAA8U0P/ioHhywj+AIDEVr+9WT1\nG0lRNpdEM54+8fWar+wZon9xkDz4Ll8PoniZSzHloUkBw05+IGtFXx2DxEgx\nOKmWwUokWMg3dB+omSaL+vFbO1JdbDjVpVhksDjxH9SSA23MZ8c7dqU+g3Us\nRW9tGX/jzLAq/DzUnYjgr7zsDvzlBPS2HQOfiPQewVbJwBWia85UV5sERp+h\nVJNC9VldbboDiC38SwQjfXtoJ7znwzoFN8PJQv0+dtTBdWrQI0UXbIzdlMYU\n9qhdjn0K2uuZ8P0KtWlXjKtdij+V5m0jJqUqIamOirMcgiwqN0nJJMerMfZ2\nH5v7VDSh+PvTPny2Sp/jQ/ap7A62DWsIO+3TNveKApeggao4LbL0/iULI7Nf\nDnzwrtCewBHA61hbwe60GyLIzA/pA1/Gl9LMy2UUFGCrKh32PNAW/aZvS4G9\n0z5A86zYc4SQehJNhk23QCFptzws9iNYQv0VcxlPEiABcl8t/SnmO/ysJSE7\ngPxZ+zz93ZbIChs2q1cuOp95i7LL5t5MXbBsaW7tny5DFW1pZcQ2ttOD4IhK\nQhTDJXGVtGr+zeD9s0MEzMla3+5IoqxllLAvJ0eRYBvLv9SCsIoeunCRrWRC\nOwVDKLk9t5ANCYUZUE+f4oHfzrvYaBS+KXfv3Zelcxes7BuuUsvWutT5h5O9\ngfzZ\r\n=P9PX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtiien0HGAFkacbEQ9nqwt9EEVdm2PrCFiYQQD1jjmcQIgFQpMw8tsUm2E7df/bGAPVTglgMoar6Ly7Lv0dVNhzgo="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-cb73d57.7_1575924913471_0.9209753466748156"},"_hasShrinkwrap":false},"0.7.5-alpha-2e1e08a.7":{"name":"graphql-toolkit","version":"0.7.5-alpha-2e1e08a.7","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-2e1e08a.7+2e1e08a","@graphql-toolkit/common":"0.7.5-alpha-2e1e08a.7+2e1e08a","@graphql-toolkit/core":"0.7.5-alpha-2e1e08a.7+2e1e08a","@graphql-toolkit/file-loading":"0.7.5-alpha-2e1e08a.7+2e1e08a","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-2e1e08a.7+2e1e08a","@graphql-toolkit/json-file-loader":"0.7.5-alpha-2e1e08a.7+2e1e08a","@graphql-toolkit/schema-merging":"0.7.5-alpha-2e1e08a.7+2e1e08a","@graphql-toolkit/url-loader":"0.7.5-alpha-2e1e08a.7+2e1e08a"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-2e1e08a.7","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-xflsOAaoVDgaRqjsFQ9CNb+r7wYBKWAl7TzqLCrYYtujD+SlxxLPtDzJmpxtQ5j4tCam1MkZX0s2k8F3oJDMzQ==","shasum":"3a4e825011e21b8871a4687048fe003bc185e5b2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-2e1e08a.7.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7rgnCRA9TVsSAnZWagAAgSMP/jOplOl4iPmx2jpoWdBp\nJVGz6yJfBEyHMnvS9qezLotnbOV2b/wZE4h+ZcbdrIZojYzk0DH88vatgCD0\nYW38OJ54KDeunmZRJ/jl+Nh1EQw3t3RE6MZRnVNK85A04NBnKJ+MhX4cuG4b\nDfpdRfB6vjwlH+5WGxPrhJGT1jEYoO+Z9ZXY7L4rnI05X6uGysa0dKBOO1he\nYfGkaMyZ6Pu5YBZMxDCHApVSpC8Rgd97XewBmQOgkdhDD64DKhc5GOoqthHe\njg6h9Q6nQhP9C3Bw04wtiFEiSsZuRRdpnJah1CgDuWp0Ftj8Q3QJAi7uNv+0\n9Me1dE3MFLdm+KYoVxb7+KY8tRDFa1rfom6X4jFlf338ywA3/teniL3Yq3v1\ncl7bZrKin0HCLd5BOya1qaabns4rKPKERKTQkUMWpPSpTkkE9tPJGBhxE5Qt\nhj8+87XowmT68zCJU4hx0xXfOyd8tKqeqCYRId6i8C0Qq+HWP7goZGIBGMny\np6uWhNjtiUKDsoQUM3cikpCbKG31qDsu1sMgK5gpQGSaKaqHrcZ5v28qOog9\nlCf6gp9DQCNIsCruH1HwAkaGzklGGqYYrLaOxOFsLkyuU+dmAhfJAZoIw4Vd\nSrFh2zvI90yRxZ9VEXXnmbW20kErCvhtCzsJVfA0FfPvXno6S70yI3P91x/9\n60hY\r\n=Ra7S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBgI6xYWZwMznlUYaMhJeGkuqikE35qG9ym1Z+YSHQavAiEA90JyzIxIAi/UDH1dnRp7MTv35dbQ3mQEf9fmPdq/RC8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-2e1e08a.7_1575925798901_0.8207482553527956"},"_hasShrinkwrap":false},"0.7.5-alpha-022945b.8":{"name":"graphql-toolkit","version":"0.7.5-alpha-022945b.8","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-022945b.8+022945b","@graphql-toolkit/common":"0.7.5-alpha-022945b.8+022945b","@graphql-toolkit/core":"0.7.5-alpha-022945b.8+022945b","@graphql-toolkit/file-loading":"0.7.5-alpha-022945b.8+022945b","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-022945b.8+022945b","@graphql-toolkit/json-file-loader":"0.7.5-alpha-022945b.8+022945b","@graphql-toolkit/schema-merging":"0.7.5-alpha-022945b.8+022945b","@graphql-toolkit/url-loader":"0.7.5-alpha-022945b.8+022945b"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-022945b.8","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-mD9rtS7NTnHdZ/BqemhrFlyYx5yHvHoyC5ZbOKoIU2ypNkcyjcMnRimAHkLgNX2z0V1bXsAmCYUV8YWZJOrs/A==","shasum":"ff7f741a02777cd1b1e5af2c1c06d18fc4638030","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-022945b.8.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7rmHCRA9TVsSAnZWagAACQUQAKFNeW3W5wXYMgwQaKUO\nnjr2WUf3Ct83zQ9mELwwSSc3BY+hfSN1hDAkUntgdRuoXcnoDDA5dYhg0Nff\nyEw9s6nSRJJvJkgdQottqo3WsERscJS3Nf5qo4Zj55/nhwM8f2Dqnaq/2Q8F\nRjDrYZPihKXCbg5zg5Hl3BOYMaYYgnw25KuU+D+X2LAg2VYDn8eqlvylaW8V\nNpKfv/HJDdJEhknW74uZS76bLK4O+t326sBg/TxSHh+8hdo52fTZ3IbaOO8d\n34HAaWLCMpcadUIvxG3ns3DBlNK6fNjT0dwtxh5c2L5T/zlq23b10cvSppCH\nEu8cLERqwTkd/TnErXg92A3Y2QHlxza6avgXisRJJqYi9/FJHLSs2KeDzysL\nuWYwYcA0UgZxA6O3uVPkcj4HIB50Z8AADYJZ/2VqVBpQMyOaWYRj36vWZUAy\nxIMN8E4Uw1x44db+KxeWzqjdelsN8cxZ7gGXc3npAmnUnrZYNcXE7rlI26Cd\nhMFMaB76g/1RD6kltwiOHn0516KLPM7tVqX2LfLojUYyYfcQbB632TSTi1M4\nphylUaY4pRBIZOMamt9YNXrDWTmV49gDXxVWnyopCZ3fodMF+w8nCD7d5FPh\nVmovA7rH71BkUoUXi9aFAeWeHTJTX1u4KkiNS0LUZa23/I0NaPSM/xpSyXSu\nC+/m\r\n=2Lla\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFhLblscehSczsv4l7Gj6maH/Z+HxGrnQ3P97R40TLnwIgOW4pIa2Dmwb2IozD0Nn31UVNM0ty9x/+ZcUtHTLG4Yg="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-022945b.8_1575926150635_0.803923320913402"},"_hasShrinkwrap":false},"0.7.5-alpha-109bc38.9":{"name":"graphql-toolkit","version":"0.7.5-alpha-109bc38.9","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-109bc38.9+109bc38","@graphql-toolkit/common":"0.7.5-alpha-109bc38.9+109bc38","@graphql-toolkit/core":"0.7.5-alpha-109bc38.9+109bc38","@graphql-toolkit/file-loading":"0.7.5-alpha-109bc38.9+109bc38","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-109bc38.9+109bc38","@graphql-toolkit/json-file-loader":"0.7.5-alpha-109bc38.9+109bc38","@graphql-toolkit/schema-merging":"0.7.5-alpha-109bc38.9+109bc38","@graphql-toolkit/url-loader":"0.7.5-alpha-109bc38.9+109bc38"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-109bc38.9","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-SxP1GSKJX0o8Jlplv4po6docCvXiTAKBIdo4i1OecbHeFrbqI2JWrV/TfJFstZm9LEuYepDWlUCWz4kr9A5zhQ==","shasum":"4170a78e3321444d4fad85bfca16a213394aa325","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-109bc38.9.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7/MVCRA9TVsSAnZWagAAiMoP/jPJstiUc+LpL9Ld5+8R\n7kqBxpoqEQXKSbh87+9tjciPyYByrVJzNTqMQ5KJw6VZjtNO0yK4mMllrLdR\n7+bexmvSHkzNv46Jj8sFyVnvAYHag+vdjnrTs0b+EQCxUi2OKj6pYALstum3\noWRNQd9/9lhWZEbOALR1vXjNUlQ+lmPa+ql2u6O2aGwU/a6tetchfTsHZ0av\ngrQ/GmYqcBEccb/+FUEBugClWW2blA58wYmiwSUfWKfvVoQkfLsyR4BQngzB\nL1X4gYlNZQGNwWVlyY/AF/xJiL0B99Gdw+DHgGgHeGZTJUubxo3KxBk1FriU\n4mudL1BgaUmx2MNXdIfIb+Wi8bOallwQ49/wRHEn0M8zCWdmUVRIz4xnAuYR\nyxo8WLuhP8FW7YBo3S3WNbn8zKi394SL/OiAQ3UUCeReZmSli6Ume/CSqIMc\nv9qUc5FcNp5SUDtsKX7EWmj7aVNq7w8vkhkq24jYQPDE3JpIKvCVblT8pT6l\nTide8uXIZ5m0fgS+WNMStx4u2cdco3KY2a6wGev/lq0J8QhdO5+XKinob2qJ\n0aUKmOICo9qRWN4PnCyhITT0oyWYzqeSo4nGzBV5HRYkElNUixQ/hUaQSc7t\n9EclXUkZqBTVDoMhJPjiP6theWcfED4sLN85QbPfSSMgTzVU2RPQ9YBoVQJV\nKuS8\r\n=cBuD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDrw58DzkHgrhxoBjgWp2MNF0BwrAB9FyQzvcxR4NUwtAiADyL6vdCIwOgEV5B3NR30tlOf9nzKvjv7Qj45bMig4fA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-109bc38.9_1576006420709_0.8725413769158299"},"_hasShrinkwrap":false},"0.7.5-alpha-f4c9a57.9":{"name":"graphql-toolkit","version":"0.7.5-alpha-f4c9a57.9","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-f4c9a57.9+f4c9a57","@graphql-toolkit/common":"0.7.5-alpha-f4c9a57.9+f4c9a57","@graphql-toolkit/core":"0.7.5-alpha-f4c9a57.9+f4c9a57","@graphql-toolkit/file-loading":"0.7.5-alpha-f4c9a57.9+f4c9a57","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-f4c9a57.9+f4c9a57","@graphql-toolkit/json-file-loader":"0.7.5-alpha-f4c9a57.9+f4c9a57","@graphql-toolkit/schema-merging":"0.7.5-alpha-f4c9a57.9+f4c9a57","@graphql-toolkit/url-loader":"0.7.5-alpha-f4c9a57.9+f4c9a57"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-f4c9a57.9","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-yl6KDtfbk4WEcVEIr77N7OUTN2/B1vYKtXaNzCcwydmdZ/p5zJlCfeBHCkUYU8n3PlmqeRUAZfMvKMEERzT9/A==","shasum":"8ec9966a8204a5e938a2f29f2a9898dac510e16d","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-f4c9a57.9.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7/MfCRA9TVsSAnZWagAAW+IP/jgf3rDhnL6e2MEKR5rd\nA4za29KSxyD36LguM3v2KLEd3INbCbE0N50Mk4SdbTK+0T9TdfC9WVGHw7pc\nhaucyTyAuyRTvOckZIotw5JTXNU8oZjlIFp5YA43lJyCml3vOAXL0viHQlxG\ngQGn2iyloxjxgogQ9S+K2nmedjS03sEcbvG2fvd+6lb/0bVoNNp1o87EGKWM\n97RoOjrmw80JpdO2pl7lf882EjvNG+rJvNKtdaR+lJWVfMgokOQcUnRdE4cg\nKLhBwLWTxvYGLXMLDMisGZvERj/hlst6VE+kJEoWqovh6BbWP6hEWo/tyqfz\nsIeWKJSyaOVZzrmF686lD8mSmeIVBVv7TCPBTBXUwb3fTGoHt3lgMKmLSCET\neJ5XJtKRKUfxQtiMUcos/BT2gNd6Jui9CQ1v6USWhKbV7dC9BxX5CTe9CfhY\nSHJ/YIigctVEHhtjXjjO2QM2sfw7x1XlYN54mSEf+RJHwymLZuw1zv0ERHqw\nKjPgWn2R2pxKxd0oVIUi/i7qD1xbQaWTVFKjFVQx3v7zWDLewYYQ7VBbtfWW\nRsXU98lCZ/wwZGHUEqcYCSlB1hgekh4IQ35OZwVLhK3yUrBXj8HdkQ5zHmJ7\n6fEpJPcKotVtar+IW6QiPc+Gf3Bcrsm8xRbRdVvs1WKfIrQiGhLoqvYU4Jfb\n6/9N\r\n=/9sj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDQWmQpPZ5R847anMccdse+667KVLx9+lKTFfieLSC3IAiEAwxuh0ldXwQ/v50wk5g4nt6wRG4blLv1KyZW450TVOew="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-f4c9a57.9_1576006430529_0.013341245663626378"},"_hasShrinkwrap":false},"0.7.5-alpha-541fc7d.9":{"name":"graphql-toolkit","version":"0.7.5-alpha-541fc7d.9","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-541fc7d.9+541fc7d","@graphql-toolkit/common":"0.7.5-alpha-541fc7d.9+541fc7d","@graphql-toolkit/core":"0.7.5-alpha-541fc7d.9+541fc7d","@graphql-toolkit/file-loading":"0.7.5-alpha-541fc7d.9+541fc7d","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-541fc7d.9+541fc7d","@graphql-toolkit/json-file-loader":"0.7.5-alpha-541fc7d.9+541fc7d","@graphql-toolkit/schema-merging":"0.7.5-alpha-541fc7d.9+541fc7d","@graphql-toolkit/url-loader":"0.7.5-alpha-541fc7d.9+541fc7d"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-541fc7d.9","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-ntn1Id9SeBnB5xkhk9TvNxxGrHSxd3U6ki25uPBYDwXlwWKgCSoCAvF/VKIBYWJCuK826r/H8sa6rCMI8nnomQ==","shasum":"06b69b96d975be510056d22568b8c53d22ad63e8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-541fc7d.9.tgz","fileCount":5,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7/aPCRA9TVsSAnZWagAAIn0P/3fXGYtJohio9Kr9Wrns\nIJU9iDanjEHbRs9NpfFGklhcQySz+EDCF021M1IDw7SeR2WHexz5XKBnL77B\n6ljnoFcGBB6DL2aJlgRqslT/ddSH9lKX6XkKMxr5T1zAGzuiq3rEs75gCC8q\nGu2rlXtjWPPzmMrul5Pr86w6K5EqAtQrZ/ZDAKTlY8ypzuOdpcBXwYn0IAtj\ngiX4qRcEd8mBk08Eqft3O+pxNyGFMtdmISLZ7hSnNp8r3MN98Gm6cK5jMlJd\nagc5ZwXQso7f8VyH1Qk4zV/NbNeSeQyqBKxdiw+6kpRrIt8t2yV1/tTFDY7g\n2VEZCNhq9koS+QHb9MZ2IkDnWUsn81hn8zINKB/nRDGosUHpj2Es2Q8xuKFT\n4gjzbl2AUQv3/giQCRsHMquTIROyh1cVRHP+sl7EwprhhZfbxGNS3w56OTHl\nx+yfQEN0MWXe5wFDKKB4nGiHPzPYs/uT3PVdiaKugWaVVcq2NpOulTJ0/rvd\ncghQhM6VjfS34nu+ZIMUp6SZB/vAHPe8DFW2U63ucAsj2FNlntqhn+bmXeOj\nZsU8UCqX1YsMBQ0amOYwgNwH5WgNkpY7kX2ujDTuNB0pR3y1vjJOdPN/oolJ\nz3Q/PmINCOyypY1j53bnSB6cpn7IWd907m3YuUyCBzupRUvWCpABkiO+7tGg\na1cr\r\n=u9Fu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUMorI5JljHy3a7GNpYcsyWp1mRkBhOvVD255gyu4+zQIhAJQ9HoHk+sEgaVLueDr+s5ylPURajAJvJBjNj1JUYDG8"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-541fc7d.9_1576007310739_0.8482972265469158"},"_hasShrinkwrap":false},"0.7.5-alpha-251d580.10":{"name":"graphql-toolkit","version":"0.7.5-alpha-251d580.10","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-251d580.10+251d580","@graphql-toolkit/common":"0.7.5-alpha-251d580.10+251d580","@graphql-toolkit/core":"0.7.5-alpha-251d580.10+251d580","@graphql-toolkit/file-loading":"0.7.5-alpha-251d580.10+251d580","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-251d580.10+251d580","@graphql-toolkit/json-file-loader":"0.7.5-alpha-251d580.10+251d580","@graphql-toolkit/schema-merging":"0.7.5-alpha-251d580.10+251d580","@graphql-toolkit/url-loader":"0.7.5-alpha-251d580.10+251d580"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-251d580.10","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-xMy7jNU3RR6/HfpCuop6Zv/F+qHlCAuGEJhHH7msTSnLL6+JJS8ptc54IfcQSlKaIIFkU63y7/QNHZodHaF/Sw==","shasum":"5787748c83b0d51d133ed6145a314aacd17a175a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-251d580.10.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7/fHCRA9TVsSAnZWagAAj28QAJaPvNMs4wBrOpxfjJgF\nm1Lgh1LtJ0hPhOwRyFnxEJEzAj9P/iDhx4Ydv0UsPilY7SODlldMDngnZPSd\ngoziIrwPDoapLBZg1R9uOvNZ/9l5JrdmiqQcerYxDqN7HswnUiBPghlxa0YF\ngdz/GFFZvDS9l2sEX9qql+EC0vcLyR3irenXanxl1QJ+1/HlKrIV5lWhCq8L\nFVo35HKvjtegB4gpVQHvygYV7BtsjOmtx6LRYJwFt8K0q0c6tgs0jHyRPUxx\na4CyHDxlLNF8xjImxfAAdUAeE2Zj7WG/QfRWYeaYAIpVVJpcBMCJJZGzEjGh\nsaQ0hCRWGcRVPixbl+fUMvGVQqH/aOxQqUtCFBTIIgbPgtM/w3bsRrd9AzUw\nW7W+3+d+hRNISZrgpW403oDNryv7XcN67EvbJnfFeMkOr4FcGZfTgi5ikM3T\nT+boIt9jIiyQS49jkknx0i1SNsCOW2tryoNxqzoSvZ+fgMfVRYdLqAOYXg7h\nin9z9QBiCewI0QDy4+E1JjxMRnLDfHTxrLb9XZB5bjOKeRJ7lhAapCFr0SF9\ny7U3jTdE/hBqVw59hXdyUh2lNySn6A3U/50A8eA54VUY+4xoxKSw3u0345mS\neEyM9GAABBsJaQzkvdyGPuOSwYEgcpGB3JVHd8+xLTzK5Su/C0rZ+hzg4+uu\nOLbA\r\n=IzB1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtLP+A9+s5oSLpVFZNMdoUAJfNi0BwRh5GzEQAFwDjEAIgXiFImJ+CZZSUxH8H32eRNuuJHXicl/5Dar5JzBX2lJc="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-251d580.10_1576007623398_0.1517122406625353"},"_hasShrinkwrap":false},"0.7.5-alpha-09ecebe.11":{"name":"graphql-toolkit","version":"0.7.5-alpha-09ecebe.11","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-09ecebe.11+09ecebe","@graphql-toolkit/common":"0.7.5-alpha-09ecebe.11+09ecebe","@graphql-toolkit/core":"0.7.5-alpha-09ecebe.11+09ecebe","@graphql-toolkit/file-loading":"0.7.5-alpha-09ecebe.11+09ecebe","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-09ecebe.11+09ecebe","@graphql-toolkit/json-file-loader":"0.7.5-alpha-09ecebe.11+09ecebe","@graphql-toolkit/schema-merging":"0.7.5-alpha-09ecebe.11+09ecebe","@graphql-toolkit/url-loader":"0.7.5-alpha-09ecebe.11+09ecebe"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-09ecebe.11","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-iC5Zc6SIt11iV/g9XGFbtEJhjFPa7KXacgTNCPuE8KtXmYloVgwjjnogda3b/ULaeWkQtejYalhB62wltScXGA==","shasum":"d838db620ac0040755a3b52b077a4b09c3db064e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-09ecebe.11.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8Ww/CRA9TVsSAnZWagAABAwQAKQ5l4uw4IuOS0ny2Om8\nuh2Ec/pXoDn3euIQrgVBoAzVwDabeFOM1gi2Zqai/XrHyTc61Fvm6/sXbam1\nY2SpplvaTbqUxTMT4P6UuVs727aPmux6iF4/Xm5cu79W9bTFzwYjEIza2lZP\nvlJ0KiptjBdgPHB9npktTNkiFYCyMP6qznqA/FWkeH1eD482xvGYzli5v75U\nm9JlxdpRc5GOb28HllQgqjX2nuU7QXnWtTmj3HX11n8h/I+CY5b+YWF4F4Ah\nQB0QHvlLpRJdVpwG/NcEXmrNOvD4bkEIzHdNtTX6JUSEbEfMLBCmNwCqWa6d\nX7xUCwlm27rqU67MEYGHlH8RqUrXR3/igdYy5ma0unmky7atGJxPenO1PdWE\nK/U7uJDpB2tYuDpSM9hF7+ajbGftLsbTt3kev+R2lzASUDZEtduzNr723mdX\nMJQ8Mrim8E1uX6pAXxOpuo+H8ltrd0k0ejDWUArHlLVaNS/Az9m/yvxmgRZz\nkjyUGEvnBrBjrNOHeENs9OSWKnh0fF/ALPW+4gReYMpFwyBEmtOQwlXy9VrE\nySQdxp8yhKFQhPmhAuC+pYmCiaWNEySkdQBYiVmGfqt9QyjH8r6tK5zTdmlH\nw0ronFGTjTRbN5W68JPzllVZVNuAv9jY5r8o0LsRIVNMD9+2LBCvcr7mrjjY\nR+lQ\r\n=gGEw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCP1H9Eb9F2DMde6KYXo3ZuUtIQ3QoVKGiTI3myJi8jAwIgYOkasFBo1KWLaG/JG2PQvnle0YTUDs+GJ64UQ8URbIo="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-09ecebe.11_1576102975283_0.9086509055594085"},"_hasShrinkwrap":false},"0.7.5-alpha-e3f9dfc.11":{"name":"graphql-toolkit","version":"0.7.5-alpha-e3f9dfc.11","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-e3f9dfc.11+e3f9dfc","@graphql-toolkit/common":"0.7.5-alpha-e3f9dfc.11+e3f9dfc","@graphql-toolkit/core":"0.7.5-alpha-e3f9dfc.11+e3f9dfc","@graphql-toolkit/file-loading":"0.7.5-alpha-e3f9dfc.11+e3f9dfc","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-e3f9dfc.11+e3f9dfc","@graphql-toolkit/json-file-loader":"0.7.5-alpha-e3f9dfc.11+e3f9dfc","@graphql-toolkit/schema-merging":"0.7.5-alpha-e3f9dfc.11+e3f9dfc","@graphql-toolkit/url-loader":"0.7.5-alpha-e3f9dfc.11+e3f9dfc"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-e3f9dfc.11","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-KOI/nzrq3p2HEsGZxDIRAh7JpCoQCJLf4+G64VwXzb1UCdc0eWQ+VHQrHMVWYUabJ2krzWBCVm1fd/RJSjLs3A==","shasum":"9b33ebf7d4ea220c3d5b13bb6f9cdfec86e8b515","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-e3f9dfc.11.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8W1DCRA9TVsSAnZWagAAUb0QAIbGQ0Ek9bqX6WE0vwP/\nQIbgEkhdOSAepBOUVCvOwzE2OEUieUiQDTbkuovst+mWIL0MT9fPJdq+V3C4\nLAhvpKkZWdzQLbhY0ZFzM+Gf9D9R0t2/kSwAjkjGoq4EcqDS7lqQTXf+VxPT\nj1yemAB1ZnMwopwaky/Nwlf49qd0Nukcg0TYeVdZevY5Lw7PJ4ltBPjcCegm\n3D5G8P7J28wr6zCJyGx7rS0Yws0rPGBd2gBRn5cKRFGJNGvDP7NG0JlBXrwe\nGiNuk368tefdJhaWiVRbGDRH4pD8UxnvqYDoG1QcRtuPMMsltLEtX5FOZmXZ\nPIsDXANGfSO6wxjYwXMK6Tpe/9RzbEqD+5xLXm9qoQKbjLIk2+AAMpiqKEmt\ntW0nBXCvrtzUD9DLELtyumoN9RyM9xpbs2xrGNpzLa0CgDbhYjQirS5APkcX\nJ113QdepBtToQpk1g/si6T7rG3DZrnYeuV10AtBIwbosdmCaqnh6CFdSgbO+\n/WLeQsJFxSFLG8FkfB7Nh1Z0DyCqckk27Ejjk+9aMLj+tKwqNbBl8dTOJH6K\n1ejjkjpCqhPKcYyqcBQ05uWSdJBUCLJLpGAXjuSOehCKeO1TJ2gIr85GKo8V\nZ/+G9Ql01paLUN4/loqCeMoNtVmlK5PTe8uorE1vv8IS4c1WnoOF2W4jSpsX\nB8i7\r\n=gGBZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHmN4mPmPaiVqKryJ3XCSt/eBQNlpJyWohjBdNy8NsebAiAW09yp1iOkf8DGv/p6nD4uiR7bowyRc7H2UGovCjNq7g=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-e3f9dfc.11_1576103234939_0.8797509644472854"},"_hasShrinkwrap":false},"0.7.5-alpha-068a9db.12":{"name":"graphql-toolkit","version":"0.7.5-alpha-068a9db.12","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-068a9db.12+068a9db","@graphql-toolkit/common":"0.7.5-alpha-068a9db.12+068a9db","@graphql-toolkit/core":"0.7.5-alpha-068a9db.12+068a9db","@graphql-toolkit/file-loading":"0.7.5-alpha-068a9db.12+068a9db","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-068a9db.12+068a9db","@graphql-toolkit/json-file-loader":"0.7.5-alpha-068a9db.12+068a9db","@graphql-toolkit/schema-merging":"0.7.5-alpha-068a9db.12+068a9db","@graphql-toolkit/url-loader":"0.7.5-alpha-068a9db.12+068a9db"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-068a9db.12","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-hwbTmMnCMW3G1iLpKGJQ544UkGN0zJ4uj4/iIH32+Xn5a8OQI+EF3+SAzGPGxgN1FnugkccIF3WRNy0gCXcFuw==","shasum":"592f4887d7fbdc2a7b04f8d7085ffb6ad5c631cf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-068a9db.12.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8ZAfCRA9TVsSAnZWagAAdX8P/2R7G5j8MsftHXb8kHoT\n/iHddp1FI11Yo3/80o4dEOJwFL6ESw37SUZOtCaJT2o6Ff7ML/pxq87SsYx1\nKRVeM+TciOeLxg5AlEFHzCNIgZsrrZryrkrNzBMx5e74OD0zH0ejX455R/WR\nFEVqLoOoIp8+y3SmiHD2ikpBoQmJVtIjNdyYUwd8bVcalwnXxk/9Sjapewd0\nPTf/x7v2Ym5VGGi9S+HjSAZjalgqu5QlLrVAKimP++DdfY4X/Ajz37f+8dTz\nWyMkeHpT8mrXHavP/woIuDBCwdLH3beYVcRPwfVISm7uZSjstpPRljO1T5k5\nAlLGqRgOQB7CzfcXEjeAbAVx94FjTpBDn/IMPvMacMXJLenpJvQ86+3T6ikR\ndQT6PiiFiDdhK0FXU11INwhDcOV+NTF8bA2GADmjs9aD9QCaPIv83G6IJKhq\nxVQax4mwVJbwHROE4P+EqY3SYoneMeyVrUu0hjex5O3PDxKDxTd2qquTPFkl\nZfhuHFO77RP1kuFjgzi9FoTSnMZF5AYOpwiorsfaVIZW1oLzqub92H5d1cTK\nKkzuRVHUSgKsYkk9b8IkzteTekZWRIDkap9C8F51P+F32NZU0zEwapoeoqca\n+6Zahiv79FI/N2Z0wDaSLOvbzTRtvvtytV3SNJHrZf+hmppS+tfYmGE2O8lf\nkfpO\r\n=gUEN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCL7ebS0Tdwje4rLJPK/jhb1Yim1NuMJNN5f0JgNjLd3AIgZY1cBoDYjJuAHksYI00EjqTLWu4jJ/C+fdKkGwBarOQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-068a9db.12_1576112159530_0.7780281045782413"},"_hasShrinkwrap":false},"0.7.5-alpha-92585e4.14":{"name":"graphql-toolkit","version":"0.7.5-alpha-92585e4.14","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-92585e4.14+92585e4","@graphql-toolkit/common":"0.7.5-alpha-92585e4.14+92585e4","@graphql-toolkit/core":"0.7.5-alpha-92585e4.14+92585e4","@graphql-toolkit/file-loading":"0.7.5-alpha-92585e4.14+92585e4","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-92585e4.14+92585e4","@graphql-toolkit/json-file-loader":"0.7.5-alpha-92585e4.14+92585e4","@graphql-toolkit/schema-merging":"0.7.5-alpha-92585e4.14+92585e4","@graphql-toolkit/url-loader":"0.7.5-alpha-92585e4.14+92585e4"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-92585e4.14","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-KQ2B2qAuk02vs0pU5RUU2PW5AJhEJvuT/eh3MYjS+r0U35fGK1E3FkOF5qcl1Yz0UpKYUrLzxtM16rPRQO+ZXA==","shasum":"a255d63af901d47170b25218c3ef46ea68d1f9ed","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-92585e4.14.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8fWXCRA9TVsSAnZWagAAdvcQAII2sORF+cJDM3IpQxHj\neLlPiuQScYK+YIPCOmQ7YLxtV7OvgYc1IbBiVrDVanxFSGoP1z2NHoIgZfKL\nEGwtfOD3tlWHVMJvu80EyPtdverrO5sHCrKHN4Wt/hLTtu34hgM1jid7zNuN\nZ0eaYwI3mtSfBCyy0eeomq04y8xAVNa6bxLdJEfiVSo1z9L1ZX7WORMnZcEA\nOBKw4RX9pfnLhTIx5PX+WGQ9yrEXUa+xYwBqWVoyH51OO4yZ3DzYbz/OWquL\no10NzVhjtDCpairDWyd3ki15LPidZIVkBinxmaBxPqr41BWssUqz6EyDJvFx\neDoZZwxUQQQ2N8cTklvOkxvxyc7Gxr/Vc4u02rOTLTXqOlpEQPwHxw+YzQUo\n9/AEdIkziq9P2SgSOneCmk8Yb+X3jqzIeBiUnwmxb7oMy5MUOK9qU5hjnxIB\nssRbf/4R7347l2VgmUemIi+OSINSIuqQvWBzsuQye++H6qBsSuSnA4hFYkW2\nO9cRFLiZ7ufILhYDUp4yAt4klapLYuIrpHmQnkSkhWESVmwPMCrVq0WGEMbN\nMRwMmyubrDyP+fKHbzM3PU/FPqp6cmePvKS/A/U2AtxKi47iv9KADZuq8ypZ\nJPfYw4mi8vfNrJ03hFo2ZJeREfEUN6wlk+ygSavg3Zu321OJLPrvWEhxUmac\nT7Pw\r\n=+hcb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDBxBFvcctHgoYzUG3p2nTl1HI7LuoFZG5R3f2mrkf8AIgFRTp++u42Wu7/bzuhdUERZRk2pt31624r5AZ2bIrwc0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-92585e4.14_1576138134749_0.9938297612858424"},"_hasShrinkwrap":false},"0.7.5-alpha-90cb687.15":{"name":"graphql-toolkit","version":"0.7.5-alpha-90cb687.15","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-90cb687.15+90cb687","@graphql-toolkit/common":"0.7.5-alpha-90cb687.15+90cb687","@graphql-toolkit/core":"0.7.5-alpha-90cb687.15+90cb687","@graphql-toolkit/file-loading":"0.7.5-alpha-90cb687.15+90cb687","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-90cb687.15+90cb687","@graphql-toolkit/json-file-loader":"0.7.5-alpha-90cb687.15+90cb687","@graphql-toolkit/schema-merging":"0.7.5-alpha-90cb687.15+90cb687","@graphql-toolkit/url-loader":"0.7.5-alpha-90cb687.15+90cb687"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-90cb687.15","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-gZclXK26oFSdj8EEyRGn5Gh0eY890MgjkCPIShMLnmeLk1y5bHiqY6rXOl/dWn5xj6Nbn1tpQmVcMnMNp1iVFg==","shasum":"0910cc4a29fd1e0eab715101618446dcde9d7c1a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-90cb687.15.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd89BACRA9TVsSAnZWagAABKcP/17GDj+9F59ie7id5gCu\nNbzIWTWZXphkvjiyawTSc2z4LOKYKdYA6SNm6/Oae8orcOcmXAG3Al0IjKjD\n4HTDFCQv2jPxElVGz8l2/NzXn7xj4xfJeQ20KtVXRsIqtE0/VqFlxlQdDO4q\nO+QdNyCNHsnv4nyTxW7f9j+EKKplYSMb636Ljq3yzMyZ8tsq7vt/kD9A/AUu\nNggmew4VOLR1Q7SshACcT6setvUK8mhJvI9luSzz8d6gYlifWCcW6Nh14oHg\n7d49YoZfMA3WKcx9Vcn1jYp4rdQFyObSLpxrqfTMgfjq8FT79a1xjk6yrhFH\n2BZGFQI+QnN+eXXKgyV6CAUDRU+GraMVoWFpfScfe/jlfI38opJdpKsBVhTV\nYd46AmmB/rd3GMQg9mHhhoZ8IKQItBQPFdxju75xIGMlu5WQ3Jnvoioo+PPn\nC3TQlbDNO/jLi+PxyPa9DX9cXXKJ+/JfrHrB2XYjVyRf7pMQAeJDyHWc+H5M\nA+1HsiiDaHXAdYBWMQMEBmp6v6PjGnzoy/N+ek79xgmxz6ZN5UXaHjGM2J0Y\nsJIFjVjju5QdKYktzghu38RHQO8twM6WbvviKPsylEFPqNVCDLuzBFBAYa2b\nRouU1kJlv7fJHHP0TINV1VEmxr2eno1Y7v68ZB9UiA9rv9twOnjOXJ2QVSA+\n+te5\r\n=n7Yf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgn6WBi7GFKh1lMhMAL0z168pZMvctDPvqpW+8jRdr6wIhAL6TrqJnzBKYBqdC1PF3gzNd4IVZJF5kT0ibkWITnoVE"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-90cb687.15_1576259647738_0.11270678462500783"},"_hasShrinkwrap":false},"0.7.5-alpha-8411807.15":{"name":"graphql-toolkit","version":"0.7.5-alpha-8411807.15","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-8411807.15+8411807","@graphql-toolkit/common":"0.7.5-alpha-8411807.15+8411807","@graphql-toolkit/core":"0.7.5-alpha-8411807.15+8411807","@graphql-toolkit/file-loading":"0.7.5-alpha-8411807.15+8411807","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-8411807.15+8411807","@graphql-toolkit/json-file-loader":"0.7.5-alpha-8411807.15+8411807","@graphql-toolkit/schema-merging":"0.7.5-alpha-8411807.15+8411807","@graphql-toolkit/url-loader":"0.7.5-alpha-8411807.15+8411807"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-8411807.15","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-7V5RKgoS7uIqKvRZbiwsp69JU7LZwnR0QYjOdhXCrsJ5SXXXz/EPO2YbNHY6DSuFtdVIQPjOBPn2Qxez3lA6Gw==","shasum":"c45c93cd8eaabcf6ca420a4479a0c33cc9543cee","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-8411807.15.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd89FXCRA9TVsSAnZWagAAzJMP/jJzTCTQcS/1ArplFCQM\n63nbrRnXE2csgBMscVNOi8LZEQjmGLtYFz/Fj4YJ3xoJGPGC3UX36ogMKe1B\nqEsXb2yhr1jPZfEH7KwrycYfsWMY2/6p+eZiGs5Kyl+g/ZDWQPnEVAk4wmdx\nEliucpw1dHVBNq99XRtULR6R0ONt3Fz5aCSFAF5GDe9zDpiEMW418eape9al\nF/u3mLouv9g4qbbTBb+1CaO+8/WjOapnnk4Dvcj4JtAvMmNtXFenORC1TncN\nWlF/rQ8qY/ts2faGvOsw2LJyjLIkXzgGJVKaXS1O6+Lp5n/bCrO7z/sp30Vc\nSdrCsGprFiG0r/2B9qKMdJIQa2YMtPmHp+L3QTDzaPBLUrVbspeX+BZfXqlg\ngetfGaGq9ucIipjZSeANKZ6UHYUKO+FmC6tP7N+CGVn4Wsewn/vL5OmLRV5u\n9XiR/JdUtbetuMVBWFkAWrKE6aHQufbZQ710Uuipvy4zlt6pfSbjAUEku4qZ\ns0urH/zUC2e6wQcmRcRVJWYMPGr1LhifM60h/nERLD2/J54ZotzqRimpDq33\nT71v5op1kY+RwJvwvapH8p4/C2/JTVtA+efgVstDluMoccENHWH2PqL2kQyK\n9zMVd9FuSvoGb8TTqav2hAMBMZCcfDCiDgHJWoCbe4d16xFAAxTsxbabYc7r\nGXTa\r\n=Newv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTSzYGuTAZcBBYQfpZCjdY+JxZeuNS3HEVIhHeeG7hmQIgXzBJfLz+upBsVihwBjZHGluXqwyvOPrJTdv9l6Sj2/s="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-8411807.15_1576259926906_0.49436913099189317"},"_hasShrinkwrap":false},"0.7.5-alpha-3d322e7.16":{"name":"graphql-toolkit","version":"0.7.5-alpha-3d322e7.16","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-3d322e7.16+3d322e7","@graphql-toolkit/common":"0.7.5-alpha-3d322e7.16+3d322e7","@graphql-toolkit/core":"0.7.5-alpha-3d322e7.16+3d322e7","@graphql-toolkit/file-loading":"0.7.5-alpha-3d322e7.16+3d322e7","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-3d322e7.16+3d322e7","@graphql-toolkit/json-file-loader":"0.7.5-alpha-3d322e7.16+3d322e7","@graphql-toolkit/schema-merging":"0.7.5-alpha-3d322e7.16+3d322e7","@graphql-toolkit/url-loader":"0.7.5-alpha-3d322e7.16+3d322e7"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-3d322e7.16","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-wBDUtpxqaLAZN0jKt5gXterlMhgJ6+U+TtA8dWeg9srqf17mRobFnWPsAiDbI7lcLgbt6+y29kOmKMVlHVTemg==","shasum":"b77cc7a693baddf4585876583bfee6435f6664ec","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-3d322e7.16.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8+6UCRA9TVsSAnZWagAAmjoQAJq1a2dOfTlDH29Hn4+s\n0YCVrQ5fDF4h0sov8eG2c0vdXtJ6WdGeo7vKA3ht+pUhjGi9v+vzuOtZEa4T\nE/Nkrue3sp6tjvSwXUPxv9KGVwfUzz/uicyIiurdDMxfbWXz3+nGkfUPKUtW\nZp277ITNyclQpV3io7JXfeur1aJ9v7QmWd9Xs+tfMBwL4c3nTpNorPfv3YM4\nexgWQYGmU25uc3UpuwIWfMPSYoqgmuZyoIcifrPY+I5fNw2K5tX7+A/tBvwB\nQCFpU6F4rKDEpJS7uZEzZBwgDuJ5u3zMSRQ2BPFw8sFOBwt1VKpPtPEuYtiG\nEPnDl3F21gpe382NsAQHQZgp4cJ5KWrsQ7BOouXtMGK0stUfwFdPHannJXKb\nytjaC6/4jmjh7c5+QgBP96wEkNDScajEu9EaYKB61pAbvhWwI5GFdLwQWRPx\n+0eTlsvcT/r50ojBUW5pWngFhCYzfEUK3o+PuLo8eEz3mxdGg7BDdO9cktEF\nPs0pWbIXEKs8TxTKC9GPqZbMCKfRwgy8oypTdCbbNz2vcdxh3eH46ISSJtBf\nqKgfg4Ch+M1AASoTES24zVZb31uoqSd1Ci0ifUTox7b5VnoFUqrKp+Hyu0d1\nVF3e8kiXiP4Vr210Ztb58ssoFOnMDmreXGSf1lmrejMfd52j0/8JnqqM2DwD\nSirU\r\n=nS7d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGe4mU70MypuN++2CDgGULzC9HtqQAf+ejD3Tqd7niWZAiBU4TXpPYv5yfui1TWUFtN6k4W9lQfBbtDntD7SC7jwXA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-3d322e7.16_1576267412204_0.9827243385685787"},"_hasShrinkwrap":false},"0.7.5-alpha-7c824f1.16":{"name":"graphql-toolkit","version":"0.7.5-alpha-7c824f1.16","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-7c824f1.16+7c824f1","@graphql-toolkit/common":"0.7.5-alpha-7c824f1.16+7c824f1","@graphql-toolkit/core":"0.7.5-alpha-7c824f1.16+7c824f1","@graphql-toolkit/file-loading":"0.7.5-alpha-7c824f1.16+7c824f1","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-7c824f1.16+7c824f1","@graphql-toolkit/json-file-loader":"0.7.5-alpha-7c824f1.16+7c824f1","@graphql-toolkit/schema-merging":"0.7.5-alpha-7c824f1.16+7c824f1","@graphql-toolkit/url-loader":"0.7.5-alpha-7c824f1.16+7c824f1"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-7c824f1.16","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-xBopes22CkdFCPTQLyaaqm92VrzjxFBed8PzZE3LJXquIQ1xFfdK7ab/vkifrhu9OIExD4OPfYROBDSDfamwBg==","shasum":"be20dd108b8b45b740f2a49025893f8c43af6494","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-7c824f1.16.tgz","fileCount":5,"unpackedSize":7284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8+/ECRA9TVsSAnZWagAAp+QP/iAQ0Rh2qp557rVzueyR\n/gBD1YkgHCrOtgcmT0jEt39Lpx7sIBvRw5i5j6v+0Mdtd+KEBY18q4GCjE0Q\nYkdm8Zz5MHZgLhOPB54Kn/VmgYml0okADb8WSg2eGOgqPWDsUm2aZKOYwKON\nOqco06D7dTcycztW09LHwb+u6KUfInu9LTd+hYAYeorzke2xr/QyFBQfP4Mm\nCrC/2RX76C9bEhGsOzQ9lJxdQiZePamPcSzzFGZZEMPwBfUXd6V6PD+o9nLU\nDCd7fzrSyqS0ttVYb4QCXgJIR+CgZUE0h9grNzXv+kwFNn13Aot+8uzDjD7x\n+Vipij2SMehWIrWrCy+JQi6GmeHMy9EyOgwq4omhkmLupY9CXiCAY+Kj5lHD\n7M/0oOi41CygyEDEzD35SYvZa26mVFLpyAUVf/rzIEP7uKBYKm++y7i89wJY\ntDElxdLtm0GxyBzO/goBJ6TWxUgoW9zpHyTPj7MvHl1UfVwCahvCr24sDM2q\npq+MxMUPxQhZXC5c8jWNDVg9IJePNfSCTQX/wQl2E5qRBdr+VuiU0nRPWh3Z\nUu8yyAtlymNFvwI6d0h1bQYJNDxT8WSB9fSNFLyVZV7zlbfSrRbuFQvycscB\nwrr+XfH89fUFL/moS70rbWGtpjFnREDMh2eZXD6nbz2ULRjPVRYpG4PxUvVx\nR0ME\r\n=ncSp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkQQ6zPberGQ+Y94MiSCg0Nfv1aw2d170qO6kqW8noiAIhAOe5Tw3VKeW19lGdUw5Xd+f1BmfjxCD1f+KpAlbIr1+u"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-7c824f1.16_1576267716250_0.17931001571242122"},"_hasShrinkwrap":false},"0.7.5-alpha-eaeaf2a.17":{"name":"graphql-toolkit","version":"0.7.5-alpha-eaeaf2a.17","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-eaeaf2a.17+eaeaf2a","@graphql-toolkit/common":"0.7.5-alpha-eaeaf2a.17+eaeaf2a","@graphql-toolkit/core":"0.7.5-alpha-eaeaf2a.17+eaeaf2a","@graphql-toolkit/file-loading":"0.7.5-alpha-eaeaf2a.17+eaeaf2a","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-eaeaf2a.17+eaeaf2a","@graphql-toolkit/json-file-loader":"0.7.5-alpha-eaeaf2a.17+eaeaf2a","@graphql-toolkit/schema-merging":"0.7.5-alpha-eaeaf2a.17+eaeaf2a","@graphql-toolkit/url-loader":"0.7.5-alpha-eaeaf2a.17+eaeaf2a"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-eaeaf2a.17","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-0u/vVivNj9/jKFFrqDgJ1gAe5WY5pUU5+RXrGTnkk4oENgkFoRYPs43wFZ0v/tpc9psSNBXyIZoNbQEDdvJU6Q==","shasum":"bba2beb76905995444c44da0d98d2e32f48f058b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-eaeaf2a.17.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd90IXCRA9TVsSAnZWagAAwwEP/1MjvKP3WG331eVZrb6l\ngK5CcQGk3qjb3JH7IFrjwrjXrElGaT5bOmxwUqC6CHsgnESXYoYC1HmOUGEf\nxgsL6BhlPt7nTavm4VrIWI3/w5UeJC7kX0LlW9x8nSruND7mYccXtK8nqnuW\nZ8cKkA1qv+DXut11RJlqT9kD6IE+DOCZIaIB8a6nSkLhEtGgLiB1qXxkQBzz\nkhXp4ntLUaFWeKTdsHE5ITgydoiSzJDvufFf5eOd94AlJQeWryxiER2DeojD\nbhx/1gbu0Go6GgqrKqe9jzoSD5N2lDv5x7yZPPM0Vp4HfUAeDoMWgRyk8PVY\nV2CXEfh/YTw6YxfeIuHuCmH1v7BT4VrV6DubW12N50U2anyWmJ5cT46tk7S8\nfn1+dMntp88RehveE6JV8pi9zJsETVdx2Yw5MNj7+Nhf0gGeoWZ8qPWxKF0t\nziJdJsRF2YcP0DuO/Lwmq6um8YwKqxT4UN0E5qbEFwvaV6g+poTkAT6sTGfg\nP6gwGEEIJAkakqdI4k4Cm9DUDWcquxwY3vVzdJWu+YCIsL+S/eLgx1Gx8Wly\nCGvP2bPNSpmU6GorMColMJR/8ICiI/9yw58BaWq8y5xT9njMLlmLHmf5xKuz\noCv5h1FDOjNEI1H7EnymoYk/VidFPFe8bDfOXy2DSLYxAXetNJUBWTRtqLBX\nUHCF\r\n=no+M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAgR+mQq/5n53gEqcMmmxqWDA6uCaheabmHhNQlbYSaTAiEA6+wNGiwI3uRCrPq6E2eZhe3vCMxEmT9NWKyTwGZo8YE="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-eaeaf2a.17_1576485399233_0.8896324148865646"},"_hasShrinkwrap":false},"0.7.5-alpha-9251960.17":{"name":"graphql-toolkit","version":"0.7.5-alpha-9251960.17","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-9251960.17+9251960","@graphql-toolkit/common":"0.7.5-alpha-9251960.17+9251960","@graphql-toolkit/core":"0.7.5-alpha-9251960.17+9251960","@graphql-toolkit/file-loading":"0.7.5-alpha-9251960.17+9251960","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-9251960.17+9251960","@graphql-toolkit/json-file-loader":"0.7.5-alpha-9251960.17+9251960","@graphql-toolkit/schema-merging":"0.7.5-alpha-9251960.17+9251960","@graphql-toolkit/url-loader":"0.7.5-alpha-9251960.17+9251960"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-9251960.17","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-Zl2PlC/Rlk7lhFHZrp6VOYQPJCzUa1g9FZM3a3Ycy3SCmblGyQpHrGULOxnf+TQD/qRlxSs+/pVhE4UzpyXaDQ==","shasum":"d192a428def93853fd515bba59cbe3a9ce266f9f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-9251960.17.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd90MICRA9TVsSAnZWagAAEOIP/2iEnGf2w3ZBP4Jt1gdI\n6TE/JodxJX7jaMYZw2qv9+2sVCj/1PLok4xoGJYVCuxpo1Kvg8axWf8vLSed\nFfdwMFPDNBrzlxpdXCVL8+ZqR4fJbHxfLZKh7jv+SPWPpViSj6iqIUVsfXt2\nc1PylbyeBM5rVYl5rDGhxUwzRhWhrCUq1bQj0wei4bykNFNrLsn81OLpQNSk\nOwyvwGcAkP75Qxd6LLYI/fGiSJHzXNguPs9nJwa0Nb8JpeIQnA5vU2KI1oQJ\nON9Yur47n2NCvznklgk+7OWwzEzA4adwBbsImgmIcfTNWxLNCOZ3UKGRESGG\nQodqQpy26mDJusZUYxyMbBBRCvhjfnz3t7V59upKFIXiRGykX+V/yPGM2Kx1\nsVQRJZyitGMr7w9iS0KBRsC5Lzkv62L3RQfoRye4k8zH5b1mpduWeoT0Pssd\nRikOVaGrUf2ceznLbrQwg4zylmcqn12vdu3pN5I/i/WXEkicHZTVsi68qPco\nhcQWtKHIt5MtSK9FMYeK2JWwk7dJ/DWGsEqeKSXftAyHG7NucXYwgol9Qgfd\nC61r69Oc21wr7O1HYRoZkX8+znv+UQP+1BdqJAXLcdTERCYx6iBJiD7/SDHl\nzCmpr4shPfTfo4zF1wkiIaz9KHay6Xf4ITbuxhwrErC6oVXuZZG91+MIT/m7\nnUoU\r\n=cyVZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsu+Qo+MugQp1o9j67w6wjdDcsBDk4dSiJ5meM1lF0fAiEAqClF/3qnvThfmLrad52T1j36/Sy3VINV/gn5Xd0L7qM="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-9251960.17_1576485640255_0.9363096599380976"},"_hasShrinkwrap":false},"0.7.5-alpha-f41d3e8.18":{"name":"graphql-toolkit","version":"0.7.5-alpha-f41d3e8.18","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-f41d3e8.18+f41d3e8","@graphql-toolkit/common":"0.7.5-alpha-f41d3e8.18+f41d3e8","@graphql-toolkit/core":"0.7.5-alpha-f41d3e8.18+f41d3e8","@graphql-toolkit/file-loading":"0.7.5-alpha-f41d3e8.18+f41d3e8","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-f41d3e8.18+f41d3e8","@graphql-toolkit/json-file-loader":"0.7.5-alpha-f41d3e8.18+f41d3e8","@graphql-toolkit/schema-merging":"0.7.5-alpha-f41d3e8.18+f41d3e8","@graphql-toolkit/url-loader":"0.7.5-alpha-f41d3e8.18+f41d3e8"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-f41d3e8.18","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-mBzuQAZXhDcX6o9ub+toMGwXbYoo6Ztd1l+krjon5L1XAv6tktJieiZ/FiZm9x/zSUCul+n/Z+GTtttE9e+o+g==","shasum":"b06e0c614b48335aa84fffd04bfba9a01aad31e1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-f41d3e8.18.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd93joCRA9TVsSAnZWagAAbL8P/2KNYOWHQ5Q1XtiN8tEL\nME4+ilcUH73xnIHtg/40/VugNwxc7mvKwgxCZaJFt7LonsN0+2zNugdK7fx2\nFyT3TsICCV0iGXTIyo0ptdGK2jSR7Npirr3XeW8x15kAG6twwYAWejy8I4TG\nXV7kCoPK7Y0HycYfx3h7eEF9HQ/a8OOQPH63NZ+0Dr+/Dcn+A+n2hZTD5rrd\ntI2f/g1Vk8pr8muia/St/b5R3bIlyAzOgYSeEDJ4JcjqbgE9ILGbdZhxLWDj\ngpeKH9GIvptRhiP6U390LDlJYHEt/fIzRVCCwUkdyPkU3Qgtb6G1BVnBYsnr\njizXoD7GWRro75X89dwwjI0JH/sy7wrnfXlix1HGYNSCoSUHrEP2Owt75JyK\nS3qQTxCKzrSy28WYSb7xpKOD73xpvYFFYsWRSw/FhW4SR6r/pLud73ulJ2SM\nK//eagr7A2kmnhBS/0CRgxUK0Hb/zZObt9OnDbRIzgb/9cBSVVD1yuaMLBiw\nQ5bXtyHtSG17jAi9xzuyYW+Eh1viAKgw+Qb2Pou7/1JEmsVHbqAbgzxihlkH\nyH8GhqvEKZ3zYaMEXpmgWSKC3UuWoWAUNJhUuAdQyGY+nI1rJp7UQsl2D/G9\nxdxqnKWnRpfIpziJSAoZN/L+XSExJF/XFHwcT5WVEZsSTqNdWSqVhj/nE64C\nDiVi\r\n=lX7i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICRV+2+2qoa6bnm9Tgcqvqyt9OwPKBZBn20z+a0QCpzxAiEAjCHW6nnzFW6BcQ100NE4OoZHnvGqenId2sySxcAaYpc="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-f41d3e8.18_1576499431626_0.6190251138785172"},"_hasShrinkwrap":false},"0.7.5-alpha-e38d24f.18":{"name":"graphql-toolkit","version":"0.7.5-alpha-e38d24f.18","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-e38d24f.18+e38d24f","@graphql-toolkit/common":"0.7.5-alpha-e38d24f.18+e38d24f","@graphql-toolkit/core":"0.7.5-alpha-e38d24f.18+e38d24f","@graphql-toolkit/file-loading":"0.7.5-alpha-e38d24f.18+e38d24f","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-e38d24f.18+e38d24f","@graphql-toolkit/json-file-loader":"0.7.5-alpha-e38d24f.18+e38d24f","@graphql-toolkit/schema-merging":"0.7.5-alpha-e38d24f.18+e38d24f","@graphql-toolkit/url-loader":"0.7.5-alpha-e38d24f.18+e38d24f"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-e38d24f.18","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-2SEMkdQS1pkWPtoq3peII/qPduYfRqKroihj6BzpfSnG+D0BDSDNBDk24ekwShxEr/6xhiOSt8Vy8ew9llOWcA==","shasum":"e39e1a32ee24c118d969d987b27830121f7f4b15","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-e38d24f.18.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd93vkCRA9TVsSAnZWagAAFaIQAJss3CLSaE8EYc8INUvM\nbMdoX2O2Aibc+CnK1hddY03af1v2HyEsmgroTwh3757RL1FfAoPeDdtQUPHO\nYsmv5bQPsLOmKp0VocBqNiF53+aRmngGGBVozK+t0HXI91wmTrXFfQBEtos3\niUnQ5HZ0/iNfRuAD3m6hOMxhqcg88MDRUFNQtOkR8tJnO/PmjpP929OjcMQ7\nX8uJhm+Kj1VsypVSgVtBnxhb5GSMhbf02B3HWQB4NDyUwuQITzeyk6t+NP89\nwx+KArAj4ute0Mj61x2v2xAlZxanTmi7u2SzYmZl8QQmS1N3qUqQJGSsu5hU\nF9t8NU0hWi1Qe5gzBMk3n/8GtsXn5E6AJec4JxtqXewJkre7nFdlI7rRoIwI\ncBLWY95oMjCMtJYL8Ax5Z2RBgLkq3hyQoC7PA9RusmQ9SJqMZ3Am4tRWmJBo\naPP+fEwag+FlX3H1Us3AwGqs3HmmZctwsgyoNIeJF8HVcgvPFNJHDPZjbP0u\nLzFN/L9tk9JGwOTBxjPpkczQLTbDWLNKDyhEvv19mwJmqFZemn8ym3LJFlKs\nEldA7t3INuU5M7wqamW7mvkCWLcwZpebPpKGCvYkZGeFfPtMvq3x+UuN1S/4\nWUcw6VboGswZP813CbvaqcvFjh77HZ9fsUNGb+jqSuDy6UOz9escSkYS7Doj\nSGOM\r\n=pDcE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoLUPAEVwO0c17k/RdgyhXe+suDDGL9ds7Ow6MAt6Q4wIhAI1Pd20nfktXqj/eCveqh+UtCs9mXclY0x72NQFUllsM"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-e38d24f.18_1576500196369_0.21757165750763963"},"_hasShrinkwrap":false},"0.7.5-alpha-bb4a86f.19":{"name":"graphql-toolkit","version":"0.7.5-alpha-bb4a86f.19","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-bb4a86f.19+bb4a86f","@graphql-toolkit/common":"0.7.5-alpha-bb4a86f.19+bb4a86f","@graphql-toolkit/core":"0.7.5-alpha-bb4a86f.19+bb4a86f","@graphql-toolkit/file-loading":"0.7.5-alpha-bb4a86f.19+bb4a86f","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-bb4a86f.19+bb4a86f","@graphql-toolkit/json-file-loader":"0.7.5-alpha-bb4a86f.19+bb4a86f","@graphql-toolkit/schema-merging":"0.7.5-alpha-bb4a86f.19+bb4a86f","@graphql-toolkit/url-loader":"0.7.5-alpha-bb4a86f.19+bb4a86f"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-bb4a86f.19","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-la2B5sHnkOA+9tiYr7Oq4nWdj21gVydMgEPFn8AsowGvYHuA7Muku0S4/6oIyqS5z+FSUoJUxez3eIeC0eAsqg==","shasum":"44260d3e40c030f86013c30cfa0e3ba574e3cac7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-bb4a86f.19.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+OJbCRA9TVsSAnZWagAAADkQAJ1S4qiCt4N7v1AuzNIQ\nKNWMI2cvBV3pxY1frfoPnnn0BKVtqujH9CZUqb9+EL1I6g5+8cEIgNbrRsg8\nVxctHTufenKr6tnN5WlcacHmJPJvpqNmSl2OAPlYh1myGp9EGUWimMte4wbI\n/l4wXElNDUgQ5T3VAQqcGB1wgguCk1SyFywegGuFKnWkaHE/pJ63+p2q4ydv\nWZRtLsFEj0L+E65WRPk4KeotbqE5CDTwTZOFCV0w5X3Ablu/kFkLmfQH652S\nf9639NpannLGo7qDjlNZ3ZnPr7G/DsrQ+W0EjiNcdDmLaEqwHnLNrOOXY6++\nP1fXHTkYeyHVMi2yixOG3WVSRjZ12sH5GHLiCxEw79FTMUAFLGzfUr0SZj16\nHtWJdt4vYeaLqS1MbLOO8EeAwiWUN7KN1Wddyx4QPeyZbNj8+d/EGfF/6Cjb\nnkaO5HK2IBnW58epJuIYoshBjYC0zcJ1c17zeFZt8jZIVnGOBCOSzL2+cbsM\ny1LGQG8XpFuTG3lL3kSy4/8VsGXJ78Iui1DaIUQ1bTnEPnPHJq4HM4UWyS0H\nmwiixxqETPxwcTelCVhV3ORMxiCxws7XSHbLf6+8fBQStSSBPDd+U0q6ygYw\ng6nQ9wpTyEZKltP+HCcANYKC+leQqCO+FsIK9YdlMFXNqe64HYFueGBWusg2\njRly\r\n=taGn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDGFBwsLmnbS9VhDlmM0/yy7s6FHWB/9nH0sBM/GpqVnAiBJQd6HFRfSi45TW9d1EG7bdBjW0y2yCe1EI9dn/MNbdA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-bb4a86f.19_1576591962923_0.6397222798050628"},"_hasShrinkwrap":false},"0.7.5-alpha-cefe0ea.19":{"name":"graphql-toolkit","version":"0.7.5-alpha-cefe0ea.19","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-cefe0ea.19+cefe0ea","@graphql-toolkit/common":"0.7.5-alpha-cefe0ea.19+cefe0ea","@graphql-toolkit/core":"0.7.5-alpha-cefe0ea.19+cefe0ea","@graphql-toolkit/file-loading":"0.7.5-alpha-cefe0ea.19+cefe0ea","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-cefe0ea.19+cefe0ea","@graphql-toolkit/json-file-loader":"0.7.5-alpha-cefe0ea.19+cefe0ea","@graphql-toolkit/schema-merging":"0.7.5-alpha-cefe0ea.19+cefe0ea","@graphql-toolkit/url-loader":"0.7.5-alpha-cefe0ea.19+cefe0ea"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-cefe0ea.19","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-k4dKhIYd27hBYNGo+PeNpN8h7vWbzxPYVCFarq0r7+qp5YLF6bgjf0k+IsWP8/V3RsJ97zm3w1CfTjtv8prmkg==","shasum":"b82ddb74f0c90d4a212aa31155f968ed8386d1d6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-cefe0ea.19.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+OJzCRA9TVsSAnZWagAAebIQAJr5DyE0I/5ttEKoOfqb\nUYwbN9VrzvLZ9E75j0uUQf5rw5Rl1Cw59Tea64m6i//pw/gMlA+DEi+1RAiG\nKGteyyGWM6NAYy49LVzmaxr9en5PtulD7hu1BAMBummTQQOVLCsbYMT3Z29n\nevZ+T5RD5CtkebubzNVpkT4BW/sCnl70joKB2SjDprlD3Cx0f/XoBTycIC9O\n+wObDllmsDOnQl3rtKu9sJCuPyKqdfqMolNttYZ3KNdBUb5xHipyHbD9VrGg\nypMGc8pBNj7i5zYhezsebaK1Rn8jcQz09gft6vGmSsKfOpGSj+zBrTnISnHD\ni0xm1vri9+fhdnDGPtaEswdUS1z3WCTq73weDF+avpBKMBU5KKrGwC1vmOnl\nTbwqRp0reBtFOFPNUtVZJQsnBcin08AiHXQ0TWiPKrm6tqLPO6ULkW0uQL+g\nEIWY5jGqg4c03iqHBWNibb650x1W2to6eSyoBoiy2hf52GJpG7jt25yMUT5D\n9SrRcngslN4DXC3XP6I9AXIn1aV/fIKr5nxAXQ4ehRJ33oXRPnY7SX/k8ujT\nec92CGAQwuLUMWIcJKJa1X0fs54NcEuDSTVSNLhI/Qf9H0IzQDskvfVrFqXZ\nEi5vpwdsFUSbsiV2uEdA2WJT8a2SYDvibF8Sv/H5D8yn0SFHJT0HR0Rk9Xva\nXzuP\r\n=3wIX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsc3XmCy6byjtLgwi8WhRu9uvxxlOZq3jlr4efr2cJqwIhANd26LIvptE/HGeJ3XfXzPCyggFy130+c87zB5G9Ut34"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-cefe0ea.19_1576591986840_0.6898818519763577"},"_hasShrinkwrap":false},"0.7.5-alpha-bd20853.19":{"name":"graphql-toolkit","version":"0.7.5-alpha-bd20853.19","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-bd20853.19+bd20853","@graphql-toolkit/common":"0.7.5-alpha-bd20853.19+bd20853","@graphql-toolkit/core":"0.7.5-alpha-bd20853.19+bd20853","@graphql-toolkit/file-loading":"0.7.5-alpha-bd20853.19+bd20853","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-bd20853.19+bd20853","@graphql-toolkit/json-file-loader":"0.7.5-alpha-bd20853.19+bd20853","@graphql-toolkit/schema-merging":"0.7.5-alpha-bd20853.19+bd20853","@graphql-toolkit/url-loader":"0.7.5-alpha-bd20853.19+bd20853"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-bd20853.19","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-+CHcuiTVMM5QfXdoDnBFKmv02ano82fk7XnTWOZnWcXwos5r1/G8PrfXmrMrYWuW0K4/6vWGFfD3runZaNi7zg==","shasum":"353b173da7b20957b22252148db44be559ba13a0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-bd20853.19.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+OZrCRA9TVsSAnZWagAA4BYQAI1VQzN3AmeI8xkuett9\n2u2lO8hdPxmR0JTh0ZaCbJH2DyWTPhaWF5WXT+CQ3M7PIwD9Oetn7XkecxPD\nU65Ny7ndcEzid0Z8baMDNZZqw48CyA9I+KBSKf61rdKP2ivH58+NVVvSQnqB\nOde6m3H3Z0XolFw2a82g5fBdLixOKwrt271yDYe38oqAepqTFhFK1u5nDJLz\nx0G5TV6Bp3VvPgiMDn8QCMIkUHbvnBUBESnqK+wH3A3huBihj3C3sXfhzF4b\nH2ZArkCazyTPPCDfxnsJ+YXpT770pPN5iZIAhFzeWCBhaehcFF8O9PTd6shT\n9DXmNsr4u0/55khXRRFqiNojIfCjkALMzn3anmxgF97rcxKvMKeqbDEJg8Pp\n9zvA7iPqIzTmVQKsstrNtLbVdZEH+Jq6sqzHDSNZA6tNhfOFNoqXb772R374\nYgb8iMFi9G6TpDBSqPZMQg2UUWlUyGuTi28y94DwfZE2mJYkRn8Q1MRciiyG\nBj2afYL2e7NuxQwbipgM6+xT97i1egK/yO11wK71srNno8XSJhV5w7nUday5\n98FTwXtFaCe7jgP7t1z1MBH8iH+o3XTwwBSdh9fA7cC5TI4iv01Vf7j358fS\nZfv4dMqJLDq5NanU1VvQ6vGmZkFubrdEy6kYxkA4xvqWyBZATR8KtwLO4cWK\n14Hn\r\n=E/FW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHo+2eSmagWF2KyX1bBjXnRxh/nHnB4IrCtK3NFDuSHQIhAPi+Sv/XPd5zpMBAo8VICi6iTvYBFUi1Ammk3vt0W14y"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-bd20853.19_1576593003308_0.7949083777144019"},"_hasShrinkwrap":false},"0.7.5-alpha-760e204.20":{"name":"graphql-toolkit","version":"0.7.5-alpha-760e204.20","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-760e204.20+760e204","@graphql-toolkit/common":"0.7.5-alpha-760e204.20+760e204","@graphql-toolkit/core":"0.7.5-alpha-760e204.20+760e204","@graphql-toolkit/file-loading":"0.7.5-alpha-760e204.20+760e204","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-760e204.20+760e204","@graphql-toolkit/json-file-loader":"0.7.5-alpha-760e204.20+760e204","@graphql-toolkit/schema-merging":"0.7.5-alpha-760e204.20+760e204","@graphql-toolkit/url-loader":"0.7.5-alpha-760e204.20+760e204"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-760e204.20","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-SgKHXIlYR9ynHGqf444mXJvu4ciTpR1cXc+NTINSxGClsix7FmczE0xjs5/Th3mSmvOt/s57PzTTK6oTHPwdwg==","shasum":"2d4944da05f751c5a07f9be2268ce4a1f05e8fad","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-760e204.20.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+Oe+CRA9TVsSAnZWagAACV4P/RQosXjD1BkILoZy8lqY\ntcMhntDj0j3wf1IApugB/jdV8BJtwXBd+qIUpt4VsG0IBCB+N3xhSdUXfcgr\nmRNfWPvIq2QIKIsOx4c1dql227w/xkDICbA7HMkjuwuQIaHZ1eFUj8Oh76kx\nppH2Z/0x53nCPy58lpilBldRXldtsfETyc69Hd8i8smObzB4lOYyx1GCmaD/\nIBo17ftVl2Vdj3QN2bhMLhVy90CB7d4Mm5BLxFTC63YVdk2Eeh+Yp7DHppLL\nYnOrxsTv/pGdkNgRYgbrgi2QiQdfooBu9c1OnP0dWMAAhwBefY/9p1i9WX1x\n4U0DPaPvt2ENYGCgYxC3YJPvNSc2z52D6apUIlv8NqMkWhqmzKdP9PExWfYV\nfMRmFE5d9uW2ks6VCY7/8OPhoH/14QM4NCGLQXv5TXhDp5bYT1gCM/p6iQhj\noUOPQyn/dm6VUxQmEXlMJZ98pNioLbbpyAyyYaXMbSG3l3CRwoyZw0L7SwsM\nCuP0bG4ZWNT+Ez+ejK+tJigz1OSjZ3gLb5UAkHV6YvhtzLv0CV/n6sa6VQ54\nRjLa/aHFlLiKUzRHLZV/kdjKPFH2ia9d7lbErcGwF5iOVicl4ts90mR+8jYX\nkbiV80zCbee/yB8ua6ce70M3DTgwc6TrlPWPf1Ln5RwgzMUF2BCB4Vxfia4J\n979P\r\n=DNZS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICVMkcTlRikoUMW6XiPeWsHDzjHhuaCjqQ8WCWiMSZapAiAY9pq7XfrXTcnXfFaJyQpMnH5GS+1BgqKO32kaUq5qPg=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-760e204.20_1576593341825_0.7187938200751434"},"_hasShrinkwrap":false},"0.7.5-alpha-4f961c3.21":{"name":"graphql-toolkit","version":"0.7.5-alpha-4f961c3.21","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-4f961c3.21+4f961c3","@graphql-toolkit/common":"0.7.5-alpha-4f961c3.21+4f961c3","@graphql-toolkit/core":"0.7.5-alpha-4f961c3.21+4f961c3","@graphql-toolkit/file-loading":"0.7.5-alpha-4f961c3.21+4f961c3","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-4f961c3.21+4f961c3","@graphql-toolkit/json-file-loader":"0.7.5-alpha-4f961c3.21+4f961c3","@graphql-toolkit/schema-merging":"0.7.5-alpha-4f961c3.21+4f961c3","@graphql-toolkit/url-loader":"0.7.5-alpha-4f961c3.21+4f961c3"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-4f961c3.21","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-CxG5+0lh4dwkdK7577PSg8bCqAjKbjtCDJsFKGZdeUupMnEWZRMwnapvaPbhJ8X7hMt4wYJLB0xeCIfLE4DNvQ==","shasum":"f1fe6b637b4a12ab0fde6ef55b9f0f10193bdb41","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-4f961c3.21.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+RxACRA9TVsSAnZWagAAjx8QAJJnrAsuXlz4wMmGAs5s\nGCBNGonFg/YDmZlMuSPwGi9XT9vaenGwP9JvirRyelrvPrAOdoIaCdnWLz6R\nTreX2gpwkK4tuvTqu9FBMWPk6A+x5RJoQ5RTq/ZlBtf6ribhSvhMWpY/e6d8\nuE7pglOTif/7jqiaobUtM0MdnRQgzt5mkCUPox8tmnzYExsaXblu7oRScCv7\nCWyw/EXqsA/KBzmSyCh6sVM4JdyxRoofphulMnMuB7nivUeDyDvGYNrs4dGV\noRp3O4T/X5nKbxu0axlgoN7joRL6slNac8p7upwyh/Vz6TS2/0Pn+kwutyYG\nvj/JO8ID6O2XrRlDYe0KmTnyCMenoaxsgSJLVXNAU7tztdQzqOCGa9J4SqsP\nXNMILULO9x/ehns9nwqq74o6HGg7b/gKjhfV74DurmOPfuoew7+w+wlke7Md\nn4TksJqweRACHgBjXwKwnwvG+bABep1F9SYGmu2bY3clI8RTHbGrx35p9HAp\n0ymTqTE/U/Gyd5QwSE6Om5dTFWkGRwaToysJfG5riykS+yjlGEU09xyDOMQo\njgJgj+UUqNXXCrR9UBZS89nefFEsOX4KNgVBjJRTwHilpiDVZbs9OyWWzF+s\njmpYgd4OX3+8wKSw+4fKf1H58IBNA+p3v3ERiGJLyzcLOkmZmjLEhZUDJ6Qi\nW5Nr\r\n=LfT7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuWqoH0pz9v7iSaldWSRXwSDucRrxG4BxxqQsl8iPlCwIgDGKqfor9ggVheZuWUn7faQkZex+fAfCbRkzTsHsNQVw="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-4f961c3.21_1576606783920_0.4356387584971142"},"_hasShrinkwrap":false},"0.7.5-alpha-3228ddd.21":{"name":"graphql-toolkit","version":"0.7.5-alpha-3228ddd.21","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-3228ddd.21+3228ddd","@graphql-toolkit/common":"0.7.5-alpha-3228ddd.21+3228ddd","@graphql-toolkit/core":"0.7.5-alpha-3228ddd.21+3228ddd","@graphql-toolkit/file-loading":"0.7.5-alpha-3228ddd.21+3228ddd","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-3228ddd.21+3228ddd","@graphql-toolkit/json-file-loader":"0.7.5-alpha-3228ddd.21+3228ddd","@graphql-toolkit/schema-merging":"0.7.5-alpha-3228ddd.21+3228ddd","@graphql-toolkit/url-loader":"0.7.5-alpha-3228ddd.21+3228ddd"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-3228ddd.21","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-eKY+qFYV3vRYxMpH1jm/TBjOMUbj7V3Y1xIxyzhdgn2Snl6+1c72CaOZQMjsXT3pmd3J9czNRWVO4y1xzfo+4Q==","shasum":"af1b8b6b100dfef37c9ff1077277c33d637f7971","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-3228ddd.21.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+RxVCRA9TVsSAnZWagAAQ/oQAIDkKZozCfJNajwA7RUS\nFlknbHKt8kfXxF8pF/RUhOtG+owzu4ZuIwM4kPZ2+5OLr8h+4uEvQx+IssqE\nLA538F/WIhnUucuz8wyvi1GuSa4mNN8Aq5RqsZap3Sz5wzENNYlXqLzPVTin\nYasB4oABBEMk3i1vLywMLdM/iPxUyRTdTfe7hkbQo7d1GRvZmrZ1Sv1VJgiW\nRXVf6Vi+wRR65qtr9FXnbb2l/McCcvKdF/Ofon3CUPh0CGqQAUhMpyxK4+ib\n4ecGurG7hDZKvdc22jPiR3MhpKWxATe9+cNA9ttAhD0fjP0Q16eEydndRycC\nGnQCN6Pvu/+0nzATcPc432Dkh36Fhq0ifYadchNxN5uEqXC7AF4JabKxALq1\nvJ6zIxS/MsVmTbUZhxRms/Y0fxxnHdXiofHjnCpNx75s8ch5pl+L1mPTZiii\n841pLrnB2hLDri4DAoi9pSWz5+cLImExeEl05K8z4z2oihtpyDP8ufW0/TNU\nn0C7BxFKe2BRdObf0sXPCl5AS2Z59Mgktz5Gd1X4CP7CMN6CxKQL0VY90QPQ\nl/tMlq7iaalOkF3ASjHso6q2Fl3BEzAdJX9YARugYn5eixQTcVb6lc+Xy3I0\npqqiOFPw/lv9aNovjnNmZXathZ4zWGyTw50vJ1zUDT7J3tNi8HWsbNfEBhD2\nL7x4\r\n=3npx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuEz5ewhL+1Fg6hMyCHrs2yUW2l4pn6FEsRiUzLPT0RgIgfJoSd7Ij66m/Wa5518FLKKBJNMxmoFBo8soOs2gZeFI="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-3228ddd.21_1576606804440_0.5790950547869356"},"_hasShrinkwrap":false},"0.7.5-alpha-82e33fe.21":{"name":"graphql-toolkit","version":"0.7.5-alpha-82e33fe.21","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-82e33fe.21+82e33fe","@graphql-toolkit/common":"0.7.5-alpha-82e33fe.21+82e33fe","@graphql-toolkit/core":"0.7.5-alpha-82e33fe.21+82e33fe","@graphql-toolkit/file-loading":"0.7.5-alpha-82e33fe.21+82e33fe","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-82e33fe.21+82e33fe","@graphql-toolkit/json-file-loader":"0.7.5-alpha-82e33fe.21+82e33fe","@graphql-toolkit/schema-merging":"0.7.5-alpha-82e33fe.21+82e33fe","@graphql-toolkit/url-loader":"0.7.5-alpha-82e33fe.21+82e33fe"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-82e33fe.21","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-D31TBiYbTHoLGPbMD8+ROOjqWXW+ws5lv1GWm+xgFavaTL619OCJeiWX/nfzBSGH/PGobPFa68BuVi6CiX/NzQ==","shasum":"d3a25d2b4750dd4802a8f9b0e75ed403ecfd8cae","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-82e33fe.21.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+R9uCRA9TVsSAnZWagAASccP/jSLhXPWbj54UDUtWY3T\n0F0Q4cNkVMlt7CsIRxWJ6GlRSH25EnOdSUixIzyBaRXtJVHFqUXpmzL5WNv0\nEOQiwcc0cN89p0NJKnMbbAcaPc8TbgK6GosGbiuB8VDNkb6GHOx3MvHRK1kr\nQcoxMAIWvqs40cOhAueiOPcuvRJxeHOrRC3AgjRYYAeSu39jRFd9WKN/w98y\nKgjgsSzR4XFMoqzZXacjPIgEb9z7tblmZwflKtIJbR6SK6Y4eZNIeZU+PzRc\n7HUcIeGOloFLlwI2dHLOfUwu57NRneNljrr3DVbjU+qnUIyhfjDASc3nqcvl\ndDWpWMNpCKEncTS8ZRssFAseHQZCoByo4eItcYtLzdaPvfgA+N/gwnA1BNe3\n1/NdVIi98C+UKlm3z0L9cY50xqDV2ZVrMbGPzew5cQcNbKBZULfJ71SrAB1X\npX3361HokYAG/l6iRfEUUdQcwdfmI39z9ybz9FPiuSKGst487wcf7dZk3LYY\nmBzNLRPru1vTIDQ8mzNoETWk54/eJkHYXlHTRzhydd2DHAwj/4hTquFbin+m\nBn0+/HSiCBMcC61I6x8ejyXlPPcR6CqUmLLRkwNDRodzMT8cXn6bplL2gW7c\n8S5pdxpkuctZje821DC3ZgR19S2zF0nAgP2Qb2J52NZABZ0Qro5ydkAtbA3S\n2cnm\r\n=/JNZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDF81Cga8RuQxJ8o4FfG93GIQGmOcYOj/XSzs7qrxyd9AiEA839N5x6S1Qtk9uH2CsoSjpjzMPr2d3PfTfKIctZFI8g="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-82e33fe.21_1576607597954_0.30492329299046816"},"_hasShrinkwrap":false},"0.7.5-alpha-227dd67.22":{"name":"graphql-toolkit","version":"0.7.5-alpha-227dd67.22","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-227dd67.22+227dd67","@graphql-toolkit/common":"0.7.5-alpha-227dd67.22+227dd67","@graphql-toolkit/core":"0.7.5-alpha-227dd67.22+227dd67","@graphql-toolkit/file-loading":"0.7.5-alpha-227dd67.22+227dd67","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-227dd67.22+227dd67","@graphql-toolkit/json-file-loader":"0.7.5-alpha-227dd67.22+227dd67","@graphql-toolkit/schema-merging":"0.7.5-alpha-227dd67.22+227dd67","@graphql-toolkit/url-loader":"0.7.5-alpha-227dd67.22+227dd67"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-227dd67.22","_nodeVersion":"13.3.0","_npmVersion":"lerna/3.19.0/node@v13.3.0+x64 (linux)","dist":{"integrity":"sha512-xa/a0JAuT+Z97axiwjXNMsTL+Up8xDYhSIgdrQBNL3anWyfHeow5ZjBg4UhsnlG3wdHbzZjw2XftgvR6DnAC4A==","shasum":"43ed10f444ff9474deaa14a5866fe24391444bbf","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-227dd67.22.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+SBaCRA9TVsSAnZWagAALEgQAIDsP8Si7cBr/wMKp8kd\ncKWuG6FwCfHA931H32QDrKfpHxw2VMouKTC7Ie2Iyc9XgLVJbRoHPSVuvYOO\ns9hUOdDKjR2T/ra3059L6uIuiOEA72EdO4pw0bUTgmXZIpsOVRVOhjv78GkS\nnGwTuYqkA1Mvafe7GBVLq2aiDFeoTHeePdoh3sBNG1jHLwgNVwO7VbmFJcVO\n0371mEcCsvdiL1LtxN1cwaVqul9/gqyCg7+bx2d2ewCtdcfg4ah7x5Wn0BVN\nxA/H4/1AuzAI0m+xDOyVxssLpxZ0JmjtH1kry+xZm2rEuQ7JVjif75T4Ls0M\nQVjNpSjVLkJipUt5450e+fQet5YHir8BH3YJK4XngWrO04x1Vdl1YxmE69tv\nT9fg1EZWkoZXV7lIjNg7fKzbdGpSKXqatgs5zOmil0n5saipRa6pdaE5rZPw\ntPx0kxlodEkhGX2JlNb1N1Sf4gCACc3/p7H5pS92MflyQ+MfDEXeYQJZI0GG\n8lUfBzk/7S42MeAOc8txk/ioZGgquTxri8IZf9s1LfWAm4uMgwKcmPw2B9xz\nfZtU1/u2/jKEAML2JHjVUTXCXlvY7/F5MzA6fztbJSR/8Jf4T5dXBV9KjkIE\nFEmu1Tf7swBd4e7H0Tc7+auJrRq/R1ZEWyqbzhhZCuClD9Xyjaig4xlvHl9k\nPpQ8\r\n=0uPu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG6eQm7Ylsx4wLLzqgVCCz6oQ0FkA6oLxhKh6hXKLsCnAiEA5/XE5YDXm3bGObK/z9Lvz5w53jDgqbU7SO35n15qhcU="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-227dd67.22_1576607834102_0.576954907766484"},"_hasShrinkwrap":false},"0.7.5-alpha-0403d2f.23":{"name":"graphql-toolkit","version":"0.7.5-alpha-0403d2f.23","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-0403d2f.23+0403d2f","@graphql-toolkit/common":"0.7.5-alpha-0403d2f.23+0403d2f","@graphql-toolkit/core":"0.7.5-alpha-0403d2f.23+0403d2f","@graphql-toolkit/file-loading":"0.7.5-alpha-0403d2f.23+0403d2f","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-0403d2f.23+0403d2f","@graphql-toolkit/json-file-loader":"0.7.5-alpha-0403d2f.23+0403d2f","@graphql-toolkit/schema-merging":"0.7.5-alpha-0403d2f.23+0403d2f","@graphql-toolkit/url-loader":"0.7.5-alpha-0403d2f.23+0403d2f"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-0403d2f.23","_nodeVersion":"13.4.0","_npmVersion":"lerna/3.19.0/node@v13.4.0+x64 (linux)","dist":{"integrity":"sha512-MI1CgZDckpkrps5yzHiXOUmu8/q64ariBQ9ndGpk7S+eZYpfAc7n5xmyQJJJNFHt7d3NJZsemoocJqtOp1s2Wg==","shasum":"d329e3bfcd97b8e9d18b743383ce85bd147fe819","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-0403d2f.23.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+iuWCRA9TVsSAnZWagAAar0QAIbg4kPsO7M6eE5f+tmR\n6ii/35wuKHASQiwiaSCBlk9rflfda/KRDKnUEev6qoQ+v3cU/fHvsYyW90Z1\niL9BZkjIlSr5/icrSTGAz36jSHT29o76jUdac9BXuFwPbFjzTzP8vXT57ovz\n0pVw1bPhXWQp43zltJOI3T4Bv3X//mg26RymWLp9sotQdm2UW02V1HqmHfof\nbGDM/kcXa5+pmJpBdi+rJjUGoL6uI3jUKfJsVKzujRkd6Al43vZN9t8oDyiI\nLvm3Xob/NH5DFH5KVlkmPmqtWqC7xdxfnx+Bo+GRyZh+ksHKpGWm6/HF+r5M\nxkliZC/Dfcmxd4cjB+56cuhhBLa/Y4zWEupSgGqOnO/Gaxp6Saxszqzz1hcj\nsblfMpHGz5sQrxkVmfZXsOQSiyLVpUs+J3t8yt2saRBxYULtPo2e9hd1oYfp\nxdRn9qNEIUMXV1pdSP1R1JQm34q98n41CdOlRCiOgCyJQJj4m+vPRsfei0NH\nvWIu2snGbOxI+wo/LjWXyE5SoiokeloTjy3ljuAbTyW/M8yuYAEIut/sRV0o\nsbl6uiQ9lLCe9i7XRHpiYKgZYQcUJZnhvEdY4LhJpjRS8vD30AWVhJXeaNOK\npSsETIsYy77Uyv3iAg/gKjyqx4iQXl2yDzFP2i8VZVGbob5saFhrHDatdqTF\nORmO\r\n=3YHJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUn5vZixJQK053p6kjhIouhFM0CLcmqShGk92Rji6cpAiEAhz20qENoLqt9Chrd82hFCNFeeC+tWWrz6cRwyEv1FVQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-0403d2f.23_1576676245445_0.6381154691454018"},"_hasShrinkwrap":false},"0.7.5-alpha-2265239.23":{"name":"graphql-toolkit","version":"0.7.5-alpha-2265239.23","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-2265239.23+2265239","@graphql-toolkit/common":"0.7.5-alpha-2265239.23+2265239","@graphql-toolkit/core":"0.7.5-alpha-2265239.23+2265239","@graphql-toolkit/file-loading":"0.7.5-alpha-2265239.23+2265239","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-2265239.23+2265239","@graphql-toolkit/json-file-loader":"0.7.5-alpha-2265239.23+2265239","@graphql-toolkit/schema-merging":"0.7.5-alpha-2265239.23+2265239","@graphql-toolkit/url-loader":"0.7.5-alpha-2265239.23+2265239"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-2265239.23","_nodeVersion":"13.4.0","_npmVersion":"lerna/3.19.0/node@v13.4.0+x64 (linux)","dist":{"integrity":"sha512-xOBOLDUrN5qOTdyCle4NXg4+pxvGQi9BnRRy1SfUAnLGEtX9PTs0jWChjMdRwK/k8iaxrJFMBVirshUL+3Ja2A==","shasum":"cddd40facd58930c200e50e6394a8ebd295552b2","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-2265239.23.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+i1TCRA9TVsSAnZWagAAJaEP/ibGHvgoOYF/zWfFCj+j\nSnbf2iKjOi5vaZcGew4tqGRW5q/TnwcYkc5Jd0Xp8TUNDZ+YH+MpmiEaN4lX\nYf5BptBDeRS2WfE5f2k9AeiOBXLEvlKIe+KaCxYTMkRPVNs5Kweu1g35Mudz\nRhb7OJ+0ZZWuEn078a370h2/BT/h2qKYfLxf5cS/kGhNg/qK4xI2NEX41Eo0\npH0rRW2pinATubCMB4nUUzSa4Lg7k0ytk+YfQS9ND4Dv55PHCZ6zwDv2QD3i\n4efKmHNlSdXoie+0BfUvvE1jrUiJkTjWZ62uVuaHzNNFK7hd+DBXcXbmCzSN\nLg1lhKMD4ELEWpODwQ/pAltPepqTYP0N4t+HKVbQPj8Z2jWAxh4buC1Ka6KB\nszEzFzygtNsdc3JHrnXhlHxTTzoZE4EVbRWinO0awvMBsJEA2A0Po/mGkc3z\nE4TWboAeTDocMvi6YQTEta0G5BkZL1XOV/9U/6ce4QnhD3QhooCpTLKu7wL9\nF+xOdIsH4E944IC5RFSEi+ERJLBMOfserNGtW2B2E5sRSU8v0FEY1rpH7gX7\ne0mzstaDBbEG+KxhR7Qw9pvT2/x3R8jw1bMpJ/aP9q3/CZdROiC7bk187pQ5\n1C2bsKvhRAqv7/A/slGY/M8o1lbMkAa9K1PcTS5cQMdZXkXVYlPa2gyYRQKO\nXe4v\r\n=Ef+w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyMm0SE5kNnx76rpKNxeBFz3N/1WSZbUOYkfu3JtwO+wIgddx6p0U7Pt2CXETVSCSXvOiFW70a2r7jLBXSKb7o5a4="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-2265239.23_1576676690964_0.8764168382905251"},"_hasShrinkwrap":false},"0.7.5-alpha-26c4c55.24":{"name":"graphql-toolkit","version":"0.7.5-alpha-26c4c55.24","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-26c4c55.24+26c4c55","@graphql-toolkit/common":"0.7.5-alpha-26c4c55.24+26c4c55","@graphql-toolkit/core":"0.7.5-alpha-26c4c55.24+26c4c55","@graphql-toolkit/file-loading":"0.7.5-alpha-26c4c55.24+26c4c55","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-26c4c55.24+26c4c55","@graphql-toolkit/json-file-loader":"0.7.5-alpha-26c4c55.24+26c4c55","@graphql-toolkit/schema-merging":"0.7.5-alpha-26c4c55.24+26c4c55","@graphql-toolkit/url-loader":"0.7.5-alpha-26c4c55.24+26c4c55"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-26c4c55.24","_nodeVersion":"13.4.0","_npmVersion":"lerna/3.19.0/node@v13.4.0+x64 (linux)","dist":{"integrity":"sha512-gNT9Xya9WF0PQmBOQku8mtG1RbJp0EMgWUhtVa9wAyOYA4rtGnpl5slAGV7nTDImTNph8u+BZqhrlB9klEEpOw==","shasum":"22f83add1e3db944c454cc3b0a62447a4b302ef0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-26c4c55.24.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+jtWCRA9TVsSAnZWagAAykAP/3M//loaHOsDVr65d0fo\nElYfA7x5RCgN5GIelDbGUBBqrsw8+qBwdyrFJEBoJmADOzTbPK8pFoaJCCb5\n6L9MkqcYe8SNBMjNol96J5OCn6H/NwM/HOqJ6XtXJ4R/BCXHDi/zy3D+5FbD\ndoivFnlkvev+mpfiwPsHhsldtJFSI+uc1tdyygYEGajjvYsYnRJwWxoW4P67\nSwuu3EXLzfe4a0wXCHG5y6UYz95WHjXZZgeXP3aiLEDxrTddl8oswKPxaSMb\neKFORfJmn/bkadNhMxAk8OUUUc44gE1B4k65YHy1PAn4J0EoW0So7XPfexOx\nx1sWklU5JQeQx4ZnWCxxqFSIN/VEV8wtKxoQr4ermPGFEtuzO91As8qfaVmp\n70B0DblMB9WmXL+veX+6O0ovNBaT8mPBtp2GMpcTQKRFzNh/u38IKd+pI0vK\nvqIbd8CzK+DrhNEMm+xRIWg9KEpPNyxCfFQUFzV4Ox/EUtt33Q/jvlnx5xLb\ni9+w63V3HBG1msXl3YERBQV0LMaxUXxWdJgbRBXVD62fmTAO6/zzSwgjA+g/\nWWUKMN+PJ6Gi5fy8Gl6hn1TdSqma0henaSLKH8+ziQ0kHMLvQ9/PUnjnkTZJ\n4BqMxBviEATkfyb1+XnllxMdlN943ePzRtoa0yolf3sRqEAy6ohmWeeNjMKi\nx/r5\r\n=Iwu4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGfWJaNcanQUtVVM31JsKda7La59TMYnfJIWHgJdiRrQAiAYSOAaafK3TGB15yz0hj14xVaSMnQjx315BqW5kLqPeA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-26c4c55.24_1576680278314_0.7302286705296823"},"_hasShrinkwrap":false},"0.7.5-alpha-b3a3b57.24":{"name":"graphql-toolkit","version":"0.7.5-alpha-b3a3b57.24","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-b3a3b57.24+b3a3b57","@graphql-toolkit/common":"0.7.5-alpha-b3a3b57.24+b3a3b57","@graphql-toolkit/core":"0.7.5-alpha-b3a3b57.24+b3a3b57","@graphql-toolkit/file-loading":"0.7.5-alpha-b3a3b57.24+b3a3b57","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-b3a3b57.24+b3a3b57","@graphql-toolkit/json-file-loader":"0.7.5-alpha-b3a3b57.24+b3a3b57","@graphql-toolkit/schema-merging":"0.7.5-alpha-b3a3b57.24+b3a3b57","@graphql-toolkit/url-loader":"0.7.5-alpha-b3a3b57.24+b3a3b57"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-b3a3b57.24","_nodeVersion":"13.4.0","_npmVersion":"lerna/3.19.0/node@v13.4.0+x64 (linux)","dist":{"integrity":"sha512-FRv00EIMi8SG8jtrOwgWiVtgTez53m0PRhjO7yFPj0nvv8V63w52qx7IGJkn9TwgjkEjjmNbXOC8zNZgGRExeA==","shasum":"64d4e9d0d283dcd1cf1e761e7365e14ae1d23f57","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-b3a3b57.24.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+kAWCRA9TVsSAnZWagAAySkP/i70PsNAyfCemVHBNwGF\nQkyLy3O2SqdlGizR1yQ2RUeeMxIiYF7G7L40Ugn2/UCkRiWSR/91qXWmWRHw\nqXek3EF61TCteKRZ75AslQ0mLNjYbeIVyDfVhpCPIyMH+Gk7xXf1bB0K0Msv\nLKKj7HVWl9kOkNzIVT76r/UvF917/Wn74Qb1AlQP8Hli2w6nPYuJ4WjF6b45\nOwEGXTJMzOqMtLCqJnOskXfoRvAGFPJt1Xy2LpFd6reL73YOB8tevthNU3vP\nYgvlreOxIy7h5P1/4suKbMcgBhrnMRndant33jQMv2rX7/tgWckVqFoijJ3G\n3trqAK1YfFH4KxQqnuRQvvE0ohGe5goisnA7NqCX9O6YySB0XkRQtdcSlhcx\nDbNM6cocMoT9n6wmGbq0pa0/VaVj2Q03EkJoyP2CWk/tXDhoLt/s+TEBDxLR\nNOTdWOkodwvb/d93/X0z/415f1Mw+NAeYkG5vJ7BcvXdtpQn7UgW1mfmZLZd\nn8qXoTIBHUiNMX2CTUaamOh7Kh9DG5raPLYffXUPGLFYz/+Ds/oJqfgY6Bd9\nt+KMVBGt8Inr71S6DRVNBuOtmw4t3K+CANQ/Ra/apFgJsl8hFWmvPlmT/GHJ\nMX9lEW4DKq6koHQrRDbKwwjTRv2bHGgIcYteVSlDojNSSeHEYrcL45JMuwXF\nA5ES\r\n=YLAY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHECk5We59gnd57ebxMmHXzRBot1pZ+8LyKroiUwwCO7AiEApLXVScCAoSqTvyjdInWOee4uN8L3IpYVZl13/Zclpb8="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-b3a3b57.24_1576681493809_0.45682671983408873"},"_hasShrinkwrap":false},"0.7.5-alpha-595ccf8.25":{"name":"graphql-toolkit","version":"0.7.5-alpha-595ccf8.25","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-595ccf8.25+595ccf8","@graphql-toolkit/common":"0.7.5-alpha-595ccf8.25+595ccf8","@graphql-toolkit/core":"0.7.5-alpha-595ccf8.25+595ccf8","@graphql-toolkit/file-loading":"0.7.5-alpha-595ccf8.25+595ccf8","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-595ccf8.25+595ccf8","@graphql-toolkit/json-file-loader":"0.7.5-alpha-595ccf8.25+595ccf8","@graphql-toolkit/schema-merging":"0.7.5-alpha-595ccf8.25+595ccf8","@graphql-toolkit/url-loader":"0.7.5-alpha-595ccf8.25+595ccf8"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-595ccf8.25","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-fDSi3kyk88ij4YX9oaUHGeQ2OHM040iavc/JWZUAPCPUPI0DYCUWJT0klKTZMlmieFf6cuWVhNdzki8LM9AL9g==","shasum":"1f7a9380820b0b3f4a8f1dd9e0b2b97a2cefaec0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-595ccf8.25.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+su4CRA9TVsSAnZWagAAX9kP/1qMBaxy8Yl26E1XtS9n\npWBfMjqSxpX09tCQED2HrPEuwvqv8+rciVyeivEEFaIuI7N1RPkFM/MUIgkC\nhrAtm9NbHzgzIyTlXSNmGWF2U/2D9uopZ3CjyLYpj35PjISsxineE2AVNSuK\nlK2OBtKGywzp/y0hw+B6iQbHp19YR51W98wNIsaG8nWvgsVuwKyHyRzdZWvw\niIWxLQnsRcvtUpvnr4/mH3aaS4KAAu/aqIrd17blHyvE/qkVGqP2iuAEtEvm\nsFm7KRC7xmrfCzFyPv375fvgIM1QzNwz1ZOprxVOFxCCMRDcMEsn9SbtbcPb\n06dsBjJk0vItABk+ju0ublxiPKK8Wb+F10uNXrAnTLfuOYgVEwH6q9NE7sLt\nTahIlNK85BWpK91OPJFGnW4U75G8kDJIrfCM66FU6VY3tda8VAjWFvsYV4w/\nLBay/mMfX9iIWo7y1vS7UTkOKtij/uogUvZidFuA/idCBz26NkmoKklgw2w2\nCMK9c+IlEVveIF0TA5wu0/RMMXywVT4ZuVPVF49mIfIsB0oBkQB1rj8atyWz\nsnEH6PPJ9hkrvNVod9iz9L3qMStGzjQ32f4QBrwm4JxP6Oz7SZT+vu8/4bbM\nu2VYXsZYA8rhe0p+73GvEsBlMTquG/9CFpAh9UPc/pmPw2y3N37mgN+kq9tg\nTPcF\r\n=1Oa0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZviCBm1MCAwJ06jAshTL+amBPQUEzSd2KhHzQR75XmwIhAKN299a9PUjTZrhXKcHLfU+PDwqkEQ9CYCIzSgzNGR0g"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-595ccf8.25_1576717240571_0.9644422573256455"},"_hasShrinkwrap":false},"0.7.5-alpha-d74dfbf.25":{"name":"graphql-toolkit","version":"0.7.5-alpha-d74dfbf.25","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-d74dfbf.25+d74dfbf","@graphql-toolkit/common":"0.7.5-alpha-d74dfbf.25+d74dfbf","@graphql-toolkit/core":"0.7.5-alpha-d74dfbf.25+d74dfbf","@graphql-toolkit/file-loading":"0.7.5-alpha-d74dfbf.25+d74dfbf","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-d74dfbf.25+d74dfbf","@graphql-toolkit/json-file-loader":"0.7.5-alpha-d74dfbf.25+d74dfbf","@graphql-toolkit/schema-merging":"0.7.5-alpha-d74dfbf.25+d74dfbf","@graphql-toolkit/url-loader":"0.7.5-alpha-d74dfbf.25+d74dfbf"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-d74dfbf.25","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-w6ufBm3oCNanUA8RcxqpIb8pGZUBAQfcXSTzOZny7E4aXSJ7yGEtPsdtTZdkEz3eddczkj7W85NKDqG8cx6v7g==","shasum":"499a37903196e38a03ba0ca496454910d0035df7","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-d74dfbf.25.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+s9fCRA9TVsSAnZWagAAeK0P/3FB/3RzE3B6mZU3fRGw\nqH6+MWsmCw4gqYeitcS+7BxcTSUq4EvMEkOj7OvPmRy1agC3CLH7z9V7yAKl\nXM8dSft5NpvxTOjgkutlOHElhhqhD1jInUSo2ElCoLZC0COn3M5xn7hQSSAe\nayJodkdHMlfhFq20ARPksz3amUt0MDdDs6F9yM7uzH2jyCxHPRLfP0Tt1dYr\nocOVRc0Sb+wjykhzV//Dyhj6qUv+gxYKMalhLOSF2KuQq+Nto7cqo+c3ZgNH\nTpmZBoVW+JDoZT6rnUU8W9KE1tuIIm+yiXaSbjZONzjmSsmiWky5B9HrmFmT\nF/BhZkWSqEO3YSkG2mg1j9/sZDCKIlnUWH+ktKgLuwMhaDnyYvY2Uuask7tD\no7DNXt1v1Nck2ndHH4dS1W8syX4DidTNxcZftp4gKCMIeTB3DC+iFQQm4Our\n15DmMLvWms/QSg7QjjstFLDLUPHx65lCjO6BsnGwYMD9OLldjDo/0isB9Mw0\n8ZZN9GXqRs+Y5MipiBhSVVepNxpnrCc0VQjowHq9JxsbJuOp0zb+tJvPOJOw\npfpnEZ0OyQP+wdkZ5FgVYPyEivdvmaOt+D2bMbm/SN2QMLvvi9Rm8qTYh2q+\nggfaWB04bLXP+fRykJkGqd4pjWeNbD3lzJd7SMY1Oz933lBDxCqan/NArdg9\nlUrJ\r\n=L+nr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGdrtzNAMSqlLSjUwmX9QgVqjhnFlei4wGMlI7SRB/kVAiAg9EJiJlN208qK8OGN+gfudJU+dg0gcDr3TSPoYBItzA=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-d74dfbf.25_1576718174653_0.7970055101620397"},"_hasShrinkwrap":false},"0.7.5-alpha-65e2e63.26":{"name":"graphql-toolkit","version":"0.7.5-alpha-65e2e63.26","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-65e2e63.26+65e2e63","@graphql-toolkit/common":"0.7.5-alpha-65e2e63.26+65e2e63","@graphql-toolkit/core":"0.7.5-alpha-65e2e63.26+65e2e63","@graphql-toolkit/file-loading":"0.7.5-alpha-65e2e63.26+65e2e63","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-65e2e63.26+65e2e63","@graphql-toolkit/json-file-loader":"0.7.5-alpha-65e2e63.26+65e2e63","@graphql-toolkit/schema-merging":"0.7.5-alpha-65e2e63.26+65e2e63","@graphql-toolkit/url-loader":"0.7.5-alpha-65e2e63.26+65e2e63"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-65e2e63.26","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-N9LxoSKNObftcAQB+2Mh/fM05hpyof8yxqQCXzddGRTXNtKuPK78Fe3Sg2Fpn8e1fpTOkmSLMOq1XvERwwkOvg==","shasum":"857df5e855fe5ebbd3703ecc8a19acbc694cace3","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-65e2e63.26.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+yRTCRA9TVsSAnZWagAAFJQP/jvdxsc0BCD91V5zfi2K\ncUstx1DvzOo8sj9aVygr1yck9RiJE8r/1QPnjRpqzp2BCN/6KJ9rMwI9A+X3\nfMs3NE4BOzS00ac9o13LLgMQ876rFNcajxkqh4Wvy++lR6bBfCvy5kPmNnNY\ntS+U/2hDPjcfvEiFr7nIP3CCXL2zze6lOKQkPFwnLzNKqYV0C5Po//JPQIPF\nbYFNGEo7s/eDGPA7U/BBgxT+SayWWzBPAko4j6HjndGJTshPKO1KYebfCkMt\nqpmCqeTRTmFeVUL3HbOGr7B492thZZTaEoCJc66EUpDiQ9Y6wDE/T5HASHTK\n5+E6NjtCfOEeDjhSwAZdWYHuO+9LxIIsk9/gLmUW2mPCE2LJXl26SUrJlgYi\na/YvrZIDpILn/7+PpDdXMXR/JgZzV46txRyj9HrsUEtFixp7rSDwCqSqkLrY\ncK0j+eETOi3stPk7aVwWVt3otiDEWg7aqiaNW9sUZxXYiE+GUyjRAtF2eaUW\nlmZXbK5Py888mHi6aI6+//XXtv340eXdZZxSXwwtmEixZuO2m5oqeaTYBIBP\n8f0FitTw2ldV7W0K8uE9o1m1vhBVCZgmoUZbloE0RZzp/BbP6Q1DlTjTUTaf\nKmkY8tTydHP/J0TXoP6CdKh7tUwI9qA+c0LbXB3Rjuhf83wBGWw1U0oH7ht3\nPyHP\r\n=N3YF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCL8QUJjJ824fHPoLMgSDo8J1/SfbYny6K5zduZojdHwgIhALArsgFUnbx0BHG5X0N7Pb2MzicD8WlpS3orTgur0dvJ"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-65e2e63.26_1576739923212_0.2244128555318321"},"_hasShrinkwrap":false},"0.3.5-alpha-1ac5770.144":{"name":"graphql-toolkit","version":"0.3.5-alpha-1ac5770.144","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.3.5-alpha-1ac5770.144+1ac5770","@graphql-toolkit/common":"0.3.5-alpha-1ac5770.144+1ac5770","@graphql-toolkit/core":"0.3.5-alpha-1ac5770.144+1ac5770","@graphql-toolkit/file-loading":"0.3.5-alpha-1ac5770.144+1ac5770","@graphql-toolkit/graphql-file-loader":"0.3.5-alpha-1ac5770.144+1ac5770","@graphql-toolkit/json-file-loader":"0.3.5-alpha-1ac5770.144+1ac5770","@graphql-toolkit/schema-merging":"0.3.5-alpha-1ac5770.144+1ac5770","@graphql-toolkit/url-loader":"0.3.5-alpha-1ac5770.144+1ac5770"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5-alpha-1ac5770.144","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-08aQVNGfsZKkpPLkJq9SkJ5oS5HyB3TTWJqiEghZjLlQD2D55p+iAy/+hs6J0uVRzydpKVI4Y75AzRCQTVxuwA==","shasum":"19a54a1afaee08667482b5b7d8836cd6130657e0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5-alpha-1ac5770.144.tgz","fileCount":5,"unpackedSize":7347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+zPaCRA9TVsSAnZWagAA0LUP/i7VvlLQwi8bX82GOzBN\nhlUKnTSwaTR1Dwdp0KMvAaPCuy30oD4dR61WMtGC9gq7nvIaakAqeaBP6Hj6\n+6+eHu7h+WBg5Y80khLbZJ1ytIeCjHeWohVMDjQMEnEAq/wkgVQwRY/oHqYq\nLRLcA5Z42PaPZWBY+aRYDaYhOjwV7DplBfkFuyNzF+0xY0d5ju2oCbz+5fwH\nJFSoWA1uOHpb+lcb/dO/0WFWhRLyFjcXcoXDqBeSU9S2QDRLEJPSKHDktO7T\nIggYi0HQM8RsGVbkYCQhhInBcCad542UdrL/dYn960nPjLhaHhF/skonA57x\nKvfZIiVhFnAv+nDEyhcrIa5juIjWTS1EWmubUnRIXSKTvzaoj1aqQOtZVDNn\n8yZ9cXEYErqIuz2xvtcvpIal/3pvEjSvF0zfBKeT1MwtkGx3BCt5e68p9ScN\noaYBimYRPosJja12ICLqSz0dcomvmrH4Zh58mMI9ti0DDNyAfnGQOyFS/PF7\n4fOyFZrSm0egPVM+Vm+u+nSDyi6o6m0yNT+YSmQDaBV3ZZns4THMjOZZQoQA\n/Ww2RNMqDAol7zikBwzLz/tY2/bjwmXNPzmu04vcde7EbZzbVWt9pP6mZq1m\nXUDwrVlVWWYGEeSaPrqbG2ViYsDip10s+25YngSmADWV2Wu3GgrEyunwi46o\nVXFX\r\n=rOSB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDLcBbDA7/P8P6GMA8AJK9bvtRjsRTxpAOpgTzyV4myzAiBEtNwMVIyo1+6b5TpcxpXNNfjhAEPlnu/DRJTXcNyacg=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5-alpha-1ac5770.144_1576743898365_0.4115457026319582"},"_hasShrinkwrap":false},"0.3.5-alpha-6b149c7.145":{"name":"graphql-toolkit","version":"0.3.5-alpha-6b149c7.145","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.3.5-alpha-6b149c7.145+6b149c7","@graphql-toolkit/common":"0.3.5-alpha-6b149c7.145+6b149c7","@graphql-toolkit/core":"0.3.5-alpha-6b149c7.145+6b149c7","@graphql-toolkit/file-loading":"0.3.5-alpha-6b149c7.145+6b149c7","@graphql-toolkit/graphql-file-loader":"0.3.5-alpha-6b149c7.145+6b149c7","@graphql-toolkit/json-file-loader":"0.3.5-alpha-6b149c7.145+6b149c7","@graphql-toolkit/schema-merging":"0.3.5-alpha-6b149c7.145+6b149c7","@graphql-toolkit/url-loader":"0.3.5-alpha-6b149c7.145+6b149c7"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5-alpha-6b149c7.145","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-sz2WpaVPa/gtFBuEwkTHwKgxMZn1F72r3179DI6ym+nvZzTM4vAMgb1kR2a4VisOQxWOLWatC7IzRp5qOg+4YA==","shasum":"8ffaac6258d3bcc1602685ebcc03adf189397c7a","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5-alpha-6b149c7.145.tgz","fileCount":5,"unpackedSize":7347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+zbDCRA9TVsSAnZWagAApnYP/0ZFPQTL40nmXb7iqJto\nGNRbI1SWKIYC+q5pETwrG+c4UZ2RA/ok8m4akzZYRBs0vcVpN9+Dv96KS5Jy\nHGUxYNHCokA2zeNA6RWprYWWSrdPClb2f3DJkvs3I0u3aOVOjUmtB0MOdeFJ\nkbts5QRCG0nvm/50KKaFZ05IdVr4QZ1y67yFVWYjGgnagvAwnRQtP0GVdopj\nl88lT6ldwCtxoPo2JVufB6cNhrgMNJoLLJ8xpWq6gvb9HQRlRFNOpGTVBvet\nvyhbnMByJWlLEwcS/qISX+EfFloComYl5aGd9bHFbXDBhoHaHvY7ipBIm5bN\n4J2e5kquNxqGf0IhTuSkeMboEEFLKS7ZSBEKjOKPcT+rF5ej8Tl2UgiGcIZM\nR7b2tT2Vr6WDug/+T5dNbcTUggK+hSLN5LlVQsQP9/lY/9NSdL72OkLOCmE+\ns4PP0Jb9hDY6DhXDOJUknqRg0KnWxl2AfTurnlEyAMtLmgQfZzXUN72LLn9F\nyT9O9H2ZBUebQ2VJpVD69PU4klgkfPCtyapH/l///I1leuUb2cfqyOD/1Nkr\n0KJ0SaLX4zM1P9wPc7/Q2jRKaM3SllUkZuCnVBFotaqTazgU3tyRgw7H+p5w\nR/uTiMyp+PYPwEKyPXLEUjNRNZf8b+iVQmea72K8xJUgDUHd6NEslvGOOtMM\nDHuj\r\n=R+Mo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKgaTFBGb1e36IM8o2jG+FmNNjHVw/yqF9m6d7qJElFwIhAM6z8ydUwFLuzEfoEwsBWRtoeFaeviUs3jRqarHQ9kFn"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5-alpha-6b149c7.145_1576744643357_0.8520155348766361"},"_hasShrinkwrap":false},"0.3.5-alpha-028a4fd.146":{"name":"graphql-toolkit","version":"0.3.5-alpha-028a4fd.146","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.3.5-alpha-028a4fd.146+028a4fd","@graphql-toolkit/common":"0.3.5-alpha-028a4fd.146+028a4fd","@graphql-toolkit/core":"0.3.5-alpha-028a4fd.146+028a4fd","@graphql-toolkit/file-loading":"0.3.5-alpha-028a4fd.146+028a4fd","@graphql-toolkit/graphql-file-loader":"0.3.5-alpha-028a4fd.146+028a4fd","@graphql-toolkit/json-file-loader":"0.3.5-alpha-028a4fd.146+028a4fd","@graphql-toolkit/schema-merging":"0.3.5-alpha-028a4fd.146+028a4fd","@graphql-toolkit/url-loader":"0.3.5-alpha-028a4fd.146+028a4fd"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.3.5-alpha-028a4fd.146","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-HupIbEkR/j9eztlAKX5CidH9cEPv2XBHjPSKyt8SZfmX0pOriJoL6tZUIjvG3IQ2K1aiDk0bBS3wnm6Nm1P1xA==","shasum":"5bb58d0dd93f0c86010057d6b51be1d62990b9f8","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.3.5-alpha-028a4fd.146.tgz","fileCount":5,"unpackedSize":7347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+zgFCRA9TVsSAnZWagAAVWEP+wWEwoD9VnvwGqt3GGBQ\nXr/Qf4XYrlPY46aR/W1luC3ZAXoDMRnVzPNIxK8mu17K+h1HQI93Rqq/V7qf\nEGtqA00XTEHKbA3ibmftbv0IAzOz9+z7p3eMJGkDG86qF3a0qYqhbpJpbpJY\nUKmVgc8Y9MsprT7H9YzZzvEKExq/khCQV6B4v9tcJE9PD7XRyRz1X4hOHmUt\nBNpOJOW/uOqAnQoqVt9aUq3jpPBVGzIxgr5PPDFkAIJ5lKantfK9S5TLAbAe\njyoY3byYVVqszSN6CL0q8eh55CgU6Aq/TGzCaxZrLoh4o2q84hEPTSn6KOTu\nJroB/k223pbFmc+PukDjHPIesEn4BxgaojY+J2BO/+q1+G6p7cS+IrxS02kk\nyu57SdQDu1/eRQ9mAHp0egShrSiLQ7onisZ2rPlF1q4q2zdnE4q0tDR0WIXE\nd2/XBjeFPVVbFHWZPf4/a6yVt92UvoLQKztUku3eSYZ+j3cE7A7vL3tMsJwX\ncRQ8DqNl31EP2eaodk4k2dBL5wDXJDDrjEyEJt8zD4A2xHigeXqWXSz3YEM6\nUls10FN88Gcuz9AZAS2pcs0vj2OcNC8AR1xelJCYVHAsRkXg8ezv8oy2WBXq\nbyud3WvBk0j2ym10K+mRrPqE+Y4C0klAk0GtSdwTG/syLzHrwQYr87trrr+8\nbHMb\r\n=6COJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCk+wTkadwY0vGFaIF25jk2wW3L73Lx5DXU4ICRQWIi2QIgfJFOj4NL52adin/HpVH8K1aGvgAAYHvX1ccph2EKHSs="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.3.5-alpha-028a4fd.146_1576744960006_0.5248560523696411"},"_hasShrinkwrap":false},"0.7.5-alpha-4d94736.28":{"name":"graphql-toolkit","version":"0.7.5-alpha-4d94736.28","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-4d94736.28+4d94736","@graphql-toolkit/common":"0.7.5-alpha-4d94736.28+4d94736","@graphql-toolkit/core":"0.7.5-alpha-4d94736.28+4d94736","@graphql-toolkit/file-loading":"0.7.5-alpha-4d94736.28+4d94736","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-4d94736.28+4d94736","@graphql-toolkit/json-file-loader":"0.7.5-alpha-4d94736.28+4d94736","@graphql-toolkit/schema-merging":"0.7.5-alpha-4d94736.28+4d94736","@graphql-toolkit/url-loader":"0.7.5-alpha-4d94736.28+4d94736"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-4d94736.28","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-0xBGNM1r1Ht/U6i4RWh8pWCTW7YzuZfCFzzt253buPf5Vz55N846zHWIVVLXiamCE3FXJNmmS/owywXBLZethw==","shasum":"0ca3845bf03e7c6897306d5fbd6536e51b4aa4fd","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-4d94736.28.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+4nbCRA9TVsSAnZWagAA33AP/2fsvUvNByv52YZsPwFZ\n4MJgx8ji8eTuzcn6CfO/e0odliZk5bQt1qHyG5io615do8Niqlqr9mct0Uo5\nBPGRU2pgLmCJduIN+AtZXcbLGXeI2PbEsMsxVPb4l7Hsq1lEz8IUBop3PmOA\nStEgSmQ5CzDbIZ4/agesvMoT0JEM3lGaeOhVdkf8NdDRpPm2frc4P9won+bf\nCOlvmvBF8qcuE3XZsF7SrvEw2d5HhLiOWdkGCQ9Hb0SRWDizAVn6bzLTowM4\nWdRPHSEr1KL1oBTw/JFVtf5YAfnVkHxOFuWv9Uzy4jjM2+xi5X5DvEMG+K1F\nPDEyxceb9dD5H4TUYCUk9nF9V9f7NWs49QMwNAsA/8K96kxpdjF5sgXfbn4G\nYM4soeP76w7/snYAYrTB4J5cwt0PTk+G4Tp1QmhBhOqjDHE5Y1MmavXV2DNT\nFV+VojI//dwOeCWou4HK+PwzRjX8h4uduJuwklTVKsb/utkCKdkSiJEa1yPd\nYucftDPUhMzca78SEKnE6qjz3WtuDdtw/MiVyvBEH8TJmesuvN5fQ6yfX6HI\nhLbUj6zFb9mCWrTJihijoN9xeMgRK+V2zaM+srLcAk6XhzAT4QBJy7x6DDHM\nyUWCxxz998B17a9boiKpjvw+MwI4a5O8+jsSAxyKtq6SzNNcBJza6XIycMd6\n7V8u\r\n=RGUN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCrkjHEkKnRwtAIwFROVtTcpzCFS56MRkDHlqRMo8cBsQIhAKcokkwjh/33Rtq8tk2LBAgd31tAaeyuXuKxb9awWUTK"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-4d94736.28_1576765914838_0.27048958529606293"},"_hasShrinkwrap":false},"0.7.5-alpha-5153853.28":{"name":"graphql-toolkit","version":"0.7.5-alpha-5153853.28","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-5153853.28+5153853","@graphql-toolkit/common":"0.7.5-alpha-5153853.28+5153853","@graphql-toolkit/core":"0.7.5-alpha-5153853.28+5153853","@graphql-toolkit/file-loading":"0.7.5-alpha-5153853.28+5153853","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-5153853.28+5153853","@graphql-toolkit/json-file-loader":"0.7.5-alpha-5153853.28+5153853","@graphql-toolkit/schema-merging":"0.7.5-alpha-5153853.28+5153853","@graphql-toolkit/url-loader":"0.7.5-alpha-5153853.28+5153853"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-5153853.28","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-gJwggV5dSs6ShljF0yRF3Bsc6z3M5sDcLS/VN6hNf4UK9pIlfxIngEoLiGtqfuvBMVpMFr5fziSOGP25YjiXVQ==","shasum":"8d6d6059b091b3448ecb7e370feb6f3fc1f39271","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-5153853.28.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+5FACRA9TVsSAnZWagAAKwYQAIfRqEZIZo75YtKXR/lQ\nChfXsskOzbTjEn50vViiGA6/R6eap2E7tzglMudOg4XLA1oX8LOcHqr7EqB3\nUkfEzF7FcdajsksbG2FK6D6anX6YCZn3DSJMayalkmVPzT3KyshGu2zYB9xL\nwBAaKtXio7xS4o9hFGkG0DZPmOVAehSuFGnl/9Rbu/nqRT/di+tZFDuxyciT\nDg/fjd48Vq6VhgbTOZZhsWgdEbxhiOwcnHM9fl6XoFY2M8igdlScUEsIZYeu\n2dZiVxG4Py4x6j411/LGYKpHOV9h3sX/9ADK1E/49Nq052++IHvLW5VBKTmk\n1imN1WGgjTkmoTEXoo77XW9iYrv5AIyCm/0XYuj9ovnsGlT6CgD3m0C8X8bj\n12z9OjN9z/O28mGo9o0IC20gJQ9FcWJkbAOYuaJeacWAhW+xwCNOKODqSqjr\n+BZdTn4vV2qAObfG3KNkr1/SN4XqOSlhz4bs33yfroamjF0E+kJgXbC3wubc\nEETS/rfW6DNHAX1iiZbplCuoVSA8f8wnFXwKQddE71UAuTTZsxbQnMZH+Ttg\nDPKV+8NReiVOAk7BFRop0JDfuel46bN1Aed1N3uFELD5FHfptwBj7sgmhTAl\n9cGbH0SeiIPAzgOhm+7ryavtGndYnyx9KPdt48xg5lLXsoowfcwsFeSL8iWj\n/2m4\r\n=3P5G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH0jxQR5mpZSZnbKxyfPdPfGE/fEKM1ir5HGeZKgN44sAiEA+oONVPXXX7V4qJTpMHBxcVlVeIi+GJ9N/nhjCkvTQsU="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-5153853.28_1576767808617_0.32668979590322444"},"_hasShrinkwrap":false},"0.7.5-alpha-6eec8a7.28":{"name":"graphql-toolkit","version":"0.7.5-alpha-6eec8a7.28","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-6eec8a7.28+6eec8a7","@graphql-toolkit/common":"0.7.5-alpha-6eec8a7.28+6eec8a7","@graphql-toolkit/core":"0.7.5-alpha-6eec8a7.28+6eec8a7","@graphql-toolkit/file-loading":"0.7.5-alpha-6eec8a7.28+6eec8a7","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-6eec8a7.28+6eec8a7","@graphql-toolkit/json-file-loader":"0.7.5-alpha-6eec8a7.28+6eec8a7","@graphql-toolkit/schema-merging":"0.7.5-alpha-6eec8a7.28+6eec8a7","@graphql-toolkit/url-loader":"0.7.5-alpha-6eec8a7.28+6eec8a7"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-6eec8a7.28","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-46MWMtztADQJlHhHqBCyK8X5RUN+XiZqlFEMj2HirT1yygbxLfWVYzk2bICdvGNTsOtsxgTZ4NbfohHrS9tY6A==","shasum":"c9c6cd360cf0ec4b6271aeffbaf587717929aedb","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-6eec8a7.28.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/CuNCRA9TVsSAnZWagAAPJYP/0R6Axu+BJ90MkI+T0uY\n0y/PK0VvdV8TlIPA8o3FEW75+IZM8Puvd9qidfqmOITMIA2gTAU6lejpd8Vj\nReKLlybUY7NbwtkDY+E1kwuRnkHMa+2cjzLrmirZtQqFb1d0C+JyiHXSO5BS\nq4OIzI0Um9aHW3XlIgxP69XDNOtv3PCTA9jidghyHKGRhDtUaW4SWJ/zf85/\nHDrqLhQMQTVWCbL3fFjW3ZgXpskui7BzhbkDhPYZ7ri/nLWOlN7uBJm8dfJg\nziKjVGeMBy61i6Wx5vjRs09btIFYrvWVY1URemnSyISfbWteS76NvoHxzXwI\nswrtBFIAySmtC9TMIo3E3sRrBzRMnROiNuoc1dulmNtMXUpKdDGCHCRY43QY\nZb2E2lP2a3JyXRCJJdm+ih7z1gLzex7GhmWCnDGL48RPsbiURWrKRzHbPqhm\nOl0RHSs2MI9/U8Xj0J+wDXYMCDzj6FMNJNdTh5vuehKdcHcNLYXSmrORTfsD\nC8TmqlLLorQiinBKV/FbJskZ4Cum2divms5i0AvD/zqcqMdSNJUgfpN/fnmR\ntm/47PVqJL3PTQXolt8fOl9hF5fH9tvdU9IzTTnF0NiZPceal75Exr25XsYN\nWLpxkpF70VD6MdOe41JWf4cLXzJrzyMew3S6fyEi3yTvU5yT1CFSrojS+tC4\nuNZ5\r\n=3HA/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHduc9PokDArEKlLyTxnGEKHn+aDmUeUMfP1ev7rYZCAAiBrlDaWigUpVSFWg3CzNpH2s9RxZZNOID3o7rCZ9orPPw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-6eec8a7.28_1576807308501_0.406120253384773"},"_hasShrinkwrap":false},"0.7.5-alpha-ff2be7e.29":{"name":"graphql-toolkit","version":"0.7.5-alpha-ff2be7e.29","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-ff2be7e.29+ff2be7e","@graphql-toolkit/common":"0.7.5-alpha-ff2be7e.29+ff2be7e","@graphql-toolkit/core":"0.7.5-alpha-ff2be7e.29+ff2be7e","@graphql-toolkit/file-loading":"0.7.5-alpha-ff2be7e.29+ff2be7e","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-ff2be7e.29+ff2be7e","@graphql-toolkit/json-file-loader":"0.7.5-alpha-ff2be7e.29+ff2be7e","@graphql-toolkit/schema-merging":"0.7.5-alpha-ff2be7e.29+ff2be7e","@graphql-toolkit/url-loader":"0.7.5-alpha-ff2be7e.29+ff2be7e"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-ff2be7e.29","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-zcRzitu5WMMq5WeXARR9ZYAHUDivIWyl4/P4M71cd7YW7B0SOg2vTtCrwyafDic1N6VJznMF1d7FqOCDuVhCPQ==","shasum":"d0fa69439d0cd3c597cf8a53573037328c3c9ad0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-ff2be7e.29.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/M47CRA9TVsSAnZWagAA9jcQAJeLC6Xrjud9tB4EQNAc\ng7y/N2XhvQdm7sPbusJdTRSAQU5iQqX1mYBw7l5NFS/jIV0Ywt9xtIcCtnR4\n/VYjn3yTZhlViRnjp0F0DsU31J+QI3/YTR1c5TaiO3rfj5BF7owYdVfk4Vii\nB/ZGA/VRK9zdR9iQwJ/2LFVJT+/kiuhaY3vjz/xBO93K/BreZzlH3gffnb3k\n5jrH8+7L1KVUR6YW0Sz13inspnGkGe6G5xGhM/01vNbbWyOJLXJCafpuQAZv\nOLRhqyGUWhibeTczaRg1tSRE3Unr6sWpJ9rkdQxh9rh/859lyQ+n9oBc5Hc3\nfqEVZHPz+T6yqjCXL1Ch9qTpzlUU7rjR2qajmRaetjzBcE5o1XhamWgq6klm\nzucGupIrBOe3+/pT5F+4sm4Mk9v0voSWcwCr285f34f5lI06u+1Jtxtb5Pz9\nT/8yVPryMwsiEc1uVEuQcxO5RWMJEYkFh1olvBglrCAfYRjHHL6334BncOe1\niJyz97Edt1pOHfUs8m5QtSlLSKvgp7HrZAbt9dRb+4xIUZ5suwa8NZd64bLb\nO24NrjBdIc8iqmLTQyyibbFOk0j4K8X5OdFf9fIDoV0hOmK9Mz4PR4GbwZ7H\n0/0+naaLdBayARVS13R7Pg4TLE8Cxm9PotUvbFlrOF6BltgypsqckTqy2QL9\nMCm+\r\n=xJ7c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2FgNbRbpghQACe4Wb8+lt9WBuS/6b77eV83mKFT19tAIgJ3PHMGWTLA2TB7CqIwkQ2DrZrUrHTuVT+ipYDvqNE3c="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-ff2be7e.29_1576848955235_0.8620274319362948"},"_hasShrinkwrap":false},"0.7.5-alpha-862bf62.29":{"name":"graphql-toolkit","version":"0.7.5-alpha-862bf62.29","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-862bf62.29+862bf62","@graphql-toolkit/common":"0.7.5-alpha-862bf62.29+862bf62","@graphql-toolkit/core":"0.7.5-alpha-862bf62.29+862bf62","@graphql-toolkit/file-loading":"0.7.5-alpha-862bf62.29+862bf62","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-862bf62.29+862bf62","@graphql-toolkit/json-file-loader":"0.7.5-alpha-862bf62.29+862bf62","@graphql-toolkit/schema-merging":"0.7.5-alpha-862bf62.29+862bf62","@graphql-toolkit/url-loader":"0.7.5-alpha-862bf62.29+862bf62"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-862bf62.29","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-aNMtTsi+LZttaqkyauGf9tDg7q/gZbMJLie9FWiWqy46nWlS96Mh3L6PxkMyOmRfxxgQqHxZ9D3LsvRmGwtgTA==","shasum":"95459b4cf9e1efed6d4a4ba455552da7f3542a54","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-862bf62.29.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/NTVCRA9TVsSAnZWagAAqO4P/j4g9XyPqhUqfrEumSPo\njDRqQetuqys2sWVCa3BhQr1wl3qpohggWbM3d5E6tqY3r/DTEGY/GLJRuwIl\ndzLdZPHDilYH4dkQl24kRH2PzIyMDz/5mazqkicJgbFmIbSokvOaf42wBfHc\nTCxxRZ7NSjHr1yDFaXG160Ze9SMA8bsGv3tj8xNDezuUBTnsrEgIQk5WuAnY\n8czqzxkfkbS3rN+Ac7T6b8ckrzDseNXFGwLNZ3VSmuWbaaxXpqO0R+q96B6S\natyr24+Nrduj+qei59SG7WTrtHe2SckHhVz32o1EsW1vzkGjy8wB7fnmjWfm\nMTwBurrXK0ds/+DqSeLEcing9hEylMLLaXgMHtzyU/IGLtw3Z9Biq0i4kgC3\nS+XxYlne8UXJ2fQgY4YyrEFxpcPq9wk22aavd5lFCOOsHYzMPabT1pRNLrYK\nLPkDOyvUFq6LCMuUkLsLTyPlJzeiSQ1NcbhGLYv/Wf1t6BTBBgAeO+9IAhHl\nRCFZtaNDITrz9QqcPF87fbZg0QqmGO/DFK9+ULunsmgNEBXKuLAV3sFxikDi\ndW5RLgRDCP4C9jEmQrXdZUUdU/rCkzfVwg/XTfn1nS0+FHtuBmQ/WKtthxLd\nuUMDqymTeM9YqX2esU/+X3ZKSETVRB+EdPigwIr/aK6QDVV6K01r6MET8/3c\nM+g+\r\n=99Vd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiRc1UHwNfzDBn+VbbnkaDzyMXYgTjBrA4bD3ODGK5/gIhANIjHfxwBg3aOCkc1R37OOMREkaoDkRcpFRnzOUzC5dh"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-862bf62.29_1576850645422_0.08169295025168499"},"_hasShrinkwrap":false},"0.7.5-alpha-843cd41.30":{"name":"graphql-toolkit","version":"0.7.5-alpha-843cd41.30","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-843cd41.30+843cd41","@graphql-toolkit/common":"0.7.5-alpha-843cd41.30+843cd41","@graphql-toolkit/core":"0.7.5-alpha-843cd41.30+843cd41","@graphql-toolkit/file-loading":"0.7.5-alpha-843cd41.30+843cd41","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-843cd41.30+843cd41","@graphql-toolkit/json-file-loader":"0.7.5-alpha-843cd41.30+843cd41","@graphql-toolkit/schema-merging":"0.7.5-alpha-843cd41.30+843cd41","@graphql-toolkit/url-loader":"0.7.5-alpha-843cd41.30+843cd41"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-843cd41.30","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-XVbX7Gbrr590mb6alvgy6EDrVUtgILuTGeCDOOf54+9abq2IjAdVSnOYbVkaLp1yPw6t9C4UlnksnM/w4Zt9+A==","shasum":"f8f5d2580fa07f76d384299e946d4a5526f0e1ea","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-843cd41.30.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/T0dCRA9TVsSAnZWagAAUKcP+QACdUv0HpqFmRm3O/yZ\nab7wVvyHnAUENbY/snQ0clPDSM9bFalA0npI7jcQAvQpxcZVIoksQOL7jGvP\nUNbMq8pjPd3QJ+rLt/NYHHGqkap0j7ueS+q2tzptdihDdizi29aijAA1Hi58\n0yYx/kkj+0U9oSK6FaOxHrO16mCYwBt/iOJ+WTWD8k7sDhjQ8VkWbVT8pmKu\nV86qBIEdfIB5uzeNallflcDXog3m9X+ziEfUKJBOIvZdDuaAKDSbJhqVcrTL\ntsDvvpcCcd0VPX2d0wPqIjAmFRgR416kDflp3PX3H44MrfuJtWdIUS+g3rv3\nVc5bP8V4L1HudenOdAb5p5ZaoMm1t04/HBLkSQeGB/TbNyEtvtNRRaAvn0zg\nlvDddKvRqI/64bf+LPHRHcpUSSR0xHw8NoOonfsgOCvMjncuQBcn1JNw517A\ngPv3fNGSBN7gCnx9eSbLCq6+DkBkeyC2gd0yxdlko/tM3jCA0wm69tVcJpFK\nBYFWJ2cnPc8vkl+BR2a2NiSpyW3YHcAF8nd6n6upoJRbR1IR6L2dQA+TVGgH\nFpD8UeNSelAnadl+USicHybDkcbCmhxxxBrKj1DKF3pWOb3lu3EzxQTTTpGN\nIujQltFCNLZdFk+lQdK8tEGABmI+qyCBKdMYgB+okmZfnHyk/1hLOX/k/+jh\nXEZc\r\n=Xq6E\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDkJkYyMtAqXmYro3K8mzCRIuYNzFBYexgLJbZ3waM7QIgDIp63j1kNzCfdQgZdc5AX14xlEIxVdiN6X//CtucnhE="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-843cd41.30_1576877340835_0.5669948159081699"},"_hasShrinkwrap":false},"0.7.5-alpha-39fa6d8.30":{"name":"graphql-toolkit","version":"0.7.5-alpha-39fa6d8.30","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-39fa6d8.30+39fa6d8","@graphql-toolkit/common":"0.7.5-alpha-39fa6d8.30+39fa6d8","@graphql-toolkit/core":"0.7.5-alpha-39fa6d8.30+39fa6d8","@graphql-toolkit/file-loading":"0.7.5-alpha-39fa6d8.30+39fa6d8","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-39fa6d8.30+39fa6d8","@graphql-toolkit/json-file-loader":"0.7.5-alpha-39fa6d8.30+39fa6d8","@graphql-toolkit/schema-merging":"0.7.5-alpha-39fa6d8.30+39fa6d8","@graphql-toolkit/url-loader":"0.7.5-alpha-39fa6d8.30+39fa6d8"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-39fa6d8.30","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-tWIjYTuYLqjqfYi0d6Uxphw1wEkcpTYeGXfyB9JRIxBG2PQurp450hcfaE/w0EjqOqBc4gq07qterRiW6o+VhA==","shasum":"a0f25ae1639464b9f7e35750f37a6cf1a03c759b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-39fa6d8.30.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/UPyCRA9TVsSAnZWagAAMLoQAIE4IBwWThdn7EXwzzco\nO8sraAawgMZLf+q9xm5pt8fGcEQFJfrnmDZBunm4mUXxfenytku8MZI6AjBx\n1QqISqEQumwxVc/q8PALCvrKV/+IZ3EIX8tGFO+QL79kKcwO1gW3HpBNa4jS\nBsTV4syIYKVG99692iV0KbfoqpDWa5N3A2uVVsKVn246UqDjJtZvE9N3PRe2\nP3PKbXSxTuQ/FGuqWgrh5TPVFeTFc+gW0m1k4lBoIu45vAIhzocceP/X+Uwl\nvQoxvQWUpVMw58KzVTv7MssDLggs4nBlZS6Q3uiR2JLhjJwLat3RSmfwAaIz\nu82sXvAbl2//Mzdgk/0QnoAV7q2VsXwZLz4WkvTjniuIMfimOHOBGAaEHoe/\n3SYrJamvQVE2FK5jm0UGUGD0cDS/CnQWzTkvxOXbCSiS15oR4Qr8oqZPAchD\nqxSNV9HYmDvYtmH/QadYOc/dcXBG8s1UQsUSsH4FvMVaXbAvt/WL9ZgEY/0C\neD/O7M9Yia3zGWnFcJmRl89qdmWy28DQKpOTA/vivepkCLoM/AtXEUdfRclC\nXCeefw52R0/nffnLs5fNhG3rDvAxE4lU9XCPGBNI4Y3eJ5YLFsvrG6xMmM/a\nE8czwD4I1AspBfeDag5E8HLxAjTHatA/kN3CKdJyjPZrd0eYZ4tKegvBTzwf\neEMP\r\n=/utf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDJ0MnRC3VgzN7efci+E23Nf8UtqJm/1+zf32HyvcqcTAiADrDCzdTn19vU6I/toK5LdJU6MKvlOnt6FvuZq41UEww=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-39fa6d8.30_1576879090341_0.8010753985924155"},"_hasShrinkwrap":false},"0.7.5-alpha-68e0cb4.31":{"name":"graphql-toolkit","version":"0.7.5-alpha-68e0cb4.31","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-68e0cb4.31+68e0cb4","@graphql-toolkit/common":"0.7.5-alpha-68e0cb4.31+68e0cb4","@graphql-toolkit/core":"0.7.5-alpha-68e0cb4.31+68e0cb4","@graphql-toolkit/file-loading":"0.7.5-alpha-68e0cb4.31+68e0cb4","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-68e0cb4.31+68e0cb4","@graphql-toolkit/json-file-loader":"0.7.5-alpha-68e0cb4.31+68e0cb4","@graphql-toolkit/schema-merging":"0.7.5-alpha-68e0cb4.31+68e0cb4","@graphql-toolkit/url-loader":"0.7.5-alpha-68e0cb4.31+68e0cb4"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-68e0cb4.31","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-vOhde6dtfgsG3+zqmRsaq0SXoSdsN+Q4GQHsNMgjDzCq376l/mHnI9IQug1wNJuxIbnXlx2B1K2So9y32JebBQ==","shasum":"48c5738f416b12414d727223240f996e8c356a14","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-68e0cb4.31.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAFPMCRA9TVsSAnZWagAAZRYQAIUm8b3J7GeGOepTrMiy\n3Fdw0ofS9VHcSewWA3SNZDISycK+yiouxnqm8txiIfaEEfBNUSdaWx/mWNHJ\nHauX5SF7lT8R7n+w7OvLMsHMGQZ1OewagA/yxYK8U9yYTnUQeQAvXDuTP40/\ngdKUjFMBnDiwH78zUjDzoB227w/981FAh7TYmwxyyo93vNF5zENVNMV1c01+\noLcJLbD/Oonx5m6AbsBqWSIS/IFWxsJzlruelixdm5tl5BEQF0MUpShDtSLB\n1/aJHof17jUH/6H9s1OSicMm3wIVGzrhkP9L6VVHUhBQ3UgzDVRP22VxIQrE\nYJsNkOw5fHiP4M9KDAsrmxdiQ2zYpgBUfQcv7CcfgX9aExi8VJRr537bfYOx\nbkw3mwlkM7EYCCNvwgZggAwOAmJIt9l3MbybelDfEKjU+OZ9lKsxtWI/jm/g\nWYIWspBY6qqQ1rWUi9NWAEoZWR5PGECXPLEENDymDH3BfqHXMUjhDwSO8UlJ\nDvH1Sg7i1r6YSFeN58C7H0AhsictGPpXv7r0mZ4kskRMBErIXJLVEKf7CAOh\nfpNj6MiR9sXi3bmgZbOomSBvpTGtY4ZwhsF3uRN+YmKz/gb/tpgGOwVeqFdI\nC+REqBQxHcobjhl/GpiUitFp0zQD60B4USouPfUF8MMDaGHzN/vgRdJ8oicW\nOeS8\r\n=9/NS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4rbTgwp1UKEA8uhHnHCnRi3BhqLIck+lrd3LBiFBK+AiA2McVbVZ2ZsUlTcBIQd7IDyHLzj+g/K/bsqIUlhjSlMg=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-68e0cb4.31_1577079756533_0.7811076758653699"},"_hasShrinkwrap":false},"0.7.5-alpha-772b074.32":{"name":"graphql-toolkit","version":"0.7.5-alpha-772b074.32","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-772b074.32+772b074","@graphql-toolkit/common":"0.7.5-alpha-772b074.32+772b074","@graphql-toolkit/core":"0.7.5-alpha-772b074.32+772b074","@graphql-toolkit/file-loading":"0.7.5-alpha-772b074.32+772b074","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-772b074.32+772b074","@graphql-toolkit/json-file-loader":"0.7.5-alpha-772b074.32+772b074","@graphql-toolkit/schema-merging":"0.7.5-alpha-772b074.32+772b074","@graphql-toolkit/url-loader":"0.7.5-alpha-772b074.32+772b074"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-772b074.32","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-zkrKOlw1gQrEKcA+0rAumvQBgD/cLLDKZTGR86B5tsGGwP3baOMlDXOleontx55H7Oh54IWOg5DqMf7j3dmNBg==","shasum":"7cf55e0214e495cae3b9ac01b1073dabdfc1b71b","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-772b074.32.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAPFoCRA9TVsSAnZWagAAvDkQAKJ835PPk7Xt3erz7Wxg\nNxQWwZ9Obd1bw4PcV730Zq0XbxfUWtvHd3WTh87+KB1LEh9/Lzfx0UUr4pS+\nSB9RAcMZFb08O/1+9woAzb88sHuAGMwrFjl3qJuNl1Oqu35Pl3Ny20QV/eLR\nFtDSrNlv9LxwWI9ZefFH92fmIzcByUHvgje8gXDhl0gwT+katEvOYdX1Qctn\nsKoO7hbwZkzIPItwXdFckns1GeOj75l4a4fi7HHu6TeWu9PKrm4UpWbCFZbg\nzh8SrGvSUC3ZYeamTur/pm2lO1fHoXsYU7X55PLL7jVTeyttQkgXeEUTp9Vm\nRsYMrNTYkqkj7D1ULhZbrNWH4UsXE2IPIeOKYgaAiXpMP9HpmAlr2lwZZi++\n+W9Xf3uVqQJ37ZKswPhv0MulllNCVxwHE1/WbBnESXXVIpKJOXNUD+EZXIv7\nivuRw+k9K/976QYVas47OfY29ijFjeRJIfjv4QLay+0ThAnn4SQOOrXQ3ALQ\nMPHD+tu2zJ9FpjUdJ4AFRJaRAb4crto8XwdnX+an8dqGjGSh4QcqwHnai6N3\nTVwiclX/W4dyWQm4ldK9qSwl9R+dM/RfWUdmSmO5tvW65WqnBkRdp0JRUtcr\nkRaj8uMOG55w6IAU58rPTnbSJtnY1AWHB1zlliN5h9Znmx1NQjsw5lFBD6zV\nfu3Q\r\n=Shd/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwtPt1y4/IIGFpB8+/YfxsAnNtg56es86Uy4zAca4/nQIgNLx4UYIoVPnJoG4rgDsHmMwNEzjQnQyXiY5llWxmk+0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-772b074.32_1577120103508_0.45133633406849394"},"_hasShrinkwrap":false},"0.7.5-alpha-7b42f83.32":{"name":"graphql-toolkit","version":"0.7.5-alpha-7b42f83.32","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-7b42f83.32+7b42f83","@graphql-toolkit/common":"0.7.5-alpha-7b42f83.32+7b42f83","@graphql-toolkit/core":"0.7.5-alpha-7b42f83.32+7b42f83","@graphql-toolkit/file-loading":"0.7.5-alpha-7b42f83.32+7b42f83","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-7b42f83.32+7b42f83","@graphql-toolkit/json-file-loader":"0.7.5-alpha-7b42f83.32+7b42f83","@graphql-toolkit/schema-merging":"0.7.5-alpha-7b42f83.32+7b42f83","@graphql-toolkit/url-loader":"0.7.5-alpha-7b42f83.32+7b42f83"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-7b42f83.32","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-4VoZtFXN11XuPu0UBnL+J/LVtW+8Gs/MqaEe8ANUwLJRAt5h7faNbePghvg/3tzoVTrGHT3/mqGoRjV3rsC1Ig==","shasum":"98db7068aa6a718f85b377616f2d8595aa1b9d78","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-7b42f83.32.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAPUSCRA9TVsSAnZWagAAySkQAIFRCG/o2AOyF5RsT1Tu\noC9whGmTeF/P+tfvMESLq+KVjoJ9Hic3/LkCcJKfqbH7K+co/MEaFTEJtdt2\n7S3FRGkYTx/j3Xa96PubSblJjOuhZswM8JQSSvShnaNOlNoo3N42paaEPLRt\nHNZ/sZOVuoOt8gRjsqfIfJlTWkzGEPpFqJ91HGnXL5Tu89Npu88vTH0G+dkJ\nBqwpLVwMj1OkiikQVDh6QYZHictO8QJqwKYJRQtM9XHfWZw7cYwyaMn9yBBC\nXdVwj8vwLK/gvHQ4utopMKS1JDxz4uP6hRwim36laEq+o1u9PwBRUX4qVRDS\n7FGvGiKuJ7V+r0sCDawLUmhXob+q72fAR9F+lYz9E+EAXrRTq9t+58mrnRzk\nY5ZkuEO60WLtw9OfyAAms1EStnMJEdzgCdam503zlkf84zK7U/9VR22yaMlo\nxxkWk86obbu7XvW26kJIHlk83fTItrtcQepu66X2CEpiDx1G5uARIe7vf2ko\nKTmiXDfPNzAmIoA1iYJXAszMQVJLquuLBb1MlNmcGlj8AFtjFEfvJnpD7Xcc\nuHALs2+ppKq7hzs3mvCBE3mjO8sii6s0k7+mEguzLV1O8Mso7+cDHSiczjiF\nAguEHaqCmRJdHD4dtMWrdBtFHL3AqvMEzZEfVi0VQofR4Jn+XO+il7YPN3GI\nsbJI\r\n=ggJH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDeW6uT1o4pON3lz8ivwFznNs23QqkueUhvYzy6vp4fjAiEAumNUYBA+tsr7O3b4aN9x5I7Iw4sqI3Dnsh3dLa126Kg="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-7b42f83.32_1577121041607_0.9973982020385264"},"_hasShrinkwrap":false},"0.7.5-alpha-9da21fc.32":{"name":"graphql-toolkit","version":"0.7.5-alpha-9da21fc.32","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-9da21fc.32+9da21fc","@graphql-toolkit/common":"0.7.5-alpha-9da21fc.32+9da21fc","@graphql-toolkit/core":"0.7.5-alpha-9da21fc.32+9da21fc","@graphql-toolkit/file-loading":"0.7.5-alpha-9da21fc.32+9da21fc","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-9da21fc.32+9da21fc","@graphql-toolkit/json-file-loader":"0.7.5-alpha-9da21fc.32+9da21fc","@graphql-toolkit/schema-merging":"0.7.5-alpha-9da21fc.32+9da21fc","@graphql-toolkit/url-loader":"0.7.5-alpha-9da21fc.32+9da21fc"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-9da21fc.32","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-Hy7x02dS4b2dffHWk1GlC4o2x+o99p9+mwCcnnik9a+zXr3JXK5gGd83u4+J7r1KMkunLY9pKQpiQimIg2/Ysw==","shasum":"bdc70d73380c079876db644fdb9bab2565d9bf3f","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-9da21fc.32.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAPUqCRA9TVsSAnZWagAADKEP/2MbGufmr5Dh1X5OqY9k\nHA6f905mlUyKc7+VIB6lKSPhaPOEemQg7AqUdceGiMaarm1MCm2ezBVc4gK4\nOr6doeLWRsmnCUHIK/TvT3xdpBVBV7cDF0VJ3uyKnzwx0fp8PL4vrMM+b/H2\n9RKjdV03Sl2MhxIjB7qqg1ECaN+h1R4ZS7p7lqlhj5rVo78L/mygBzzvNz2O\nEUqdFEKcSqFvB1cPhDylR8gyTE8Q2TLzQzU1rZItd/KB6DlxlQdJ9FMDOpZm\n+Y5izZZ0gz2dJHf+nGcw/P75zBbXJxikrnFkjgW47bGlxR71qEzJiXDIe+iH\npbJiqvODFMywsdWwxkluz1J8n1h1Arv5gHmNjr2O6HmRiq/vfzBpLw524noq\npn/YAbUW5iwh0zV8RYGrH4zo7LIyBM4UTZThHULirjOy/SQgWAZ2wvEbcQzE\nSdaA7eTK+rZEJUwtYzm8ojBkVpJiymH+CBHLJHJckgYA0HQKO/I2FjZzHL1F\n1YCGi+krXlxxSQdLrT0QxlexV8vJVXR42agPBLVjh9ySJu/RelC1JANj7t4q\nV5fdJNkdti1MtflCSbS7g/yN+FBmyNX8OAqm4yN5cuvyeikPXJUSlGdkkI3c\nkKzeFY98wwbNU8y4GZ7YTnCKyHZCl2pUbfdPerdo564dWExSUYDm/0u77mdX\nLeyT\r\n=44L4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBKCjcZVanwoBUZ5nJp9nNFnB/by9qv1ej/xhTRM4UUHAiEA6mUWnbU0P26ECs9e+dEl4EliHp30dNeqNbV10c0mBs0="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-9da21fc.32_1577121065994_0.43183238430888227"},"_hasShrinkwrap":false},"0.7.5-alpha-7059df0.33":{"name":"graphql-toolkit","version":"0.7.5-alpha-7059df0.33","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5-alpha-7059df0.33+7059df0","@graphql-toolkit/common":"0.7.5-alpha-7059df0.33+7059df0","@graphql-toolkit/core":"0.7.5-alpha-7059df0.33+7059df0","@graphql-toolkit/file-loading":"0.7.5-alpha-7059df0.33+7059df0","@graphql-toolkit/graphql-file-loader":"0.7.5-alpha-7059df0.33+7059df0","@graphql-toolkit/json-file-loader":"0.7.5-alpha-7059df0.33+7059df0","@graphql-toolkit/schema-merging":"0.7.5-alpha-7059df0.33+7059df0","@graphql-toolkit/url-loader":"0.7.5-alpha-7059df0.33+7059df0"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5-alpha-7059df0.33","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-THqM6svcmgt6NwQKrAQbEtOA5VYuyz6G99FWVndRHXjs12N10YKAvZSkTuo+byKTYtJCqEtMfjPoBNaAcTHMuA==","shasum":"c287d7efeae40da7a147f387b329978489907fa1","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5-alpha-7059df0.33.tgz","fileCount":5,"unpackedSize":7338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAPXkCRA9TVsSAnZWagAAPN8P/1SxAoFp1iZ2dJeyXQNm\nNCk2MUadIY3Y5u9Om0Nb6pTI3QG9/dYrdAgosQPbSSUp86vHQkYvPqaI0u90\niJnuGianRzUoOKj/CCdFHgz7MyPpEF90lzAhrtd3e/iur9vxFChq3oQ647wI\njwhSSLIXPfFgSwvKrf/RFJjt8DfELASAh4r/cOAE4Io2Ily5qjDZ8bz3rljd\njB3oXs9SZ5WHztZWeFTG8vSU4tYe15J9q4lDtamKFvj1wkJwkyvdjOCNeeOd\nxuXx1fs0h0ZNKYc0hOmUXpb+/1c4KNhrjeuEqo7jhZcVtgKYCvKgj04wQzrk\nl0YM67PWvgIZ21qr3A0LxXM+eeoUArDqsyC6Q6c8a8rjnbjKrlUwVEP2klMN\n81rf355y0KIKzZrMV//s/4wdYBUZSBdG/5IE8/c14cKO2+2Zcn2hyDQ/1uXo\nvey7SV73O+VHNmaNryMka+cS/NTgOnndCyzP53rdqrpcllfk/toC5dEbA3uP\navxnO8cUaImKQ61lUzl+hDJfMK1+0HUPJKHx8MhZQwgeb2MuDVCajYJajN76\nQMxlk8SoAbH9Q4OX1ftL8EQSr6ORTUB8bEl7RllFgKmLUZNAmHE09sbyLFII\nyFH2pPo/eRhtaBJU+UVCyuHXUJMjZ177/yGzKeB3GB4fImfHvGjQqWPWYsI/\ntYE/\r\n=YKNN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIELIPryvRTS3fE7LLlg7pUIOIYxTRaKV+c1HWRNMS9R0AiAi/Ao7lUcWcUUo7pyfX9dt9UtvPzcIr8u5o2bXkvREcg=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5-alpha-7059df0.33_1577121251958_0.8000213660447575"},"_hasShrinkwrap":false},"0.7.5":{"name":"graphql-toolkit","version":"0.7.5","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.5","@graphql-toolkit/common":"0.7.5","@graphql-toolkit/core":"0.7.5","@graphql-toolkit/file-loading":"0.7.5","@graphql-toolkit/graphql-file-loader":"0.7.5","@graphql-toolkit/json-file-loader":"0.7.5","@graphql-toolkit/schema-merging":"0.7.5","@graphql-toolkit/url-loader":"0.7.5"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.5","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.19.0/node@v12.10.0+x64 (linux)","dist":{"integrity":"sha512-8fagZhEP+bygbcW9uhYIzR7BVZLtobCJmO26fgbqJcnRqsFuclSg2fcrNJbeSGjefrEWHnFcgYcQehbSE8oW9g==","shasum":"72b7ad7568dc9c1178bdf77348c835f771b085ed","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.5.tgz","fileCount":5,"unpackedSize":7113,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAPwCCRA9TVsSAnZWagAA6F0P/0wm2w7+3GnDrS9Ccggv\nZqD7xGBDud21nbx4iAEbRzl6+/gvr9m9G+LHsmdysYW6XVKoujb8QBKWxEbz\ncnJo/jhH41qwwvZnJjRsvIZvb4fhozGsohYcEH9GFknRQCA+LOLcM0bmTtaP\nL7Dkwlc85hwxmNqPBawyGoEbYAx91lhJf1qt8vIshdSrXKF3BTvKBefHPoIu\npNqYrkf0MMfXz+ewZt43BoghycjF2GJShaMfXVAD+o+VqHow5J5P1mS9EpjM\nErKZDyIMLW0ORrKu4fVbbPFb5QOSwuL/cuSP/yC4ykA3qODEljYOtiBJu03x\njV54BJgATCqCotojG3xeRktckix1cwQN+oZhPWw8tVQw9kJKbmpx8q5l7V5J\nOp+baqcP/3oWwUOvl2Yy13ho2iVO37tGtd16K4xHOfdfxvKBe4FZLOY+J7yA\nA/AWgr6/lb3ZUWsO+zHyvP63ioL5fuL2HDY0kk6Hwvj30JF/VnIK0RIYcMI3\nkD1xXuEMt4ulfQeQHzPOz2cJDMy6mVJcUUEVM8x44EZBpxquEsnTQNOjylNI\njSNE9CvSVmd6xt0molb3me+hS/pTQ7sxahl24KeYHQByKtUl0UAUnRZAF/pj\nk+Rx+L3e2LYm2W4GTMNSksg+HDWVuKdi8h7vuhL3uvM+1yhp6Xzyag5lnM3x\no70Z\r\n=euym\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbMjS8CMopAfAblFZV3J1yKg+cf0MekN6lNhozc0i5/AIhAMMUsn+ykOpYzDLKwG7lWdWeMqyIm6+DQXq3J3ODGA2X"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.5_1577122818079_0.05135769467161211"},"_hasShrinkwrap":false,"deprecated":"Use @graphql-toolkit/* monorepo packages instead. Check https://github.com/ardatan/graphql-toolkit for more details"},"0.7.6-alpha-24c6fa6.0":{"name":"graphql-toolkit","version":"0.7.6-alpha-24c6fa6.0","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-24c6fa6.0+24c6fa6","@graphql-toolkit/common":"0.7.6-alpha-24c6fa6.0+24c6fa6","@graphql-toolkit/core":"0.7.6-alpha-24c6fa6.0+24c6fa6","@graphql-toolkit/file-loading":"0.7.6-alpha-24c6fa6.0+24c6fa6","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-24c6fa6.0+24c6fa6","@graphql-toolkit/json-file-loader":"0.7.6-alpha-24c6fa6.0+24c6fa6","@graphql-toolkit/schema-merging":"0.7.6-alpha-24c6fa6.0+24c6fa6","@graphql-toolkit/url-loader":"0.7.6-alpha-24c6fa6.0+24c6fa6"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-24c6fa6.0","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-c7j+l/fm0OTENKYfSfGFGDabAjoFl3A5iEyECZrBpAmBiFWf18sLLnNRznR5jmmShliLQPlHBjrwmwDN605n2A==","shasum":"821c0577d456baa11fe149972177a60781a12ad4","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-24c6fa6.0.tgz","fileCount":5,"unpackedSize":7329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAPyBCRA9TVsSAnZWagAA4qMP/1R3ThqT9MVl4r+tHyeQ\n8OUjoNpoaaYgmvXthgGcStadkb5gH4RjamOb0EPcWWSXOFQZy7PnQSjle0vJ\njUompDhg1JmB8+xs1YK37Zc5mYBcXPtIRchcgI5PC9bMajI+wtWiwpxbTfxz\nVsvEvGUVyL8R/r/rxpznWE7bIjXaArupnLTRntoPjjASG8l0sxvbqAR35Br3\nY88Q2G67g2oCwoQu4J6f1hbPKfTYRQhrplKoImS3SHxo731PgTtvLpyIznFw\nTS5H5fj2sDXkPgdSuoeAzdsONMQs/lbtNSvjAGZsBAhb3I5X6t3GZ0+NT7y7\n1Z0Gu3XDLBWtree/xmMj4EZrs6ReqT0MWaA26C8K41ycoup8q7uVXAfJ7c3o\nHl6lK5kyBTIPUNuXC3jb3XQkEJfUPUAw7lNn5ebmeTT1p7p5n+CJuVxf+NRV\nIOc+j1HTT3tKC84H6sh6m3grxSSNy+rjh2wfxyrK9MLMNPRnpLjnTBSxQ/OT\nQa8K0JKvUPA3uKV/J4vS9/umXLebtdMMSmzwbGxLBrZHMuuyYrz1Vhkg2Odf\nElYLHUG01c13rpPeWaUPMFfo9JiYmS7HB2NBJbmq2ACU1rWmrjRdUGtgP17r\nl6NAtxm7QTNECpgN8TVMkJualbc1pne4cDu72zFrVUReasNFI0YlBuZYKbMG\nYcOm\r\n=Bvcg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4i0afCtIX4BrgL3gWu89qOPwc+YSDt+2t6RlFIJ4wFgIgXU+NGJm9JDlnBLwDgB++B3PpDI2ZbyETEpRe4Ad12NQ="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-24c6fa6.0_1577122944968_0.629767367227456"},"_hasShrinkwrap":false},"0.7.6-alpha-a18a442.0":{"name":"graphql-toolkit","version":"0.7.6-alpha-a18a442.0","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-a18a442.0+a18a442","@graphql-toolkit/common":"0.7.6-alpha-a18a442.0+a18a442","@graphql-toolkit/core":"0.7.6-alpha-a18a442.0+a18a442","@graphql-toolkit/file-loading":"0.7.6-alpha-a18a442.0+a18a442","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-a18a442.0+a18a442","@graphql-toolkit/json-file-loader":"0.7.6-alpha-a18a442.0+a18a442","@graphql-toolkit/schema-merging":"0.7.6-alpha-a18a442.0+a18a442","@graphql-toolkit/url-loader":"0.7.6-alpha-a18a442.0+a18a442"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-a18a442.0","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-eKE2UdPgt67NlDHgvhoF2/8BcXLMJpihYoj1cXR60Mb5Y1kq7uTsxkdM7AfSoEcJTsf7rhfP+hnG/ifjMcuWTg==","shasum":"caf73b5d95b594b18528ad74f36ed9bc5e3cbb2e","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-a18a442.0.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAXdxCRA9TVsSAnZWagAA6cQQAKNse9kONCNHrMUrWlf9\n/ECc1aaJpIfEZwP0+3pDv/OPDtjZQGMYbxcmTS32eOKR75Ao/HZ4sDdRMxPI\noDoa2x+PJnFqj187/Pyn+kf6gtLwX64f/adFVKrlDTULvD7S0sjIZo+lYSLd\n+QWzuYGcNExZRvVpda0Hi9CDYVIW4YV+fCOPpNwscOoUBOv0l5upgCw3PRd9\nMkVWalNv1Gqk8WMC38S0B24rupbOHJhCryec7HJ8tstiwVcUbjo5xyl4Sikj\nl1sdZ8LLzAPSIo3TgIhfCBP9VzwaZp8v7efeWPWl+3bqBSiaHAYnQa3NpS9X\nJNYCrrmwrCgZ+/peh/g1NfNxTaIhsWJPq8PnNoH/u+6FXQVonKkLwZneOkTq\nbMO0tRqdAN5wIdvxQUoI6XSUSSC7WK80QR7VXsvp9NspfY+OzoqOkq3OXBlJ\n0PrSGdIrU49PR/v8tlImJXemRjhv0OEU8dkm+JQsiGB2V6vTDdqYtnWw5ck+\n0ZF0SY/u4yqH6b/Dq1h3Fl3ivcJbVmTpbA8aeRWHzhjALghwMZHUC7Tp0CJt\nY9NHVNya7W8RuAZosRbG1DOo7uduHDlpqOX8EBnVx0mLX7nY3oVpyPrl/H5A\nlacJEqGZtC5nAiBCfwVoQUEDrgbaDQL2B3sq/FGWTZM7zZ3AO/YRtyd2fw/0\n+lCy\r\n=Ebqk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAk6YiGxmfcufLGEOxp+PcJaUbwOevqmEQzazE/bcDWuAiEA7cC50xMK95QRWLlnvl+IuqWym334jH5GlBtn8Gj8iLo="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-a18a442.0_1577154416774_0.7387888450917854"},"_hasShrinkwrap":false},"0.7.6-alpha-34351e0.1":{"name":"graphql-toolkit","version":"0.7.6-alpha-34351e0.1","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-34351e0.1+34351e0","@graphql-toolkit/common":"0.7.6-alpha-34351e0.1+34351e0","@graphql-toolkit/core":"0.7.6-alpha-34351e0.1+34351e0","@graphql-toolkit/file-loading":"0.7.6-alpha-34351e0.1+34351e0","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-34351e0.1+34351e0","@graphql-toolkit/json-file-loader":"0.7.6-alpha-34351e0.1+34351e0","@graphql-toolkit/schema-merging":"0.7.6-alpha-34351e0.1+34351e0","@graphql-toolkit/url-loader":"0.7.6-alpha-34351e0.1+34351e0"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-34351e0.1","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-rRRW1SYQEL0f9/z3eDVhtMzALdIzyu/qvKgrM62inaA8y8L9JHaxn0fGeKfJc/yNg7RHaBPj/G3JuKpw7iDeMQ==","shasum":"8e0af747d108cd7b8d0e196ad3d7ee767bf24477","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-34351e0.1.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeAYO/CRA9TVsSAnZWagAADg0P/ibrZSLXuXEdFahrPbYK\nRHoJ4QC9dw7ABsFKYJ5W36D6DhMDqnRJTSKpM80CNweJZXQRhJfRhlq0GxR1\nT4uFxOdHwPzyBk+itI8sfTw+8ZA49FmtqqrnM0kH7BKiWbW0kvWHpWiwI3Rt\nJQK7w9BOIZMDv7klxY4EQcTQT/XG65NBZ1+sVZ4q1jYb0v/We88++m9CmoBa\nGURQVPubNE7ECySUGL2kaHQE3M9f4u3YfPW/Uaeu1elffd/gZDzSzHSvRy8q\nm8+7sKx2G6z4nBXZRoDTGSZJ+hME4IzjUruXIQS1tWkRjMd23JbA6VFq5wwM\n/jfXhyPCFT4BvlI8v196jdNEmbwJfRaFihJCMkgyjYU4prsLI74+Ofp8FAWs\n1dTfwR9k1+8aZXp50CyakPSyEDJUFq81NeozBNg3KIyCOU2+taaM8/uxFeYp\nOWW2liZ687QWcHswzHBoLgfHrA3LiGjET/c107oxPH9CP+MN85mCzZpUWqM8\nG62U7lt1DUxTx7jryBea8lkyxsqWQuWRQWjPPTOgNitc63O3FUxkW7HAtjbK\niCda8JuSfGJ04Fm2KZ744facQ17XlRbfKCWIz9VGox9oJX4lf15wEOq4GvjK\nv1i71IN1z3TmR24w5xiSZAPpK88XiUqmdODinBenudlaktSZuU9WyrHVQ+DX\n2uLf\r\n=JlFq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDuMv+DFA9iGyPGGHLyGWEob8kwnVmIjqpCFdILAjFKAiAdjUXjRIipkZn2YPIPvBE8WZuvXD5Hk27Mpmlu8SYAKw=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-34351e0.1_1577157567070_0.5165825607478707"},"_hasShrinkwrap":false},"0.7.6-alpha-87c2baf.2":{"name":"graphql-toolkit","version":"0.7.6-alpha-87c2baf.2","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-87c2baf.2+87c2baf","@graphql-toolkit/common":"0.7.6-alpha-87c2baf.2+87c2baf","@graphql-toolkit/core":"0.7.6-alpha-87c2baf.2+87c2baf","@graphql-toolkit/file-loading":"0.7.6-alpha-87c2baf.2+87c2baf","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-87c2baf.2+87c2baf","@graphql-toolkit/json-file-loader":"0.7.6-alpha-87c2baf.2+87c2baf","@graphql-toolkit/schema-merging":"0.7.6-alpha-87c2baf.2+87c2baf","@graphql-toolkit/url-loader":"0.7.6-alpha-87c2baf.2+87c2baf"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-87c2baf.2","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-nk2qqLF5Ac6tX12K9Tq6W75I9v5hwTyoearJkyMFAiBIBrB+eoMPzkjJtTYhYHeRll/Gw+ao9dALFfHwCIElnA==","shasum":"6d0000ecbb603360873a026428cf3828647ab1c6","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-87c2baf.2.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBOblCRA9TVsSAnZWagAAEyEP/RvadlwqMfEwTds06AqG\nLCaVr1lDEN6OBC09yXOJrNqpe8Jh7xnEQlO9z2is3gsG1zr3PW9ecQkOVL0b\nq/np7PD8+0wpt1GuqdJvt1E2p77qppnG3TbbKxdbYPBkmbRUgUVFIhgV2/xv\nwjFsBHBPpzdiLocndH2SIhWQ1zPJhZbSSOf0O2rMcWnst09vWuNxu+zb21In\nP/Mm8uKiNaWWI1j43/01bE4ZoyosCdkUdYNi+4k/KaxQw2cd4JdS+2UPmF9y\njQv/bWV8lUUeepzoWNcBkkxqdZsRtH+8iBmora6QCLuxjTkR/JEHYf8oAY4a\nzhMh4b3wRw1Wuo+xfdc3Pg5lRGps4sRMcxjynFjvKfMXqAfhXuS5V+YpZGv/\naNOoB3k0ohOxlcrti5q8QSyIU475T0AfKtrle2/lWi2GVuMjepsTQl/RHQoU\ntJ4K2KXTLpwBFQuuwdWQIOswCgcoZWHO1vdoJc8OyX9sJzHqCpE/kodnZzgQ\nWr8pxDOoRfZ6L1wSdLDBFSWvWsXAtA5FMzYR8K7cXrk+CRvVSUUNXHtek6XH\nhjZk0QJ4rvrnvRqfNMPM1xjjH/L1KeCDBJ4owPhYQtw0NO2sxqaDbLQWxfT1\n3/JI2EeT9MBXHt8wWZxC0VL58P7QWO5N+HxHoxK3ukI0WK6SZB8yYL/GLncm\nFixQ\r\n=6DJE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDLtcP+NLjYCJk7cvR+LTbvYva0Vk4kbQpeJ87pUQKQcAiBFTtWM3qgWFHqc3f3+YN/qYN/EElvuPWYE9wwzcDFf6Q=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-87c2baf.2_1577379556787_0.526932267709789"},"_hasShrinkwrap":false},"0.7.6-alpha-0b0b18a.2":{"name":"graphql-toolkit","version":"0.7.6-alpha-0b0b18a.2","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-0b0b18a.2+0b0b18a","@graphql-toolkit/common":"0.7.6-alpha-0b0b18a.2+0b0b18a","@graphql-toolkit/core":"0.7.6-alpha-0b0b18a.2+0b0b18a","@graphql-toolkit/file-loading":"0.7.6-alpha-0b0b18a.2+0b0b18a","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-0b0b18a.2+0b0b18a","@graphql-toolkit/json-file-loader":"0.7.6-alpha-0b0b18a.2+0b0b18a","@graphql-toolkit/schema-merging":"0.7.6-alpha-0b0b18a.2+0b0b18a","@graphql-toolkit/url-loader":"0.7.6-alpha-0b0b18a.2+0b0b18a"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-0b0b18a.2","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-V56xyflqu0WyQLAbgTX8OVwGz2ZGwNmK1x6SFiOQrgM4zwglmXaXFDqWoc5SGXNlLIwaB5Hyr49omAe5DKg9Aw==","shasum":"a5812c8f39839aa07ad4796e6ac72cc3a076f062","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-0b0b18a.2.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBOleCRA9TVsSAnZWagAAaNgP/1LdZFJdXIkAxO59uXuk\nowr3WQRBZVI2hvod3dlU321WzrqFOihp5Eo4LAjGHmOxtQyOZ3pN2bw2aywt\n9IbN5O4jjdmck6NdmGaDbEmYs6uA8jugsEpCyxPnQ0mnywVgDMjBItHFHJHz\n+2CDQekMAG1cXz0zpytmDSnOgruWg9r1VtQdi8V7HYxnLrfD6iCK663HZ1V6\n9bT7wNNLJuqWKsd0ETNhqR5ocLk1bjhYKOcsRD1oIlXT76xIKBaFyPVAOCQw\nwPKDuSGyRPMd4ZXQhWaJGov7tr6ul9emnNXWH5nA629nFL8DZdsGVwwQLU20\ncJsL50XWq490ZGaFmjGp8P5k27JaGi+Y7mtbzusSUPHKqJPGUmNsg1Bjh8wY\n8GI+nt35qesQFc+DNS7IfR2eFkkDt/M5JqWCFCCkuiPolvupenlZza7mnPpN\nFPIUHwptIvEEIzuKTTRv5ETDtVsZ5ZL2t0pUKA+KFR4gAinrw+9ie3NUoD/r\nZtSe94TmKlCKJGKo13l3HC22S5yTu1qLu8DZ5JOv6+yTwUH2T+VSIB++dpUe\nGuC30Wer3eGm7Djx6WbjE6g+L89w1AxoEwl695bWTcERwQ0VNdaEaQqoU2s4\n0Vn9KJVkqtmN3CJ3jGejXpqwx7lbVvsnmJJb8MYaS207yirMsaH4yQNvmtsZ\nz7IW\r\n=v8wS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFXQ88O6BoB5pwNYN570GVN3uaOgjMSLz4fpEmUKorLSAiEAzHq09Zfktf5RqZ7/09nhFrLkavBeAuF5rsHOLDGr1dY="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-0b0b18a.2_1577380190485_0.4182386764430319"},"_hasShrinkwrap":false},"0.7.6-alpha-99ccb3e.3":{"name":"graphql-toolkit","version":"0.7.6-alpha-99ccb3e.3","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-99ccb3e.3+99ccb3e","@graphql-toolkit/common":"0.7.6-alpha-99ccb3e.3+99ccb3e","@graphql-toolkit/core":"0.7.6-alpha-99ccb3e.3+99ccb3e","@graphql-toolkit/file-loading":"0.7.6-alpha-99ccb3e.3+99ccb3e","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-99ccb3e.3+99ccb3e","@graphql-toolkit/json-file-loader":"0.7.6-alpha-99ccb3e.3+99ccb3e","@graphql-toolkit/schema-merging":"0.7.6-alpha-99ccb3e.3+99ccb3e","@graphql-toolkit/url-loader":"0.7.6-alpha-99ccb3e.3+99ccb3e"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-99ccb3e.3","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-l2SUlO4K11SVF0a/O2aGK/LWlECeuoSeBTkspIEuPFE2P3XAAUZgA1huvlaZGoduFjmdp51sYAYWpWQrFmnDtA==","shasum":"36e667bb9a3b7f6da13e22c5202203f928b3db86","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-99ccb3e.3.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBOzzCRA9TVsSAnZWagAA6bwP/2kpz437VwqwPk+Ofw7B\nkS6YMkhHFW89A/ErezKdbSDw6dDb3BcX1WJMvK4n+MztdQ7CIz1SCzApdZ88\n9wEnDIzjwennkCYtcK6QeJzQVEVfiKlsZvJGTcTzoxC6CZNAhu3WmiG7YBme\n73AYWIlmld/qsLcvalIz/Wq9cLp3BwTLt/BDy/axy1vZnsL2KcOAQFlZtB0v\nU9Ts4s543j6DeUIO8uvaW2UcLBEi36/lEaYuuj+HHkFIwB3zpJNIS9DppsmL\n2Sc5ODH3cMpjqENwIjjuAajAqQ3hoYsdSAYnJPVzlJIrav0GOzGh2ZJkCcOZ\nHvC4GoJAs32T3MN9uWKAVb3PkUGLRbTm7Y4fJedPoQAiWUHUwSOAdyfTdNrz\nbjb9403eSTvLeV2f//tM/7So5sJKLmf2sob6ZlOSBeeSXp+DPlmwIOZ9U1G1\nZkUHjNvDrDx3ZpHDu3p9YYq0S1cSCb2QU4/C2OBA7Dw23Zv6qtGZ0VwE7u2g\n2FwZojAAYjhWKJ9jEUBorby6imM5HjB4qJUXe9zI9XZC/ghpXQ7oGLvk1XKJ\n+u+bClNoJjRqUerGdJnlq7Y/TmwiTyHbFYk5x41E6lLRHo/atW9tKm1qkYal\nfDj/Sog86sN+LZwCGyyFkTtlSsmfvdj1Lf91KPu2GlZwpARJe36LDV+PgU/b\nZe1y\r\n=knxB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGtcJYDBNeoXTKouvNXSaG0pPd1HgrybxUXd/ZctFnE2AiAQtrYuY+631EAhpkTRfsbKa0BqtUoYInKJTYQiCT1xHg=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-99ccb3e.3_1577381107279_0.9595917160026843"},"_hasShrinkwrap":false},"0.7.6-alpha-9c6dde0.3":{"name":"graphql-toolkit","version":"0.7.6-alpha-9c6dde0.3","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-9c6dde0.3+9c6dde0","@graphql-toolkit/common":"0.7.6-alpha-9c6dde0.3+9c6dde0","@graphql-toolkit/core":"0.7.6-alpha-9c6dde0.3+9c6dde0","@graphql-toolkit/file-loading":"0.7.6-alpha-9c6dde0.3+9c6dde0","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-9c6dde0.3+9c6dde0","@graphql-toolkit/json-file-loader":"0.7.6-alpha-9c6dde0.3+9c6dde0","@graphql-toolkit/schema-merging":"0.7.6-alpha-9c6dde0.3+9c6dde0","@graphql-toolkit/url-loader":"0.7.6-alpha-9c6dde0.3+9c6dde0"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-9c6dde0.3","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.19.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-ruZO5cTvy/yXAPmbwnPGszOCfDSbtEC7GIGZN+8WTCJD7tLYraNU8WA8WKE+c7yyUR4zPp7xYbLn6TAkBEjTrw==","shasum":"a9d4dd5bb66874e3c4bf998127fcba6f3ae0adce","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-9c6dde0.3.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBO6LCRA9TVsSAnZWagAAwMAP/0rpQ0ufmU49wOiSNwhR\nMpPWV4mGJl2PbI8487KsxWYlxTDZ6kpoZiWPw0P7h2800tt5bT2Rtw6Qj5Wy\nqKLhmKe1vo7z+HqlUrGh1oAZfte46taJjVEfd1C3eWhST2OX5VREjMOdV4R9\nPBm9cCiKVmCgpgTM+7OwnTgKJlGmBq5rBNIRA305nY1ypoBOl0HnSdCQaPt+\nVEcUGHGO6vNJFqFPfSwGgBwP7qG+3vK0MsL77pbeXfAJOoUTdARcgWgKrFgg\nTlFMcMtJz+D9pB+8CXx+cQt+4Z2GYwFNtVV2pcoku4Qj0qhnUDZsOPwENKna\nuWimFiEn3KWAHvVZcLHe7ayKUWCjl2fdNO5QbG1fRZOLxB9NkgCdTrD/wLLd\nbqsVfXJ7zvec4KIlqOfBmiLc5urxJJcPOC3zng7Dcu/FItw0zNBdXc1u7Gji\nQOoS3cMcYxZHFbh5tVLwov4Azsx59vXQ0bjYMvv746jAgomQaHvX1WDIvtCb\nJrmT16G5Zlxz/OGRyjnkUBu34QhpnxFY1aLXaASVBCDyOfFBzNPeXmxjVEra\nos/rxbKUMfpg3TidT4qIWfefqTvbZrwgzuvwtdx+WVaf/MUMyleaaNKA7Hnf\nqdFt2k/KGSFEMSiEYNIPGN6BzYYiWoOpOqF7VODZdYWAjw6OMOp2ajqoENq6\nCXmZ\r\n=Da6A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/VowsZnclQ5221QMU8aM1jjNoagFWz8wo5Ju/Iexr2AiAZqDlsBLzCKePeHTUL33GlanBHD7g6S4j/ch2wwN5y/A=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-9c6dde0.3_1577381515177_0.7942528470948809"},"_hasShrinkwrap":false},"0.7.6-alpha-f09c6ad.4":{"name":"graphql-toolkit","version":"0.7.6-alpha-f09c6ad.4","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-f09c6ad.4+f09c6ad","@graphql-toolkit/common":"0.7.6-alpha-f09c6ad.4+f09c6ad","@graphql-toolkit/core":"0.7.6-alpha-f09c6ad.4+f09c6ad","@graphql-toolkit/file-loading":"0.7.6-alpha-f09c6ad.4+f09c6ad","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-f09c6ad.4+f09c6ad","@graphql-toolkit/json-file-loader":"0.7.6-alpha-f09c6ad.4+f09c6ad","@graphql-toolkit/schema-merging":"0.7.6-alpha-f09c6ad.4+f09c6ad","@graphql-toolkit/url-loader":"0.7.6-alpha-f09c6ad.4+f09c6ad"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-f09c6ad.4","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.20.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-gtwiHsHFi6lzBP1CH5V0tLddJMGTYuzjWnhp4uckUtDSg5rPVSoxSaK0Pp99VT/se6Jcs/CtWB6DvDfL3oX+Lg==","shasum":"ff392e7b776d50dbe47d2b81fa0352a76a5f2701","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-f09c6ad.4.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBndQCRA9TVsSAnZWagAAqdYP/jyzk0FuUDpItBMtrLmc\nH/x/RaxWs6NOwA3WTFFa9l3WG50utLdXm+ssofZWrj37M19JEukDjxCUv4LJ\nFDuo61WOr8mMmN86p11QAKSjXID6XOOsu9PVr5AaYfIl76Umj4N0s8s0LBP/\nZ5W45cmfMC+3BJP82OcXhr2EBSOcy378Jrhz1yiCbFSHP/+ClkP3l4Gu8cSF\n/imOUrsF6nhbSJkjRVOy7vj/ea6tv3zlU9yi1AVX0Q+sTF2rTbpoAMgHwBjh\nfAVWIDdAjUQEdLJ+v2pmW+GXjqC50T2T2E2MjQWZfAmxOKIkB7PVxMk0Y90+\nnMZwF/MV/ewmTNrH5iGRXI2o9dw149VigX9LoZbzLmBPtAhLG/PDPEj2CaQD\nprEgdLxHvs5abGD/Wyapw70Ou532WEqgA5ZaRQrQItGEwkdkykv6Zdm1f5Qu\nmYH35wGOcStdKpNMLmDO65EG5/+5jHAN9f3szJjjcmMoMZlOVFdiB5V5mLhy\ndU1Zq2XtW61WrugPvvkK/eNEQn6sj63DDk+unnq93JXmU4WM4hdGWqGnMBNk\nryzFha89cYG0SNwOj/vvhErWCL3ALnmMY1EQHzYBpWur6wZrEGXDLctNqIjk\nbWLxvtcSBlroEkOVXPA61ppxsAWtHcI8+LJJTZp+QKU9l1EF4fdp1/SKHjo7\n5nWz\r\n=tc7t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDX3eBt47WHaId0ViLS4M4aK0wpkWXCc79twjDEvG3JXgIhAIi+b6hovbA9SFf1v6ViHjqY6pXlz413qiYDiFOgP0oZ"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-f09c6ad.4_1577482064304_0.6146500451733432"},"_hasShrinkwrap":false},"0.7.6-alpha-979532c.4":{"name":"graphql-toolkit","version":"0.7.6-alpha-979532c.4","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-979532c.4+979532c","@graphql-toolkit/common":"0.7.6-alpha-979532c.4+979532c","@graphql-toolkit/core":"0.7.6-alpha-979532c.4+979532c","@graphql-toolkit/file-loading":"0.7.6-alpha-979532c.4+979532c","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-979532c.4+979532c","@graphql-toolkit/json-file-loader":"0.7.6-alpha-979532c.4+979532c","@graphql-toolkit/schema-merging":"0.7.6-alpha-979532c.4+979532c","@graphql-toolkit/url-loader":"0.7.6-alpha-979532c.4+979532c"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-979532c.4","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.20.0/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-+WYsjoptGROVzOeSYrejDxmTZpVmT3modygBA/c+CderpfG3KdMWJuZ4L1Rits32Buk/D238mW3wB09TWMhDKg==","shasum":"b5872f39124c0cb1c5801c4e2e3d3b4e49c7b4dc","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-979532c.4.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBnkPCRA9TVsSAnZWagAAfcwP/0drea0nLScfzrbKl296\nrfTZ44L8wp2e4tCTZW/dzgOuuIxxNOA246s8uAUKbQkBEIrZrliq5J6Rcbqf\nElJ7HSgdGsM9CUu1bi5W09KeFbpdXcD4StXPrctOfpTHoYP6kP4CEaHq+Cnl\n3yS47VtFm2uv+G3alNdecRpUSgpPYbzhgwt5CK0t3QwVXNwjp49dChi3fbm1\nz7TzW1WIME5pHyPXhvmS4/wLcBCzX7sGxtf7dP8oKkEXD1bQekyoFfRqOJVY\n8QQ/FPpqpKLbVJSweBg7RJb5Tz4pBA0hnLJ/Wj1RZWw41Lz7w8U13lYbuXvR\noqZGzQpW/PHttdXHGRv81mBksS5SXIEk/DVmGdBTJ7zqykEU/cnJfaQ5iMky\nPeBQDCH0H6WFEJXG1XU+o6tTE8w7OcWDmdOOxVn+jFrfj9xCym2789o9H6tb\nG3LKZjFaZ2bbSBqZxaJa9YcdwHeSKx5TFiRH0ma2754pS0LI7ruIh0OTavS7\n+b/Q3g+1CRVq2bGeT4GsdPydq12G0e7HvUi+hR95NUR6rDJ6CRnJI+oHD+Hs\nZRYeVQJvE4+xB3r4rPbdE29aOlMIs0fSBcsoORM9pa5JJI5C7ZlUmVGAYC7Y\nK/4rdxMRemItNLYQTImSu9JDLczDQ50S485x6t/jP586L/NnSplLpE1mwq1E\nNRdF\r\n=g2kI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3LT2qn2ljEtJCKBmfBrVIVfX+CpL6+JFMD/iupQX+TgIhAK/CxaFmlitLdbK3EPZEvFxgdt2HP/uHwFmFsnp4k9KS"}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-979532c.4_1577482510789_0.9324269989831111"},"_hasShrinkwrap":false},"0.7.6-alpha-39f1fbd.5":{"name":"graphql-toolkit","version":"0.7.6-alpha-39f1fbd.5","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-39f1fbd.5+39f1fbd","@graphql-toolkit/common":"0.7.6-alpha-39f1fbd.5+39f1fbd","@graphql-toolkit/core":"0.7.6-alpha-39f1fbd.5+39f1fbd","@graphql-toolkit/file-loading":"0.7.6-alpha-39f1fbd.5+39f1fbd","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-39f1fbd.5+39f1fbd","@graphql-toolkit/json-file-loader":"0.7.6-alpha-39f1fbd.5+39f1fbd","@graphql-toolkit/schema-merging":"0.7.6-alpha-39f1fbd.5+39f1fbd","@graphql-toolkit/url-loader":"0.7.6-alpha-39f1fbd.5+39f1fbd"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-39f1fbd.5","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.20.1/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-BSP1UvalbZoODVsahEPXstFMAKXWQ8EcaAvFkfETbNj4IpOVCNmKWYDrS4YnPS27kQPQS/EgmD0H24E1A2VZPQ==","shasum":"8388cf9d04b204805f41a3743143be7189af1ce0","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-39f1fbd.5.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeCSbDCRA9TVsSAnZWagAAbYUP/i/76tCqR55ZqcepxVng\nzk+eCSkBw8Bhtx/fGHwQtYNh/KmwNs5KrV5vehmZgWI2yxvTeRK+pjMBzx43\nj+oePACskIs3MmXLxo7r5WDCnSpXerUzP8EX/UuxRXJis7RFpqc3nveqACDe\nYVOsHirv26b5WZQjWqkBLvKVqBiD+1sFW3rKFbVsmi+cxsyEFr3xpt21mZBm\nmhS/Pi2iTCU+MhbOWRYH/DjdLvJDhArX7tIgb1iHmyPkAwO8NjggkJ+1G7MU\nRCeypmN3MoeuE5QnGmp0ic9MYXBWdtkVZ++kIQ1bR85bgZ/DzIJ4kV5Dx3Vv\ndD2BE2LHQt1Enr88c+9JyhK6fAByFbe6C9f1322RfS87ymjTG2/kwV9koraA\nmqZlwmWzT1dWCBM/Hl7OyZ3D/y60mJKbNnPLFcp1O6SuCp0MpBSoqWXFrbIJ\nJ+LUUD9FbWMFNWtobKp7raEiW3+PO48UUQSXfOD+83Kh9dVNZMbSlRITXeWz\nIKO4c/ymm/hQTYPH5b40TQ4Gb6WN4ksK+m48M3PBOGlbtv/i/QKiBzbu0ByH\nv0wCrPk4MQ21uC6hzm0Z+hsLP4EcuayEl8JAgxM3t+uGLqj19FsazlkMwTSH\nm+Mp75EpnwuUXhQPZY2nTBD5pAN8VL9whGt+jkhAxrCsc6dhml8lLmntzLax\naxT7\r\n=e/lP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBNqrKEvDVHABQyKR6OA0SHWMiCHnx/Oj7Q/Y/k3WScvAiA+sd4Kf+sF8I7UFL+flu1F+8WNjShPnInN3iEmG2N5Ow=="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-39f1fbd.5_1577658050595_0.770562102521577"},"_hasShrinkwrap":false},"0.7.6-alpha-e4b4704.5":{"name":"graphql-toolkit","version":"0.7.6-alpha-e4b4704.5","description":"Common package containting utils and types for GraphQL Toolkit","peerDependencies":{"graphql":"^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","main":"index.cjs.js","module":"index.esm.js","typings":"index.d.ts","typescript":{"definition":"index.d.ts"},"dependencies":{"@graphql-toolkit/code-file-loader":"0.7.6-alpha-e4b4704.5+e4b4704","@graphql-toolkit/common":"0.7.6-alpha-e4b4704.5+e4b4704","@graphql-toolkit/core":"0.7.6-alpha-e4b4704.5+e4b4704","@graphql-toolkit/file-loading":"0.7.6-alpha-e4b4704.5+e4b4704","@graphql-toolkit/graphql-file-loader":"0.7.6-alpha-e4b4704.5+e4b4704","@graphql-toolkit/json-file-loader":"0.7.6-alpha-e4b4704.5+e4b4704","@graphql-toolkit/schema-merging":"0.7.6-alpha-e4b4704.5+e4b4704","@graphql-toolkit/url-loader":"0.7.6-alpha-e4b4704.5+e4b4704"},"sideEffects":false,"bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"},"readme":"ERROR: No README data found!","homepage":"https://github.com/ardatan/graphql-toolkit#readme","_id":"graphql-toolkit@0.7.6-alpha-e4b4704.5","_nodeVersion":"13.5.0","_npmVersion":"lerna/3.20.1/node@v13.5.0+x64 (linux)","dist":{"integrity":"sha512-mb34f4Dt76aXDp3q1q/7XhoYknCPDJIGJnosbUZ96nKbZJjVljuXcNAiiaKFbv65ZQnykY4vtP4ftu2M/YeFug==","shasum":"faa4a63694d7deaa8ce3d3a27db29a869ed01116","tarball":"https://registry.npmjs.org/graphql-toolkit/-/graphql-toolkit-0.7.6-alpha-e4b4704.5.tgz","fileCount":5,"unpackedSize":7656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeCSevCRA9TVsSAnZWagAAICkQAKDlpympDVPPinjLQNIq\nKgi9Q48yHlYElkSiGVmJj1GW0C5uBt/QwvbpKnAPQxr2EbUWBHeIxTSRKzld\n6QPsoFFd1849+ZQxm8REs+ifNE4De97bCXPvQ8udIOcDCoh87jiMZPZ2g7u/\n6fuVfPwTOjdXx1iM+191oZQTT9XZu34tzcZPYvl5tLhNXpxWTal006+iVLCR\nMbbwz4m5qNKEKxQoCpdSm625wdU4LMF8oCPx0MXsdx7KbVfOh8aJwU/b9UBs\n9pkEOhdfrpOo0pGmLOwMj4gA3dpxu2s1AHHVivMVwuOrWMuVsqF6dB1SxzEI\n3Bs/4PfmRJ0aoceA6f/TAc+ZKA3TXk2xZ91MVX9d5LuQc4S+4+XKy5PsE6Se\nfEMPUSXXYRlSF74hkxKH5wIFUfcv/Z2+M5KogbVKM/4zeTo+ou+iqV9ca+YW\nksqYCxVXnNju3WZ5zzGgqvqH9nIa2qJr5PUFBMwJJQJTU4lYM1q/a5EPLtxk\n36+sYyCikpFk5J2wfLU4japN1/El1liKKFTm0LIQYxEkZl67tNOy/Z8iJvEj\nGbTWzfE3WABjp/Nt6CXV8j6kBQ5NGCtZc8Dwea11Q7uvdNyT4AkeviG8zZUh\nER72+x+sjp63pMSsi/hRcK7qTxfOoVpahVMwEcHE8A5VpcfRifL0h1SoQ2bn\n0DWQ\r\n=8AZT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7Uufu7MPrEgZ8i73DcB4VBqHMUULJ6P/MGkv1ZXA5XwIgEu76d8tXRAOm5npIL+v5dDv04Lo5bY4d/KQY8JLsESM="}]},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-toolkit_0.7.6-alpha-e4b4704.5_1577658286965_0.44151043923218913"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-30T08:50:49.445Z","0.0.1":"2019-01-30T08:50:49.576Z","modified":"2022-05-04T03:19:44.495Z","0.0.2-31f5e64.0":"2019-01-30T08:55:37.557Z","0.0.2-4c8006f.0":"2019-01-30T08:56:23.700Z","0.0.2-3327985.0":"2019-01-30T08:59:00.707Z","0.0.2":"2019-01-30T09:01:39.410Z","0.0.3-57e0167.0":"2019-01-30T09:11:54.752Z","0.0.3":"2019-01-30T10:14:57.911Z","0.0.4-a0b19ea.0":"2019-01-30T10:15:46.868Z","0.0.4-3e9a946.0":"2019-01-30T10:54:50.378Z","0.0.4-e3e315d.0":"2019-01-30T12:45:42.496Z","0.0.4-e483b20.0":"2019-01-30T20:54:02.684Z","0.0.4-11e25a1.0":"2019-01-31T07:48:25.868Z","0.0.4-4a4de6a.0":"2019-01-31T07:49:06.734Z","0.0.4-75305e8.0":"2019-01-31T08:19:45.574Z","0.0.4-eab232f.0":"2019-01-31T08:27:45.505Z","0.0.4-74af3d1.0":"2019-01-31T19:48:31.448Z","0.0.4-9c4ed47.0":"2019-01-31T20:09:20.739Z","0.0.4-a6b8085.0":"2019-02-01T05:40:27.539Z","0.0.4-136720.0":"2019-02-02T18:33:56.273Z","0.0.4-1bf2a79.0":"2019-02-03T06:23:22.314Z","0.0.4-cf5457c.0":"2019-02-03T06:23:30.487Z","0.0.4-8ffcf11.0":"2019-02-03T08:20:36.579Z","0.0.4-65a7985.0":"2019-02-03T08:22:31.709Z","0.0.4-a3945f0.0":"2019-02-03T08:26:41.434Z","0.0.4-ac5ee62.0":"2019-02-03T08:27:16.446Z","0.0.4":"2019-02-03T08:29:40.879Z","0.0.5":"2019-02-03T08:30:31.380Z","0.0.6-47a76be.0":"2019-02-03T08:31:19.997Z","0.0.4-008a290.0":"2019-02-04T07:29:38.403Z","0.0.6-8cfef86.0":"2019-02-04T07:34:39.042Z","0.0.6-1c46514.0":"2019-02-05T01:22:00.099Z","0.0.6-7614969.0":"2019-02-05T01:22:16.563Z","0.0.6-d5180f2.0":"2019-02-05T15:34:45.496Z","0.0.6-4a99532.0":"2019-02-07T15:52:03.941Z","0.0.6-b52b7e0.0":"2019-02-07T15:52:08.434Z","0.0.6-ce0dc34.0":"2019-02-07T19:35:46.735Z","0.0.6-44021ea.0":"2019-02-08T00:41:18.077Z","0.0.6-405e218.0":"2019-02-08T02:24:50.028Z","0.0.6-4ab4931.0":"2019-02-08T05:28:03.071Z","0.0.6-e089b8a.0":"2019-02-08T08:00:07.130Z","0.0.6-80f7191.0":"2019-02-08T08:00:28.859Z","0.0.6-a9f1c45.0":"2019-02-08T21:30:09.104Z","0.0.6-58ee6b4.0":"2019-02-09T22:33:36.501Z","0.0.6-6d690b8.0":"2019-02-09T22:53:29.766Z","0.0.6-fa36d54.0":"2019-02-11T00:54:59.188Z","0.0.6-b5b65c1.0":"2019-02-11T09:25:08.943Z","0.0.6-eb67da1.0":"2019-02-11T09:31:07.697Z","0.0.6-24c4522.0":"2019-02-11T09:31:59.322Z","0.0.6-6c8f470.0":"2019-02-12T00:54:35.037Z","0.0.6-28ade47.0":"2019-02-12T02:17:10.907Z","0.0.6-d8927a1.0":"2019-02-12T03:19:06.122Z","0.0.6-e1a0312.0":"2019-02-12T07:21:24.691Z","0.0.6-65bc14e.0":"2019-02-12T07:56:51.886Z","0.0.6-9602acf.0":"2019-02-12T08:08:25.821Z","0.0.6-85b1fe4.0":"2019-02-12T08:08:31.330Z","0.0.6-73408ae.0":"2019-02-12T19:40:21.629Z","0.0.6-ad1a604.0":"2019-02-12T20:53:07.932Z","0.0.6-89554cd.0":"2019-02-12T21:13:26.485Z","0.0.6-1630e8f.0":"2019-02-12T21:56:24.991Z","0.0.6-0c337b3.0":"2019-02-13T00:13:25.799Z","0.0.6-a951985.0":"2019-02-13T08:28:04.849Z","0.0.6-e0d719d.0":"2019-02-13T08:28:27.442Z","0.0.6-1718593.0":"2019-02-13T09:54:23.645Z","0.0.6-0a07751.0":"2019-02-13T10:06:14.005Z","0.0.6-5d1079c.0":"2019-02-13T12:09:37.876Z","0.0.6-c1ff403.0":"2019-02-13T19:06:49.119Z","0.0.6-783fd34.0":"2019-02-13T19:42:43.008Z","0.0.6-bd956dc.0":"2019-02-14T04:55:11.176Z","0.0.6-7ea81cd.0":"2019-02-14T04:55:23.828Z","0.0.6-a2f0179.0":"2019-02-14T07:44:25.189Z","0.0.6-87d7109.0":"2019-02-15T17:28:08.551Z","0.0.6-75d576c.0":"2019-02-16T03:15:22.814Z","0.0.6-e0308f8.0":"2019-02-18T07:52:43.047Z","0.0.6-88c48e0.0":"2019-02-18T19:08:57.349Z","0.0.6-fc51064.0":"2019-02-18T22:18:40.072Z","0.0.6-f8f8869.0":"2019-02-19T04:20:34.079Z","0.0.6-6f0f152.0":"2019-02-19T04:37:37.516Z","0.0.6-ddee125.0":"2019-02-19T05:01:54.982Z","0.0.6-bb6b66f.0":"2019-02-21T16:59:30.406Z","0.0.6-d6598ec.0":"2019-02-21T22:38:44.305Z","0.0.6-582efa9.0":"2019-02-22T04:51:39.431Z","0.0.6-67ccd2c.0":"2019-02-22T08:17:57.711Z","0.0.6-b3343a9.0":"2019-02-22T22:31:10.093Z","0.0.6-0f4c37a.0":"2019-02-25T03:09:30.336Z","0.0.6-95821d8.0":"2019-02-25T03:09:36.682Z","0.0.6-39b9126.0":"2019-02-25T03:16:39.789Z","0.0.6-0c2a5a2.0":"2019-02-25T03:19:44.294Z","0.0.6-65160a9.0":"2019-02-25T06:41:28.391Z","0.0.6-45011fb.0":"2019-02-26T16:37:19.598Z","0.0.6-56a083d.0":"2019-02-26T17:58:33.687Z","0.0.6-54bd718.0":"2019-02-27T02:20:01.776Z","0.0.6-2b50021.0":"2019-02-27T07:49:36.541Z","0.0.6-8858a0a.0":"2019-02-27T07:49:52.137Z","0.1.1-3dc4d04.0":"2019-02-27T09:32:04.056Z","0.0.6-52aeae1.0":"2019-02-27T14:28:14.402Z","0.0.6-591f47f.0":"2019-02-27T14:29:31.431Z","0.0.6-3021abb.0":"2019-02-27T14:32:57.153Z","0.1.0":"2019-02-27T14:35:05.663Z","0.1.1-bd40ec7.0":"2019-02-27T14:36:18.927Z","0.1.1-fb3ed1a.0":"2019-02-27T17:18:55.456Z","0.1.1-3f94098.0":"2019-02-27T20:48:03.949Z","0.1.1":"2019-02-28T07:00:55.739Z","0.1.2-7cc78d7.0":"2019-02-28T07:02:00.460Z","0.1.2-fa4b5df.0":"2019-02-28T15:25:14.257Z","0.1.2-be70053.0":"2019-02-28T15:43:41.964Z","0.1.2-cf77c5b.0":"2019-02-28T16:50:54.205Z","0.1.2-f27d265.0":"2019-02-28T17:00:01.138Z","0.1.2-59e4909.0":"2019-03-01T01:54:26.754Z","0.1.2-03b0711.0":"2019-03-01T09:57:28.995Z","0.1.2-d854f3f.0":"2019-03-01T09:57:56.123Z","0.1.2-1bbe32b.0":"2019-03-01T09:58:12.482Z","0.2.0":"2019-03-01T09:58:41.528Z","0.2.1-5ecd0ac.0":"2019-03-01T09:59:45.798Z","0.2.1-b043b45.0":"2019-03-02T01:32:44.502Z","0.2.1-4162e18.0":"2019-03-02T02:21:37.263Z","0.2.1-4d0b208.0":"2019-03-02T12:07:23.085Z","0.2.1-35a5ca0.0":"2019-03-02T12:08:06.223Z","0.2.1-bb175c1.0":"2019-03-03T11:33:25.411Z","0.0.6-61b862f.0":"2019-03-04T12:45:42.582Z","0.0.6-3080cc3.0":"2019-03-04T13:14:31.174Z","0.2.1-4705e6a.0":"2019-03-04T22:47:46.063Z","0.2.1-9753c4a.0":"2019-03-05T11:00:12.617Z","0.2.1-36519c5.0":"2019-03-05T11:03:08.420Z","0.2.1-7d2f919.0":"2019-03-05T14:25:54.970Z","0.2.1-0e6d66e.0":"2019-03-06T20:15:14.652Z","0.2.1-fb168fd.0":"2019-03-07T04:35:26.621Z","0.2.1-7eec867.0":"2019-03-07T08:54:28.385Z","0.2.1-19afe8a.0":"2019-03-07T08:54:33.547Z","0.2.1-5082b1b.0":"2019-03-07T08:54:45.024Z","0.2.1-825d49f.0":"2019-03-07T08:55:25.121Z","0.2.1-19d419e.0":"2019-03-07T08:55:39.107Z","0.2.2-57fc1e4.0":"2019-03-07T09:04:32.426Z","0.2.2-e312052.0":"2019-03-07T09:06:09.074Z","0.2.1":"2019-03-07T09:06:14.255Z","0.2.2":"2019-03-07T09:16:20.736Z","0.2.3":"2019-03-07T09:17:14.346Z","0.2.3-8f179b5.0":"2019-03-07T09:17:20.433Z","0.2.4-8654103.0":"2019-03-07T09:18:11.044Z","0.2.4-b5fcb39.0":"2019-03-07T12:55:34.958Z","0.2.4-c4625e4.0":"2019-03-07T13:38:20.732Z","0.2.4-89463f8.0":"2019-03-07T23:35:42.765Z","0.2.4-2ed7c47.0":"2019-03-08T18:56:20.099Z","0.2.4-b3a132f.0":"2019-03-09T00:30:07.379Z","0.2.5-05a161c.0":"2019-03-11T07:02:44.496Z","0.2.5-aa66588.0":"2019-03-11T07:02:58.402Z","0.2.5-b89ebcd.0":"2019-03-11T07:03:14.166Z","0.2.5-41e4c2c.0":"2019-03-11T07:03:55.429Z","0.2.5-edd5b0d.0":"2019-03-11T07:05:25.460Z","0.2.4":"2019-03-11T12:20:18.105Z","0.2.5-399121c.0":"2019-03-11T15:24:38.647Z","0.2.5-e1a3b19.0":"2019-03-11T19:02:25.550Z","0.2.5-1910023.0":"2019-03-11T19:11:26.536Z","0.2.6-a0b7d6a.0":"2019-03-11T19:12:52.274Z","0.2.6-98ecf55.0":"2019-03-11T19:21:46.396Z","0.2.6-ccb181f.0":"2019-03-11T21:23:16.377Z","0.2.6-2f43b7c.0":"2019-03-11T22:40:25.744Z","0.2.6-11e5c25.0":"2019-03-12T06:13:07.179Z","0.2.6-668ca1d.0":"2019-03-12T06:13:28.343Z","0.2.6-64ea6a7.0":"2019-03-12T06:14:41.753Z","0.2.5":"2019-03-12T08:10:16.449Z","0.2.6-7c7d46c.0":"2019-03-12T16:57:21.245Z","0.2.6-31d64a9.0":"2019-03-12T18:32:17.172Z","0.0.6-6b2276f.0":"2019-03-12T20:46:20.425Z","0.2.6-d5a7a31.0":"2019-03-12T23:47:12.023Z","0.2.6-962a0e9.0":"2019-03-13T07:26:44.175Z","0.2.6-0507b94.0":"2019-03-13T07:26:50.498Z","0.2.6-cb6e569.0":"2019-03-13T21:17:49.271Z","0.2.6-243fc55.0":"2019-03-13T21:39:01.533Z","0.2.6-907be90.0":"2019-03-13T22:01:11.049Z","0.2.6-a04e252.0":"2019-03-14T06:53:39.814Z","0.2.6-2f38d4d.0":"2019-03-14T13:15:12.761Z","0.2.6-5d6b943.0":"2019-03-14T13:42:00.635Z","0.2.6":"2019-03-14T14:17:58.804Z","0.2.7-8e7836d.0":"2019-03-14T14:19:08.164Z","0.2.7-f9a8280.0":"2019-03-16T11:53:45.587Z","0.2.7-2b32362.0":"2019-03-16T12:58:07.633Z","0.2.7-683152e.0":"2019-03-19T06:08:20.997Z","0.2.7-d6e8002.0":"2019-03-19T06:10:38.229Z","0.2.7-c720d55.0":"2019-03-19T06:15:47.583Z","0.2.7-a781bbf.0":"2019-03-19T06:21:45.858Z","0.2.7-ac2dfc1.0":"2019-03-19T19:02:26.655Z","0.2.7-79eaf67.0":"2019-03-19T19:12:36.975Z","0.2.7-fc5f4c0.0":"2019-03-20T00:09:12.547Z","0.2.7-8431ebe.0":"2019-03-20T08:17:02.361Z","0.2.7-6b3fdad.0":"2019-03-20T08:17:24.164Z","0.2.7-81e6959.0":"2019-03-20T08:41:29.411Z","0.2.7":"2019-03-20T08:43:58.010Z","0.2.8-2173204.0":"2019-03-20T08:45:18.395Z","0.2.8-972df27.0":"2019-03-21T23:11:54.463Z","0.2.8-d31d269.0":"2019-03-22T10:20:43.230Z","0.2.8-74fab96.0":"2019-03-22T19:21:51.929Z","0.2.8-1461b9b.0":"2019-03-24T07:06:22.508Z","0.2.8-fd1dfd8.0":"2019-03-25T05:21:50.111Z","0.2.8-4b3671f.0":"2019-03-25T05:22:31.971Z","0.2.8-f0f6fd0.0":"2019-03-25T05:23:37.323Z","0.2.8":"2019-03-25T05:24:43.125Z","0.2.9-1061ab1.0":"2019-03-25T12:01:29.242Z","0.2.9-2f74a63.0":"2019-03-25T12:35:24.497Z","0.2.9-aa2f79d.0":"2019-03-25T14:39:37.461Z","0.2.9-1646af2.0":"2019-03-25T16:27:06.753Z","0.2.9-396ae19.0":"2019-03-25T20:50:34.112Z","0.2.9-4d573cb.0":"2019-03-25T23:17:07.193Z","0.2.9-e501c90.0":"2019-03-26T00:15:32.879Z","0.2.9-804616b.0":"2019-03-26T04:43:50.106Z","0.2.9-c734287.0":"2019-03-26T07:28:01.879Z","0.2.9-514425a.0":"2019-03-26T07:28:09.167Z","0.2.8-1cabf06.0":"2019-03-26T15:47:35.751Z","0.2.9-9b6d1e5.0":"2019-03-26T19:41:14.908Z","0.2.9-47061fe.0":"2019-03-26T23:41:50.506Z","0.2.9-17ff5d0.0":"2019-03-26T23:42:07.049Z","0.2.9-2e79686.0":"2019-03-27T06:26:09.747Z","0.2.9-c34e87e.0":"2019-03-27T06:26:14.910Z","0.2.9-c617bc0.0":"2019-03-27T22:29:33.813Z","0.2.9-a384c63.0":"2019-03-29T01:24:14.293Z","0.2.9-be674d4.0":"2019-03-29T10:05:45.235Z","0.2.9-9d1fb73.0":"2019-03-29T10:53:42.015Z","0.2.9-86ee21f.0":"2019-03-29T11:12:04.666Z","0.2.9":"2019-03-29T11:14:52.643Z","0.2.10-233ead1.0":"2019-03-29T11:16:13.538Z","0.2.10-75043e9.0":"2019-03-29T12:35:50.116Z","0.2.10-dbff0c4.0":"2019-03-29T17:47:59.369Z","0.2.10-8667770.0":"2019-03-29T18:31:16.779Z","0.2.10-9e197c4.0":"2019-03-29T19:04:20.100Z","0.2.10-e36de18.0":"2019-03-30T13:58:59.072Z","0.2.10-a5ee441.0":"2019-03-31T12:21:23.698Z","0.2.10-cd15133.0":"2019-04-01T22:52:17.962Z","0.2.10-4e97a00.0":"2019-04-02T05:26:41.174Z","0.2.10-8b8f644.0":"2019-04-02T05:27:30.547Z","0.2.10-b2aa5ed.0":"2019-04-02T05:27:34.769Z","0.2.10-7c2abc8.0":"2019-04-02T05:28:10.873Z","0.2.10-28db527.0":"2019-04-02T05:28:42.113Z","0.2.10-7555507.0":"2019-04-02T09:44:37.133Z","0.2.10-9fc8c89.0":"2019-04-03T04:46:44.862Z","0.2.10-3eb553c.0":"2019-04-03T06:15:54.309Z","0.2.10-9ce018a.0":"2019-04-04T01:46:32.932Z","0.2.10-2e8289e.0":"2019-04-04T06:34:18.789Z","0.2.10-48e78eb.0":"2019-04-05T21:18:50.700Z","0.2.10-0ed0203.0":"2019-04-05T22:11:56.886Z","0.2.10-87d0564.0":"2019-04-06T01:28:07.994Z","0.2.10-c2e69a1.0":"2019-04-06T01:28:17.228Z","0.2.10-9d60f8f.0":"2019-04-06T23:21:03.304Z","0.2.10-f1393c3.0":"2019-04-07T10:14:16.857Z","0.2.10-31f80e4.0":"2019-04-09T23:44:07.375Z","0.2.10-17b1021.0":"2019-04-10T00:12:12.431Z","0.2.10-fec4e82.0":"2019-04-18T23:36:41.686Z","0.2.10-8757451.0":"2019-04-19T20:49:20.889Z","0.2.10-402c329.0":"2019-04-21T16:02:46.851Z","0.2.10-1aa5c9a.0":"2019-04-21T16:03:52.575Z","0.2.10-07d83b9.0":"2019-04-23T17:43:45.173Z","0.2.10-a3a80ec.0":"2019-04-25T20:49:40.028Z","0.2.10-39e2981.0":"2019-04-26T19:53:43.906Z","0.2.10-4a336cb.0":"2019-04-29T04:41:21.880Z","0.2.10-ded7a66.0":"2019-04-29T06:34:41.495Z","0.2.10-6956f44.0":"2019-04-30T09:08:01.728Z","0.2.10-eca9011.0":"2019-04-30T09:23:36.343Z","0.2.10-9dbdd92.0":"2019-04-30T10:16:39.391Z","0.2.10-e9156ba.0":"2019-04-30T10:17:06.372Z","0.2.10-f814a43.0":"2019-04-30T10:17:24.675Z","0.2.10-5916b3b.0":"2019-04-30T10:17:41.612Z","0.2.10-087a8ff.0":"2019-05-01T07:37:15.227Z","0.2.10-fe4e187.0":"2019-05-05T02:22:26.123Z","0.2.10-33f484a.0":"2019-05-05T12:08:11.951Z","0.2.10-abc54d8.0":"2019-05-07T10:23:36.714Z","0.2.10-6be258b.0":"2019-05-07T23:46:27.156Z","0.2.10-4f2fd22.0":"2019-05-08T00:49:31.833Z","0.2.10-617f2e8.0":"2019-05-09T16:09:29.147Z","0.2.10-126551a.0":"2019-05-10T18:13:49.772Z","0.2.10-b83878d.0":"2019-05-13T23:25:29.013Z","0.2.10-4237653.0":"2019-05-14T18:31:49.880Z","0.2.10-81a6acb.0":"2019-05-14T20:27:11.735Z","0.2.10-4268083.0":"2019-05-14T21:43:04.028Z","0.2.10-c5de9e2.0":"2019-05-16T08:30:02.510Z","0.2.10-c6a7e1e.0":"2019-05-16T08:30:10.547Z","0.2.10-19c62c0.0":"2019-05-16T08:30:18.827Z","0.2.10-6b6364b.0":"2019-05-16T08:30:28.839Z","0.2.10-971e444.0":"2019-05-16T08:48:18.006Z","0.2.10-1374342.0":"2019-05-16T08:50:52.016Z","0.2.10-d5b55a3.0":"2019-05-16T08:54:06.073Z","0.2.10":"2019-05-16T08:55:44.044Z","0.2.11-ec418dd.0":"2019-05-16T08:57:13.151Z","0.2.11-3e03fc8.0":"2019-05-17T09:01:45.082Z","0.2.11-4c4f9d1.0":"2019-05-17T09:33:06.301Z","0.2.11-f888b40.0":"2019-05-17T09:37:19.527Z","0.2.11":"2019-05-17T09:37:50.293Z","0.2.12-3a89c60.0":"2019-05-17T09:38:43.864Z","0.2.12-a685c1b.0":"2019-05-17T12:39:04.997Z","0.2.12":"2019-05-17T12:43:38.800Z","0.2.12-baaba8d.0":"2019-05-17T12:43:55.558Z","0.2.13-f696aa4.0":"2019-05-17T12:44:42.361Z","0.2.13-88d37d0.0":"2019-05-17T21:27:59.288Z","0.2.13-9602943.0":"2019-05-20T16:14:13.187Z","0.2.13-943a3ad.0":"2019-05-21T12:16:21.470Z","0.2.13-df6ae1d.0":"2019-05-22T21:16:39.045Z","0.2.13-3cf72ee.0":"2019-05-22T23:50:21.918Z","0.2.13-093eb4d.0":"2019-05-22T23:50:41.085Z","0.2.13-55e26d2.0":"2019-05-22T23:50:55.613Z","0.2.13-dbd620a.0":"2019-05-22T23:51:09.286Z","0.2.13-6954194.0":"2019-05-22T23:51:20.055Z","0.2.13":"2019-05-23T05:30:37.911Z","0.2.14-af510b9.0":"2019-05-23T05:31:22.751Z","0.2.14-96e77a3.0":"2019-05-23T15:42:52.530Z","0.2.14-ed4db9a.0":"2019-05-23T17:17:56.547Z","0.2.14-91a47bf.0":"2019-05-24T00:43:54.000Z","0.2.14-de5f323.0":"2019-05-28T17:19:14.260Z","0.2.14-ef3f5da.0":"2019-05-29T16:36:17.528Z","0.2.14-534d5ed.0":"2019-05-30T18:19:13.036Z","0.2.14-8a2ebe8.0":"2019-05-31T00:23:55.909Z","0.2.14-fd93541.0":"2019-06-02T06:09:34.991Z","0.2.14-8125a98.0":"2019-06-02T06:24:41.812Z","0.2.14-1bbbe88.0":"2019-06-02T06:27:20.443Z","0.2.14-0ae1780.0":"2019-06-02T06:27:39.422Z","0.2.14-64b117f.0":"2019-06-02T06:27:56.701Z","0.2.14-e268843.0":"2019-06-02T06:28:11.534Z","0.2.14-bcf9d7d.0":"2019-06-02T06:28:29.575Z","0.2.14-8b48d37.0":"2019-06-02T06:28:38.892Z","0.2.14":"2019-06-02T06:28:52.193Z","0.2.14-15a8882.0":"2019-06-02T06:29:17.550Z","0.2.15-30b6fa9.0":"2019-06-02T06:29:36.029Z","0.2.15-0b1173c.0":"2019-06-05T00:50:08.626Z","0.2.15-0f19f83.0":"2019-06-06T07:26:39.714Z","0.2.15-4619192.0":"2019-06-06T07:26:59.540Z","0.2.15-c371b07.0":"2019-06-06T19:40:28.080Z","0.2.15-c8eed28.0":"2019-06-07T12:39:13.962Z","0.2.15-f4d6afb.0":"2019-06-07T12:42:06.288Z","0.2.15-b152200.0":"2019-06-11T09:04:44.384Z","0.2.15-1b68d9d.0":"2019-06-11T09:06:48.176Z","0.2.15-98dcefe.0":"2019-06-11T19:27:30.215Z","0.2.15-cac53bf.0":"2019-06-13T06:32:54.425Z","0.2.15-06e06af.0":"2019-06-13T09:52:57.006Z","0.2.15-9043ead.0":"2019-06-13T10:36:53.352Z","0.2.15-0f5314c.0":"2019-06-13T15:15:06.358Z","0.2.15-9ef5398.0":"2019-06-13T17:44:48.259Z","0.2.15-2989d2b.0":"2019-06-13T19:54:22.325Z","0.2.15-28456b7.0":"2019-06-13T20:24:44.253Z","0.2.15-b81e62b.0":"2019-06-14T07:15:14.182Z","0.2.15-f3d9fd2.0":"2019-06-14T07:17:05.164Z","0.2.15-bf691e1.0":"2019-06-14T07:19:24.065Z","0.2.15-c2b577f.0":"2019-06-14T07:21:23.668Z","0.2.15-4f57fbe.0":"2019-06-14T07:21:34.616Z","0.2.15-f4275de.0":"2019-06-14T07:22:09.913Z","0.2.15-b34a7c5.0":"2019-06-14T07:22:15.992Z","0.2.15-b15be45.0":"2019-06-14T07:22:38.125Z","0.2.15-b65329a.0":"2019-06-14T07:26:38.434Z","0.2.15-ac872ed.0":"2019-06-14T07:29:59.173Z","0.2.15-2f04a76.0":"2019-06-14T20:18:47.926Z","0.2.15-76ef51c.0":"2019-06-16T06:28:39.077Z","0.2.15-251f256.0":"2019-06-16T07:39:06.124Z","0.2.15-59f26c5.0":"2019-06-18T06:30:43.791Z","0.2.15-91b0089.0":"2019-06-19T14:41:35.107Z","0.2.15-7deb3e6.0":"2019-06-19T14:50:44.322Z","0.2.15-13cfdab.0":"2019-06-20T15:51:46.979Z","0.2.15-761f148.0":"2019-06-20T20:03:12.864Z","0.2.15-6511eb4.0":"2019-06-20T20:09:39.412Z","0.2.15-9d48153.0":"2019-06-21T16:00:22.589Z","0.2.15-21d3c4a.0":"2019-06-21T16:03:26.697Z","0.2.15-ce0fca7.0":"2019-06-21T16:43:33.736Z","0.2.15-b2d7a22.0":"2019-06-21T16:43:42.769Z","0.2.15-7f6c5ef.0":"2019-06-21T16:43:58.629Z","0.2.15-8b031a5.0":"2019-06-21T16:44:04.376Z","0.2.15-38949dd.0":"2019-06-21T16:46:10.651Z","0.2.15-d08bdd7.0":"2019-06-21T17:12:20.318Z","0.2.15-e72f6d0.0":"2019-06-21T21:28:42.946Z","0.2.15-44568ca.0":"2019-06-23T09:50:20.541Z","0.2.15-c3b151e.0":"2019-06-24T01:51:37.310Z","0.2.15-38d2cb8.0":"2019-06-24T05:38:41.107Z","0.2.15-e1c814c.0":"2019-06-24T06:27:39.135Z","0.3.0":"2019-06-24T06:28:27.608Z","0.3.1-0607cb0.0":"2019-06-24T06:29:13.419Z","0.3.1-a420158.0":"2019-06-24T07:06:39.336Z","0.3.1-5a8d226.0":"2019-06-24T07:13:29.654Z","0.3.1-2a12bdb.0":"2019-06-24T19:49:06.129Z","0.3.1-a0349b1.0":"2019-06-26T16:38:32.961Z","0.3.1-d3c03f0.0":"2019-06-26T16:38:40.994Z","0.3.1-2a0416a.0":"2019-06-26T17:41:03.627Z","0.3.1-fce3bbc.0":"2019-06-26T18:35:06.077Z","0.3.1-6df616f.0":"2019-06-27T23:31:51.610Z","0.3.1-cc6ebae.0":"2019-06-27T23:31:59.622Z","0.3.1-c8e2d54.0":"2019-06-28T22:44:12.949Z","0.3.1-7c32e1a.0":"2019-06-29T00:45:25.013Z","0.3.1-e060d85.0":"2019-06-30T00:37:38.664Z","0.3.1-99856e0.0":"2019-06-30T00:37:57.175Z","0.3.1-214699f.0":"2019-06-30T20:54:04.534Z","0.3.1-06fb701.0":"2019-07-01T01:04:24.954Z","0.3.1-6d7fcc9.0":"2019-07-01T05:55:24.817Z","0.3.1-a19eed4.0":"2019-07-01T06:32:28.432Z","0.3.1-df912bf.0":"2019-07-01T09:28:29.533Z","0.3.1-26e10ca.0":"2019-07-01T13:01:38.951Z","0.3.1-8e124df.0":"2019-07-01T23:08:27.777Z","0.3.1-bad97fa.0":"2019-07-01T23:22:40.571Z","0.3.1-1847343.0":"2019-07-01T23:23:41.051Z","0.3.1-90ab89c.0":"2019-07-01T23:24:12.721Z","0.3.1-55d0529.0":"2019-07-01T23:27:51.113Z","0.3.1-39bd770.0":"2019-07-01T23:29:59.071Z","0.3.1-694aa50.0":"2019-07-01T23:30:51.077Z","0.3.1-3049905.0":"2019-07-01T23:32:03.613Z","0.3.1-177043c.0":"2019-07-01T23:37:12.180Z","0.3.1-63d612c.0":"2019-07-01T23:38:26.809Z","0.3.1-aac21ba.0":"2019-07-01T23:53:03.754Z","0.3.1-e17a63c.0":"2019-07-01T23:53:57.472Z","0.3.1":"2019-07-01T23:55:33.002Z","0.3.2-88d6e58.0":"2019-07-01T23:56:38.448Z","0.3.2-76d2637.0":"2019-07-02T00:45:13.254Z","0.3.2-87d503a.0":"2019-07-02T00:47:33.475Z","0.3.2-6b96fe4.0":"2019-07-02T22:11:46.092Z","0.3.2-a1149fc.0":"2019-07-02T22:13:03.529Z","0.3.2":"2019-07-02T22:15:12.673Z","0.3.3-a01080a.0":"2019-07-02T22:16:22.036Z","0.3.3-3d0c0ee.0":"2019-07-02T22:17:34.970Z","0.3.3":"2019-07-02T22:29:32.932Z","0.3.4-a25eeaa.0":"2019-07-02T22:35:19.316Z","0.3.4-191cd8c.0":"2019-07-02T22:36:34.425Z","0.3.4-b1dff10.0":"2019-07-03T15:08:52.978Z","0.3.4-b73357a.0":"2019-07-03T17:10:47.530Z","0.3.4-8849761.0":"2019-07-03T17:38:13.098Z","0.3.4-86f0ca4.0":"2019-07-04T06:48:51.126Z","0.3.4-f83a0b9.0":"2019-07-04T06:49:07.595Z","0.3.4-fd0ca90.0":"2019-07-05T00:44:27.367Z","0.3.4-0e0a14d.0":"2019-07-05T01:59:16.295Z","0.3.4-704f1c9.0":"2019-07-08T14:05:40.203Z","0.3.4-d403b89.0":"2019-07-08T15:53:50.203Z","0.3.4-e53d82a.0":"2019-07-08T17:11:26.074Z","0.3.4-a6e3c8c.0":"2019-07-08T22:28:28.544Z","0.3.4-7d27a35.0":"2019-07-09T06:43:44.807Z","0.3.4-ffe3480.0":"2019-07-09T06:43:55.621Z","0.3.4-b523f36.0":"2019-07-09T06:44:08.667Z","0.3.4-a0e67ae.0":"2019-07-09T06:44:26.055Z","0.3.4-65638d7.0":"2019-07-09T21:18:57.740Z","0.3.4-60e487e.0":"2019-07-09T22:28:38.587Z","0.3.4-7deb38f.0":"2019-07-10T01:07:44.327Z","0.3.4-5c5ea4f.0":"2019-07-10T15:48:27.090Z","0.3.4-f373a4c.0":"2019-07-10T16:44:13.637Z","0.3.4-8d7a5e3.0":"2019-07-10T23:02:56.738Z","0.3.4-976163f.0":"2019-07-10T23:04:47.039Z","0.3.4":"2019-07-10T23:04:59.701Z","0.3.5-04edb9b.0":"2019-07-10T23:06:12.355Z","0.3.5-c8cb72f.0":"2019-07-13T15:19:47.239Z","0.3.5-a004912.0":"2019-07-13T18:29:04.239Z","0.3.5-7ee9004.0":"2019-07-14T13:12:35.080Z","0.3.5-8bdcff3.0":"2019-07-14T13:48:30.740Z","0.3.5-30299c6.0":"2019-07-16T08:47:12.379Z","0.3.5":"2019-07-16T08:48:17.401Z","0.3.6-f487f46.0":"2019-07-16T08:49:30.214Z","0.3.6-7fabac5.0":"2019-07-16T09:30:04.736Z","0.3.6-b566f5e.0":"2019-07-16T09:31:34.931Z","0.3.6-7916df4.0":"2019-07-16T09:32:00.189Z","0.3.6-4f34326.0":"2019-07-16T09:33:49.477Z","0.3.1-4219079.0":"2019-07-17T11:51:33.467Z","0.3.6-6900ee1.0":"2019-07-17T12:10:29.285Z","0.3.6-alhpa.1":"2019-07-17T13:04:27.341Z","0.3.6-aa3e7f5.0":"2019-07-17T13:26:36.467Z","0.3.6-4666a75.0":"2019-07-17T13:47:42.748Z","0.4.0":"2019-07-17T13:55:37.677Z","0.3.6-2141859.0":"2019-07-17T13:55:56.717Z","0.4.1-413699a.0":"2019-07-17T13:57:02.545Z","0.4.1-0ac7dee.0":"2019-07-17T15:59:30.963Z","0.4.1-b19e420.0":"2019-07-17T16:00:31.314Z","0.4.1-968b703.0":"2019-07-17T16:18:56.886Z","0.4.1-cd1d30e.0":"2019-07-17T18:40:39.227Z","0.4.1-e5572c7.0":"2019-07-18T04:58:30.552Z","0.4.1-914161a.0":"2019-07-18T06:53:48.250Z","0.4.1-80adf6b.0":"2019-07-18T11:08:07.998Z","0.4.1-e2eccef.0":"2019-07-18T15:15:06.108Z","0.4.1-a01dfa4.0":"2019-07-19T02:33:18.327Z","0.4.1-193783a.0":"2019-07-19T08:33:56.953Z","0.4.1-514527b.0":"2019-07-21T13:50:47.125Z","0.4.1-4ef69f3.0":"2019-07-21T13:57:47.510Z","0.4.1-5e4285b.0":"2019-07-21T14:07:21.429Z","0.4.1-31c2aee.0":"2019-07-21T15:10:50.228Z","0.4.1-bd1107b.0":"2019-07-21T15:14:44.658Z","0.4.1-ba8acce.0":"2019-07-21T15:16:21.122Z","0.4.1-a1f54bc.0":"2019-07-21T15:17:28.423Z","0.4.1-f7dc8ec.0":"2019-07-21T16:27:09.501Z","0.4.1":"2019-07-21T16:36:33.315Z","0.4.2-b9cec93.0":"2019-07-21T16:37:49.940Z","0.4.2-5e2406c.0":"2019-07-21T16:37:59.174Z","0.4.2-b54e685.0":"2019-07-21T17:21:20.368Z","0.4.2-fda7817.0":"2019-07-22T20:10:59.001Z","0.4.2-890d9a1.0":"2019-07-23T05:02:23.443Z","0.4.2-8210ae1.0":"2019-07-23T09:44:18.377Z","0.4.2-372d4f9.0":"2019-07-23T12:55:19.196Z","0.4.2-2ea5f5b.0":"2019-07-23T19:28:01.423Z","0.4.2-44d7883.0":"2019-07-23T21:57:06.837Z","0.4.2-081779d.0":"2019-07-24T05:03:30.091Z","0.4.2-cf2e910.0":"2019-07-24T05:03:52.487Z","0.4.2-8e64ff0.0":"2019-07-26T00:41:57.938Z","0.4.2-e1fdc05.0":"2019-07-26T07:45:00.339Z","0.4.2-937fa61.0":"2019-07-26T18:35:08.249Z","0.4.2-4350446.0":"2019-07-26T18:35:14.020Z","0.4.1-7c31fef.0":"2019-07-28T09:31:49.253Z","0.4.2-e078ad0.0":"2019-07-28T09:33:26.281Z","0.4.2-885871c.0":"2019-07-28T10:13:55.958Z","0.4.2":"2019-07-28T10:14:29.987Z","0.4.3-0a482d9.0":"2019-07-28T10:17:22.413Z","0.4.2-08d58db.0":"2019-07-28T22:24:02.417Z","0.4.2-12f9a35.0":"2019-07-28T23:06:58.626Z","0.4.3-ce30c7f.0":"2019-07-29T23:02:31.461Z","0.4.3-1b6fc92.0":"2019-07-30T04:19:50.345Z","0.4.3-64901f7.0":"2019-07-30T10:52:10.547Z","0.4.3-02217da.0":"2019-07-30T15:50:11.538Z","0.4.3-00ddae5.0":"2019-07-30T18:37:31.034Z","0.4.3-93f6314.0":"2019-07-30T18:40:12.168Z","0.4.3-d201a30.0":"2019-07-30T18:54:22.861Z","0.4.3-04e0afd.0":"2019-07-30T18:59:33.174Z","0.4.3-51ac8d7.0":"2019-07-30T23:41:34.973Z","0.4.3-f7178a2.0":"2019-07-31T01:20:25.655Z","0.4.3-6b210ae.0":"2019-07-31T08:51:55.912Z","0.4.3-24dc2c8.0":"2019-07-31T08:52:13.253Z","0.4.3-52fdb57.0":"2019-07-31T09:03:04.281Z","0.4.3-8926e7b.0":"2019-07-31T09:05:21.196Z","0.4.3-3614144.0":"2019-07-31T09:08:19.301Z","0.4.3-9ece366.0":"2019-07-31T09:12:16.968Z","0.5.0":"2019-07-31T09:22:47.943Z","0.5.1-8acfd65.0":"2019-07-31T09:24:21.767Z","0.5.1-1e5f8ac.0":"2019-07-31T09:27:27.517Z","0.5.1-a6d4926.0":"2019-07-31T17:20:25.016Z","0.5.1-bb497e4.0":"2019-07-31T20:52:03.879Z","0.5.1-16e40ea.0":"2019-07-31T20:55:12.242Z","0.5.1-62be67b.0":"2019-08-01T15:43:59.756Z","0.5.1-605bc7a.0":"2019-08-01T16:03:15.607Z","0.5.1-c3d0729.0":"2019-08-02T12:44:57.157Z","0.5.1-70213dd.0":"2019-08-02T12:46:00.365Z","0.5.1":"2019-08-02T12:46:41.329Z","0.5.1-6a75bdc.0":"2019-08-02T12:47:04.580Z","0.5.2-1a3b5b8.0":"2019-08-02T12:48:11.086Z","0.5.2-5eae031.0":"2019-08-02T19:11:29.852Z","0.5.2-7b08294.0":"2019-08-04T06:47:22.003Z","0.5.2":"2019-08-04T06:48:55.380Z","0.5.2-d9b548d.0":"2019-08-04T06:49:55.071Z","0.5.3-9c1b29a.0":"2019-08-04T06:50:01.588Z","0.5.3-981884f.0":"2019-08-05T20:19:49.434Z","0.5.3-81def63.0":"2019-08-06T02:12:09.520Z","0.5.3-b2c35f4.0":"2019-08-06T11:51:39.548Z","0.5.3-61f0ba7.0":"2019-08-06T12:07:20.560Z","0.5.3":"2019-08-06T18:30:17.417Z","0.5.4-46448e0.0":"2019-08-06T18:31:33.332Z","0.5.4":"2019-08-06T19:22:22.160Z","0.5.5-5954a69.0":"2019-08-06T19:24:19.515Z","0.5.5-393425b.0":"2019-08-07T01:20:50.862Z","0.5.5-d16d941.0":"2019-08-07T01:21:36.721Z","0.5.5-d3692b7.0":"2019-08-07T21:46:27.911Z","0.5.5-03d5273.0":"2019-08-07T23:07:03.434Z","0.5.5-dd93914.0":"2019-08-10T00:50:13.511Z","0.5.5-2bf8ec5.0":"2019-08-10T21:25:38.619Z","0.5.5":"2019-08-11T05:37:24.140Z","0.5.6":"2019-08-11T05:40:29.114Z","0.5.6-745fa01.0":"2019-08-11T05:40:46.519Z","0.5.7-c5e12e6.0":"2019-08-11T05:41:25.434Z","0.5.7":"2019-08-11T12:18:29.189Z","0.5.8-227680f.0":"2019-08-11T12:19:23.517Z","0.5.8":"2019-08-11T15:38:42.733Z","0.5.9-c9cb288.0":"2019-08-11T15:40:15.489Z","0.5.9-2d9be8d.0":"2019-08-13T17:52:39.623Z","0.5.9-67a6309.0":"2019-08-13T19:39:25.362Z","0.5.9-b2971ff.0":"2019-08-14T00:17:09.084Z","0.5.9-0bfb030.0":"2019-08-14T00:18:54.502Z","0.5.9-d476fd9.0":"2019-08-14T16:58:42.039Z","0.5.9-9fd346b.0":"2019-08-14T18:25:54.480Z","0.5.9-4d01c90.0":"2019-08-15T05:28:29.159Z","0.5.9-657f7d0.0":"2019-08-15T13:53:34.184Z","0.5.9-dc25ab7.0":"2019-08-16T06:36:27.606Z","0.5.9-9b41b3b.0":"2019-08-16T07:29:59.674Z","0.5.9":"2019-08-16T07:51:44.954Z","0.5.10-79a5914.0":"2019-08-16T07:53:09.811Z","0.5.10":"2019-08-16T16:20:43.474Z","0.5.11-dc6fbf4.0":"2019-08-16T16:21:32.801Z","0.5.11-f1d04e8.0":"2019-08-16T16:22:18.293Z","0.5.11-51650ac.0":"2019-08-16T18:36:20.331Z","0.5.11-3241c58.0":"2019-08-16T19:26:29.844Z","0.5.11-698b059.0":"2019-08-16T19:26:36.578Z","0.5.11-d12d9e7.0":"2019-08-18T05:43:39.255Z","0.5.11-8d6db36.0":"2019-08-18T15:01:59.596Z","0.5.11-203c28e.0":"2019-08-19T17:42:27.409Z","0.5.11-fff94de.0":"2019-08-20T04:24:51.245Z","0.5.11-79f15bf.0":"2019-08-20T18:34:47.118Z","0.5.11-c56f98e.0":"2019-08-21T01:14:28.157Z","0.5.11-5f91f84.0":"2019-08-22T00:47:37.932Z","0.5.11-90a34cf.0":"2019-08-22T04:11:53.942Z","0.5.11-0210bb5.0":"2019-08-22T12:08:52.604Z","0.5.11-194e19a.0":"2019-08-22T12:42:01.033Z","0.5.11-3183b04.0":"2019-08-22T12:42:20.790Z","0.5.11-90efa33.0":"2019-08-22T12:43:07.296Z","0.5.11-d259518.0":"2019-08-23T16:29:39.299Z","0.5.11-b46c43c.0":"2019-08-24T00:46:55.693Z","0.5.11-3bd010c.0":"2019-08-24T03:19:23.377Z","0.5.11-1b8a67d.0":"2019-08-26T17:45:15.579Z","0.5.11-5a44df0.0":"2019-08-27T00:11:59.941Z","0.5.11-7dbec4a.0":"2019-08-27T12:26:48.923Z","0.5.11-54a34d9.0":"2019-08-27T12:35:23.527Z","0.5.11-495408b.0":"2019-08-27T18:22:33.024Z","0.5.11-593c359.0":"2019-08-29T03:35:45.415Z","0.5.11-8e1c104.0":"2019-08-29T03:37:23.169Z","0.5.11-c18d6b5.0":"2019-08-29T03:38:14.133Z","0.5.11-730c537.0":"2019-08-29T03:39:06.759Z","0.5.11-5b97e8d.0":"2019-08-29T10:50:47.843Z","0.5.11-5ccbdcd.0":"2019-08-29T12:48:06.981Z","0.5.11-02d4f6b.0":"2019-08-29T12:50:47.404Z","0.5.11-04f8bf1.0":"2019-08-30T00:50:26.666Z","0.5.11-12dc93d.0":"2019-08-30T02:13:57.348Z","0.5.11-0d5fb9f.0":"2019-08-30T05:30:37.372Z","0.5.11-9ce07f8.0":"2019-08-30T06:14:30.248Z","0.5.11-5241638.0":"2019-08-30T06:14:57.501Z","0.5.11-7d5b56b.0":"2019-08-31T07:38:05.341Z","0.5.11-257b84c.0":"2019-08-31T07:43:34.239Z","0.5.11":"2019-08-31T08:27:24.258Z","0.5.11-fcefd36.0":"2019-08-31T08:27:43.221Z","0.5.12-33c3558.0":"2019-08-31T08:28:17.518Z","0.5.11-f816418.0":"2019-09-03T05:21:57.968Z","0.5.12-e05e214.0":"2019-09-03T05:23:18.336Z","0.5.12":"2019-09-03T05:23:51.340Z","0.5.12-33d3e58.0":"2019-09-05T10:59:19.932Z","0.5.12-a80120d.0":"2019-09-05T11:01:08.794Z","0.5.12-af9c6c3.0":"2019-09-05T17:11:37.140Z","0.5.12-66cdd8e.0":"2019-09-05T20:25:36.622Z","0.5.12-6d3179e.0":"2019-09-06T09:02:10.749Z","0.5.12-a2ed5b4.0":"2019-09-07T00:49:35.808Z","0.5.12-ad2459e.0":"2019-09-07T00:57:57.564Z","0.5.12-0b8643c.0":"2019-09-09T00:36:20.823Z","0.5.12-51fc38a.0":"2019-09-09T06:43:10.323Z","0.5.12-e1f07f6.0":"2019-09-09T06:43:28.868Z","0.5.12-7346ac5.0":"2019-09-09T06:46:07.806Z","0.5.12-5f8c007.0":"2019-09-09T07:51:49.887Z","0.5.12-1fb46d0.0":"2019-09-09T08:40:05.456Z","0.5.12-6f4ffcb.0":"2019-09-10T21:00:45.682Z","0.5.12-a4da46a.0":"2019-09-11T03:30:34.808Z","0.5.12-4484c00.0":"2019-09-11T05:51:10.497Z","0.5.12-af2daeb.0":"2019-09-11T20:38:59.148Z","0.5.13":"2019-09-12T03:42:57.823Z","0.5.14-8004e5c.0":"2019-09-12T03:44:18.942Z","0.5.14-fdf9346.0":"2019-09-12T18:59:31.779Z","0.5.14-f55bc11.0":"2019-09-12T20:18:29.403Z","0.5.14-318c803.0":"2019-09-12T20:19:06.733Z","0.5.14-3a82182.0":"2019-09-13T05:46:10.632Z","0.5.14-d08adf0.0":"2019-09-13T07:24:05.808Z","0.5.14-7f7855a.0":"2019-09-13T14:39:49.023Z","0.5.14-f9b5744.0":"2019-09-13T15:29:41.584Z","0.5.14-f71f9fd.0":"2019-09-13T16:45:31.008Z","0.5.14-e45a6aa.0":"2019-09-13T16:45:38.575Z","0.5.14-af36b42.0":"2019-09-13T16:46:14.217Z","0.5.14-8f86eb0.0":"2019-09-13T16:46:37.563Z","0.5.14-94638dd.0":"2019-09-15T16:55:25.480Z","0.5.14-0aef278.0":"2019-09-17T07:19:21.484Z","0.5.14-3265929.0":"2019-09-17T07:27:25.350Z","0.5.14":"2019-09-19T03:31:12.298Z","0.5.15-f310343.0":"2019-09-19T03:32:49.103Z","0.5.15-40396bd.0":"2019-09-20T21:19:38.114Z","0.5.15-c6ca39e.0":"2019-09-22T15:39:39.058Z","0.5.15-d57bb2e.0":"2019-09-22T15:40:16.661Z","0.5.15-2fdd2aa.0":"2019-09-22T15:40:34.395Z","0.5.15":"2019-09-22T15:42:04.221Z","0.5.16-b055da6.0":"2019-09-22T15:43:17.505Z","0.5.16-3b2e9f8.0":"2019-09-23T18:19:02.644Z","0.5.16-d95643e.0":"2019-09-23T23:22:19.620Z","0.5.16-025ab94.0":"2019-09-24T15:48:42.449Z","0.5.16-9df99a4.0":"2019-09-24T16:06:54.014Z","0.5.16-3bece8e.0":"2019-09-24T16:30:16.023Z","0.5.16-118f675.0":"2019-09-25T14:11:20.417Z","0.5.16-a486858.0":"2019-09-26T03:48:15.681Z","0.5.16-539ebaa.0":"2019-09-26T03:48:30.276Z","0.5.16-de279b6.0":"2019-09-26T03:49:17.484Z","0.5.15-80f65b4.0":"2019-09-26T08:24:36.371Z","0.5.15-050a96a.0":"2019-09-26T08:30:22.325Z","0.5.16-e140322.0":"2019-09-26T23:20:02.459Z","0.5.16-b6a66d1.0":"2019-09-27T00:35:21.974Z","0.5.15-a1750c9.0":"2019-09-27T10:23:02.245Z","0.5.16-5568245.0":"2019-09-27T16:42:29.125Z","0.5.16-b88168d.0":"2019-09-27T16:55:11.564Z","0.5.16-6ef0fd2.0":"2019-09-27T16:56:29.588Z","0.5.16":"2019-10-01T05:47:09.115Z","0.5.17-d9b9bdf.0":"2019-10-01T05:49:27.158Z","0.5.17-e5d8fba.0":"2019-10-03T16:45:54.216Z","0.5.17-a46c1bb.0":"2019-10-04T05:47:42.867Z","0.5.17-121fa00.0":"2019-10-04T16:55:37.616Z","0.5.17-720220e.0":"2019-10-04T16:55:54.933Z","0.5.17-ddafc4c.0":"2019-10-04T17:47:08.207Z","0.5.17-bc47b56.0":"2019-10-05T00:03:10.794Z","0.5.17-52cd55d.0":"2019-10-06T00:30:54.927Z","0.5.17-7cfcb79.0":"2019-10-07T14:30:38.699Z","0.5.17-aa23ec8.0":"2019-10-07T15:00:13.277Z","0.5.17-9025080.0":"2019-10-07T15:01:28.083Z","0.5.17-d52956c.0":"2019-10-07T23:40:11.986Z","0.5.17-adb48c4.0":"2019-10-08T15:10:17.669Z","0.5.17-ed70785.0":"2019-10-09T00:46:28.811Z","0.5.17-226da12.0":"2019-10-09T18:41:25.165Z","0.5.17-127bc93.0":"2019-10-09T19:29:02.223Z","0.5.17-f60ea42.0":"2019-10-09T19:45:29.428Z","0.5.17-b361864.0":"2019-10-09T20:40:05.379Z","0.5.17-d16ead5.0":"2019-10-10T07:53:20.548Z","0.6.0-alpha.0":"2019-10-10T12:31:39.829Z","0.6.0-alpha.1":"2019-10-10T13:17:37.708Z","0.6.0-alpha.2":"2019-10-10T13:36:42.147Z","0.6.0-alpha.3":"2019-10-10T13:40:34.773Z","0.5.17-e0dd7fd.0":"2019-10-10T15:34:32.181Z","0.5.17-217222b.0":"2019-10-10T15:34:49.835Z","0.5.17-27bf350.0":"2019-10-10T15:35:07.899Z","0.5.17-cc2e2b9.0":"2019-10-10T15:35:47.779Z","0.5.17-bbaa233.0":"2019-10-10T15:36:16.799Z","0.5.17-84a0284.0":"2019-10-11T11:51:44.895Z","0.5.17-14768d0.0":"2019-10-13T09:05:42.493Z","0.5.17-bccc110.0":"2019-10-13T09:05:49.312Z","0.5.17-278c8af.0":"2019-10-14T19:27:28.510Z","0.5.17-7954316.0":"2019-10-15T03:45:40.905Z","0.5.17-1eab5d8.0":"2019-10-15T05:21:08.240Z","0.5.17-8237e49.0":"2019-10-15T05:41:57.963Z","0.5.17":"2019-10-15T05:45:40.282Z","0.5.17-0aed6c1.0":"2019-10-15T13:18:02.820Z","0.5.17-66439f8.0":"2019-10-15T19:29:50.582Z","0.5.17-aa926f5.0":"2019-10-16T00:02:04.296Z","0.5.17-a07dd34.0":"2019-10-16T01:29:16.062Z","0.5.17-5689b9a.0":"2019-10-16T13:39:51.732Z","0.5.17-bb6aacd.0":"2019-10-17T05:40:01.471Z","0.5.17-9ac6ed4.0":"2019-10-17T05:40:43.683Z","0.5.17-e36c3dc.0":"2019-10-21T07:37:50.606Z","0.5.17-c364761.0":"2019-10-21T07:50:35.813Z","0.5.18":"2019-10-21T07:51:14.372Z","0.5.19-7b32030.0":"2019-10-21T07:52:32.007Z","0.5.19-c56be26.0":"2019-10-21T15:02:34.441Z","0.5.19-6f61617.0":"2019-10-21T15:43:20.615Z","0.5.19-3aba8c7.0":"2019-10-22T05:04:19.262Z","0.5.19-8daa5bd.0":"2019-10-22T05:05:51.889Z","0.5.19-d8c416e.0":"2019-10-22T09:41:57.055Z","0.5.19-8273c99.0":"2019-10-22T09:46:01.989Z","0.5.19-a7cfae8.0":"2019-10-22T09:51:26.384Z","0.5.19-b7a35e5.0":"2019-10-22T10:01:24.488Z","0.5.19-3644c9d.0":"2019-10-22T10:06:21.069Z","0.5.19-89c62de.0":"2019-10-22T10:19:38.283Z","0.5.19-f67e40e.0":"2019-10-22T11:11:06.976Z","0.6.1-alpha-9c21e61.1":"2019-10-22T13:13:31.100Z","0.6.1-alpha-33d60e4.2":"2019-10-22T13:49:18.556Z","0.6.1-alpha-c775427.3":"2019-10-22T15:08:24.233Z","0.5.19-21833cc.0":"2019-10-22T18:39:18.569Z","0.6.1-alpha-cee1e98.4":"2019-10-22T21:09:53.348Z","0.5.19-6a93a1c.0":"2019-10-22T22:12:29.304Z","0.5.19-99c3348.0":"2019-10-23T01:26:31.260Z","0.5.19-eb3b1d7.0":"2019-10-23T03:45:42.381Z","0.5.19-f36a69b.0":"2019-10-23T03:45:56.901Z","0.5.19-40d3176.0":"2019-10-23T03:48:56.463Z","0.5.19-beta.0":"2019-10-23T14:12:29.305Z","0.6.0":"2019-10-24T06:28:09.344Z","0.6.1-alpha.0":"2019-10-24T06:29:39.184Z","0.6.1-alpha.1":"2019-10-24T11:15:29.276Z","0.6.2-alpha.0":"2019-10-24T11:32:23.030Z","0.6.2":"2019-10-24T11:34:22.898Z","0.6.3-alpha.0":"2019-10-24T11:35:51.583Z","0.6.3-alpha.1":"2019-10-24T21:51:03.790Z","0.6.3-alpha.2":"2019-10-25T20:51:34.866Z","0.6.3-alpha.3":"2019-10-25T20:56:21.989Z","0.6.3-alpha.4":"2019-10-25T20:57:04.158Z","0.6.3-alpha.5":"2019-10-28T16:31:56.196Z","0.6.3-alpha.6":"2019-10-29T12:25:01.487Z","0.6.3":"2019-10-29T12:25:57.156Z","0.6.4-alpha.0":"2019-10-29T12:29:25.604Z","0.6.4":"2019-10-29T23:32:04.107Z","0.6.5-alpha.0":"2019-10-29T23:35:27.967Z","0.6.5-alpha-4f44824.1":"2019-10-31T01:06:13.231Z","0.6.5-alpha-f4625d5.0":"2019-10-31T01:11:42.594Z","0.6.5-alpha-7a40c0e.1":"2019-10-31T01:12:13.036Z","0.6.5-alpha-b0359d6.1":"2019-10-31T01:12:24.660Z","0.6.5-alpha-4377024.1":"2019-10-31T01:12:34.022Z","0.6.5-alpha-cea1613.1":"2019-10-31T01:27:20.620Z","0.6.5-alpha-030e289.2":"2019-10-31T01:27:54.584Z","0.6.5-alpha-b5f4180.3":"2019-10-31T01:30:07.805Z","0.6.5-alpha-818e3d5.3":"2019-10-31T13:19:06.519Z","0.6.5-alpha-4e4c9c2.4":"2019-10-31T23:21:36.512Z","0.6.5-alpha-b454c32.5":"2019-10-31T23:23:49.953Z","0.6.5-alpha-0dcf771.4":"2019-10-31T23:27:49.832Z","0.6.5":"2019-11-01T03:25:10.210Z","0.6.6-alpha-d93b7a6.0":"2019-11-01T03:28:30.521Z","0.6.6-alpha-99c3442.0":"2019-11-01T05:56:44.482Z","0.6.6":"2019-11-01T06:40:52.551Z","0.6.6-alpha-2447d96.2":"2019-11-01T06:53:15.080Z","0.6.6-alpha-370de1c.4":"2019-11-01T16:26:39.001Z","0.6.6-alpha-c6a5f66.4":"2019-11-01T16:26:53.512Z","0.6.6-alpha-368091e.4":"2019-11-01T18:00:39.909Z","0.6.6-alpha-509dd34.4":"2019-11-02T09:00:06.058Z","0.6.6-alpha-38ecd83.5":"2019-11-02T09:00:29.443Z","0.6.6-alpha-1babd3e.6":"2019-11-03T06:35:06.787Z","0.6.6-alpha-46e0b8a.6":"2019-11-03T10:10:08.439Z","0.6.6-alpha-e6acc23.7":"2019-11-04T02:12:05.508Z","0.6.6-alpha-fb57c4b.8":"2019-11-04T10:42:57.377Z","0.6.7":"2019-11-05T06:08:29.444Z","0.6.6-alpha-0ac8bb6.8":"2019-11-05T06:09:44.065Z","0.6.8-alpha-307f72f.0":"2019-11-05T06:11:36.414Z","0.6.8-alpha-45cc0ae.0":"2019-11-05T16:31:35.227Z","0.6.8-alpha-ffaed82.0":"2019-11-05T17:21:22.908Z","0.6.8-alpha-0aec269.1":"2019-11-05T17:22:05.642Z","0.6.8-alpha-e3bc204.2":"2019-11-05T18:15:17.858Z","0.6.8-alpha-f3332c3.2":"2019-11-05T18:53:01.608Z","0.6.8-alpha-23bbb51.1":"2019-11-05T19:46:24.011Z","0.6.8-alpha-a0567ec.0":"2019-11-05T20:28:25.985Z","0.6.8-alpha-53e458f.3":"2019-11-05T21:31:08.214Z","0.6.8-alpha-05dcd9d.3":"2019-11-05T21:32:24.964Z","0.6.8-alpha-d7391a9.3":"2019-11-06T00:03:57.865Z","0.6.8-alpha-dfecdf9.3":"2019-11-06T04:11:40.930Z","0.6.8-alpha-2cde5e8.4":"2019-11-06T04:12:44.592Z","0.6.8-alpha-a3fdc9c.4":"2019-11-06T04:47:47.226Z","0.6.8-alpha-9874590.5":"2019-11-06T04:48:20.499Z","0.6.8-alpha-caa2179.5":"2019-11-06T04:55:55.788Z","0.6.8-alpha-8d0ed22.2":"2019-11-06T05:34:35.316Z","0.6.8-alpha-823548a.6":"2019-11-06T22:17:04.314Z","0.6.8-alpha-0704954.6":"2019-11-07T02:00:58.705Z","0.6.8-alpha-0fa63c6.8":"2019-11-07T02:01:14.803Z","0.6.8-alpha-aa0b7b9.7":"2019-11-07T02:01:28.529Z","0.6.8":"2019-11-07T02:27:03.456Z","0.6.9-alpha-42f1597.0":"2019-11-07T02:30:10.033Z","0.6.9-alpha-719d460.0":"2019-11-08T02:01:48.455Z","0.6.9-alpha-022fee4.0":"2019-11-08T02:40:35.223Z","0.6.9-alpha-41b528d.1":"2019-11-08T02:41:47.829Z","0.6.9-alpha-6b332fa.2":"2019-11-08T23:11:10.353Z","0.6.9-alpha-fc71c7c.2":"2019-11-08T23:11:23.086Z","0.6.9-alpha-c264b92.2":"2019-11-09T00:36:49.697Z","0.6.9-alpha-310a269.2":"2019-11-09T08:46:51.387Z","0.6.9-alpha-f511e81.3":"2019-11-09T08:47:07.925Z","0.6.9-alpha-a5dcdfb.4":"2019-11-09T08:48:07.329Z","0.6.9-alpha-ae9a350.5":"2019-11-09T12:31:14.437Z","0.6.9-alpha-bb15557.5":"2019-11-09T17:07:41.243Z","0.6.9-alpha-844b7a7.6":"2019-11-09T18:37:13.755Z","0.6.9-alpha-7829b65.6":"2019-11-09T19:56:21.294Z","0.7.0":"2019-11-12T13:37:39.991Z","0.6.9-alpha-2e7d252.7":"2019-11-12T13:38:14.026Z","0.7.1-alpha-231c8a7.0":"2019-11-12T13:40:42.468Z","0.7.1-alpha-98b1946.0":"2019-11-12T15:39:14.983Z","0.7.1-alpha-797c3cc.1":"2019-11-12T15:39:37.048Z","0.7.1":"2019-11-12T16:35:00.509Z","0.7.1-alpha-8927690.0":"2019-11-12T16:36:52.426Z","0.7.2-alpha-0c3da6c.0":"2019-11-12T16:40:37.289Z","0.7.2-alpha-f53817b.0":"2019-11-12T20:59:22.026Z","0.7.2-alpha-df7711b.0":"2019-11-12T21:10:47.438Z","0.7.2-alpha-e352388.5":"2019-11-13T08:08:30.708Z","0.7.2-alpha-f06fc20.6":"2019-11-13T10:06:32.322Z","0.7.2-alpha-5567589.7":"2019-11-13T10:59:46.462Z","0.7.2-alpha-c611149.8":"2019-11-13T13:12:49.959Z","0.7.2-alpha-a224fc2.1":"2019-11-13T17:34:12.965Z","0.7.2-alpha-7f19650.2":"2019-11-13T20:22:53.200Z","0.7.2-alpha-d9ac01f.2":"2019-11-13T20:28:37.774Z","0.7.2":"2019-11-14T07:12:46.803Z","0.7.3-alpha-62f00e2.0":"2019-11-14T07:15:46.430Z","0.7.3-alpha-3bd402d.0":"2019-11-15T20:19:10.091Z","0.7.3-alpha-5a5ea69.0":"2019-11-15T20:32:20.268Z","0.7.3-alpha-748ad75.1":"2019-11-18T21:00:43.661Z","0.7.3-alpha-33d84b8.1":"2019-11-18T21:10:33.739Z","0.7.3-alpha-0ea72b3.3":"2019-11-19T15:35:31.032Z","0.7.3-alpha-323d4bd.4":"2019-11-19T19:26:08.468Z","0.7.3-alpha-6e5d892.4":"2019-11-19T19:35:05.544Z","0.7.3-alpha-e42ae64.5":"2019-11-19T19:55:23.143Z","0.7.3-alpha-d226cb9.5":"2019-11-19T20:11:16.813Z","0.7.3-alpha-11e316d.11":"2019-11-20T17:12:16.647Z","0.7.3-alpha-9c35d56.7":"2019-11-20T17:15:45.242Z","0.7.3-alpha-7645959.8":"2019-11-20T17:16:22.062Z","0.7.3-alpha-0b26a2a.8":"2019-11-20T17:17:28.653Z","0.7.3-alpha-1da5507.8":"2019-11-20T17:18:25.913Z","0.7.3-alpha-8d9b46c.8":"2019-11-20T17:19:11.571Z","0.7.3-alpha-dd631cc.9":"2019-11-20T17:20:31.144Z","0.7.3-alpha-b1c8baf.10":"2019-11-20T17:23:14.359Z","0.7.3-alpha-9f7426d.10":"2019-11-20T17:25:50.541Z","0.7.3-alpha-1e00fd1.11":"2019-11-20T22:13:54.048Z","0.7.3-alpha-c03cf5b.11":"2019-11-20T22:21:54.796Z","0.7.3-alpha-3ce4565.12":"2019-11-22T23:51:03.427Z","0.7.3-alpha-68d9623.12":"2019-11-23T00:10:35.382Z","0.7.3-alpha-556de95.13":"2019-11-23T01:16:59.641Z","0.7.3-alpha-cab656c.14":"2019-11-25T22:22:43.487Z","0.7.3-alpha-2f52e46.14":"2019-11-25T22:22:57.701Z","0.7.3-alpha-b458de3.14":"2019-11-25T22:38:11.448Z","0.7.3-alpha-b67cabb.15":"2019-11-25T22:43:23.420Z","0.7.3-alpha-10ee5b4.16":"2019-11-25T23:07:50.202Z","0.7.3-alpha-7531039.16":"2019-11-25T23:26:30.983Z","0.7.3-alpha-5003209.17":"2019-11-26T07:28:58.846Z","0.7.3-alpha-067e498.18":"2019-11-27T05:24:19.013Z","0.7.3-alpha-e6ea8bf.18":"2019-11-27T05:35:33.290Z","0.7.3-alpha-1540beb.19":"2019-11-27T14:57:53.325Z","0.7.3-alpha-3c5e3e7.19":"2019-11-27T15:01:20.866Z","0.7.3-alpha-ba11c78.20":"2019-11-27T15:06:03.338Z","0.7.3-alpha-f8ef754.20":"2019-11-27T15:09:43.348Z","0.7.3-alpha-43fbc25.21":"2019-11-27T16:11:12.345Z","0.7.3-alpha-8a5c51e.21":"2019-11-27T16:12:44.176Z","0.7.3":"2019-11-27T16:13:02.956Z","0.7.4-alpha-d9f3506.0":"2019-11-27T16:14:59.625Z","0.7.4-alpha-afaa0bd.0":"2019-11-27T17:09:02.753Z","0.7.4-alpha-747e747.0":"2019-11-27T17:12:57.842Z","0.7.4":"2019-11-27T17:13:27.023Z","0.7.5-alpha-6a1ef10.0":"2019-11-27T17:15:26.317Z","0.7.5-alpha-8dfe565.0":"2019-12-02T01:45:45.589Z","0.7.5-alpha-6d1b302.0":"2019-12-02T05:06:12.264Z","0.7.5-alpha-80a7ba8.2":"2019-12-06T03:56:28.947Z","0.7.5-alpha-fc1f80b.14":"2019-12-08T18:45:37.355Z","0.7.5-alpha-d29e518.1":"2019-12-08T18:49:41.757Z","0.7.5-alpha-60ec705.2":"2019-12-09T13:17:43.147Z","0.7.5-alpha-fc69697.2":"2019-12-09T13:17:52.784Z","0.7.5-alpha-2d03b5e.2":"2019-12-09T13:18:15.159Z","0.7.5-alpha-369d3bc.2":"2019-12-09T13:18:35.462Z","0.7.5-alpha-a8c2212.2":"2019-12-09T13:19:44.344Z","0.7.5-alpha-2fa8841.2":"2019-12-09T13:56:23.560Z","0.7.5-alpha-d58eadd.3":"2019-12-09T14:00:43.854Z","0.7.5-alpha-ffa6a90.4":"2019-12-09T14:02:16.711Z","0.7.5-alpha-0271fe0.5":"2019-12-09T14:05:11.663Z","0.7.5-alpha-fae4f37.6":"2019-12-09T14:06:15.893Z","0.7.5-alpha-0a82ad0.7":"2019-12-09T20:54:50.502Z","0.7.5-alpha-cb73d57.7":"2019-12-09T20:55:13.591Z","0.7.5-alpha-2e1e08a.7":"2019-12-09T21:09:59.182Z","0.7.5-alpha-022945b.8":"2019-12-09T21:15:50.762Z","0.7.5-alpha-109bc38.9":"2019-12-10T19:33:40.822Z","0.7.5-alpha-f4c9a57.9":"2019-12-10T19:33:50.682Z","0.7.5-alpha-541fc7d.9":"2019-12-10T19:48:30.924Z","0.7.5-alpha-251d580.10":"2019-12-10T19:53:43.603Z","0.7.5-alpha-09ecebe.11":"2019-12-11T22:22:55.402Z","0.7.5-alpha-e3f9dfc.11":"2019-12-11T22:27:15.048Z","0.7.5-alpha-068a9db.12":"2019-12-12T00:55:59.657Z","0.7.5-alpha-92585e4.14":"2019-12-12T08:08:55.004Z","0.7.5-alpha-90cb687.15":"2019-12-13T17:54:07.888Z","0.7.5-alpha-8411807.15":"2019-12-13T17:58:47.050Z","0.7.5-alpha-3d322e7.16":"2019-12-13T20:03:32.314Z","0.7.5-alpha-7c824f1.16":"2019-12-13T20:08:36.395Z","0.7.5-alpha-eaeaf2a.17":"2019-12-16T08:36:39.501Z","0.7.5-alpha-9251960.17":"2019-12-16T08:40:40.392Z","0.7.5-alpha-f41d3e8.18":"2019-12-16T12:30:31.772Z","0.7.5-alpha-e38d24f.18":"2019-12-16T12:43:16.533Z","0.7.5-alpha-bb4a86f.19":"2019-12-17T14:12:43.028Z","0.7.5-alpha-cefe0ea.19":"2019-12-17T14:13:06.938Z","0.7.5-alpha-bd20853.19":"2019-12-17T14:30:03.447Z","0.7.5-alpha-760e204.20":"2019-12-17T14:35:41.933Z","0.7.5-alpha-4f961c3.21":"2019-12-17T18:19:44.046Z","0.7.5-alpha-3228ddd.21":"2019-12-17T18:20:04.812Z","0.7.5-alpha-82e33fe.21":"2019-12-17T18:33:18.073Z","0.7.5-alpha-227dd67.22":"2019-12-17T18:37:14.201Z","0.7.5-alpha-0403d2f.23":"2019-12-18T13:37:25.540Z","0.7.5-alpha-2265239.23":"2019-12-18T13:44:51.096Z","0.7.5-alpha-26c4c55.24":"2019-12-18T14:44:38.486Z","0.7.5-alpha-b3a3b57.24":"2019-12-18T15:04:53.982Z","0.7.5-alpha-595ccf8.25":"2019-12-19T01:00:40.673Z","0.7.5-alpha-d74dfbf.25":"2019-12-19T01:16:14.775Z","0.7.5-alpha-65e2e63.26":"2019-12-19T07:18:43.354Z","0.3.5-alpha-1ac5770.144":"2019-12-19T08:24:58.509Z","0.3.5-alpha-6b149c7.145":"2019-12-19T08:37:23.465Z","0.3.5-alpha-028a4fd.146":"2019-12-19T08:42:40.142Z","0.7.5-alpha-4d94736.28":"2019-12-19T14:31:55.041Z","0.7.5-alpha-5153853.28":"2019-12-19T15:03:28.711Z","0.7.5-alpha-6eec8a7.28":"2019-12-20T02:01:48.687Z","0.7.5-alpha-ff2be7e.29":"2019-12-20T13:35:55.376Z","0.7.5-alpha-862bf62.29":"2019-12-20T14:04:05.563Z","0.7.5-alpha-843cd41.30":"2019-12-20T21:29:01.022Z","0.7.5-alpha-39fa6d8.30":"2019-12-20T21:58:10.472Z","0.7.5-alpha-68e0cb4.31":"2019-12-23T05:42:36.689Z","0.7.5-alpha-772b074.32":"2019-12-23T16:55:03.681Z","0.7.5-alpha-7b42f83.32":"2019-12-23T17:10:41.720Z","0.7.5-alpha-9da21fc.32":"2019-12-23T17:11:06.117Z","0.7.5-alpha-7059df0.33":"2019-12-23T17:14:12.116Z","0.7.5":"2019-12-23T17:40:18.196Z","0.7.6-alpha-24c6fa6.0":"2019-12-23T17:42:25.132Z","0.7.6-alpha-a18a442.0":"2019-12-24T02:26:56.955Z","0.7.6-alpha-34351e0.1":"2019-12-24T03:19:27.190Z","0.7.6-alpha-87c2baf.2":"2019-12-26T16:59:16.894Z","0.7.6-alpha-0b0b18a.2":"2019-12-26T17:09:50.608Z","0.7.6-alpha-99ccb3e.3":"2019-12-26T17:25:07.398Z","0.7.6-alpha-9c6dde0.3":"2019-12-26T17:31:55.273Z","0.7.6-alpha-f09c6ad.4":"2019-12-27T21:27:44.454Z","0.7.6-alpha-979532c.4":"2019-12-27T21:35:10.940Z","0.7.6-alpha-39f1fbd.5":"2019-12-29T22:20:50.732Z","0.7.6-alpha-e4b4704.5":"2019-12-29T22:24:47.073Z"},"maintainers":[{"email":"ardatanrikulu@gmail.com","name":"ardatan"},{"email":"dotansimha@gmail.com","name":"dotansimha"},{"email":"kamil.kisiela@gmail.com","name":"kamilkisiela"},{"email":"uri.goldshtein@gmail.com","name":"urigo"}],"description":"Common package containting utils and types for GraphQL Toolkit","repository":{"type":"git","url":"git+ssh://git@github.com/ardatan/graphql-toolkit.git"},"author":{"name":"Dotan Simha","email":"dotansimha@gmail.com"},"license":"MIT","readme":"","readmeFilename":"","homepage":"https://github.com/ardatan/graphql-toolkit#readme","bugs":{"url":"https://github.com/ardatan/graphql-toolkit/issues"}}